Struct representing a property of ROS msg display instance.
More...
#include <property.hpp>
|
| RosTopicProperty ()=default |
|
| RosTopicProperty (const std::string &type, const std::string &topic, const std::shared_ptr< std::unordered_map< std::string, std::string > > entity_roots) |
| Construct instance.
|
|
void | set_type (const std::string &type) |
| Set ROS message type name.
|
|
void | set_topic (const std::string &topic) |
| Set ROS topic name.
|
|
void | set_entity_roots (const std::shared_ptr< std::unordered_map< std::string, std::string > > entity_roots) |
| Set entity path of record.
|
|
const std::string & | type () const noexcept |
| Get ROS message type.
|
|
const std::string & | topic () const noexcept |
| Get ROS topic name.
|
|
const std::string & | entity () const noexcept |
| Return the entity path using topic name.
|
|
std::optional< std::string > | entity (const std::string &frame_id) const noexcept |
| Return the entity path using the corresponding root and its frame ID with its topic.
|
|
std::optional< std::string > | entity_without_topic (const std::string &frame_id) const noexcept |
| Return the entity path using the corresponding root and its frame ID without its topic.
|
|
bool | is_initialized () const |
|
Struct representing a property of ROS msg display instance.
◆ RosTopicProperty() [1/2]
awviz_common::RosTopicProperty::RosTopicProperty |
( |
| ) |
|
|
default |
◆ RosTopicProperty() [2/2]
awviz_common::RosTopicProperty::RosTopicProperty |
( |
const std::string & |
type, |
|
|
const std::string & |
topic, |
|
|
const std::shared_ptr< std::unordered_map< std::string, std::string > > |
entity_roots |
|
) |
| |
|
inline |
Construct instance.
- Parameters
-
type | ROS msg type. |
topic | Name of topic. |
entity_roots | Root entity paths to recording. |
◆ entity() [1/2]
const std::string & awviz_common::RosTopicProperty::entity |
( |
| ) |
const |
|
inlinenoexcept |
Return the entity path using topic name.
- Returns
- Topic name used as entity path.
◆ entity() [2/2]
std::optional< std::string > awviz_common::RosTopicProperty::entity |
( |
const std::string & |
frame_id | ) |
const |
|
inlinenoexcept |
Return the entity path using the corresponding root and its frame ID with its topic.
- Parameters
-
- Returns
- Return "/<Root>/<FrameID>/<Topic>" if the corresponding root exists, otherwise return
std::nullopt
.
◆ entity_without_topic()
std::optional< std::string > awviz_common::RosTopicProperty::entity_without_topic |
( |
const std::string & |
frame_id | ) |
const |
|
inlinenoexcept |
Return the entity path using the corresponding root and its frame ID without its topic.
- Parameters
-
- Returns
- Return "/<Root>/<FrameID>" if the corresponding root exists, otherwise return
std::nullopt
.
◆ is_initialized()
bool awviz_common::RosTopicProperty::is_initialized |
( |
| ) |
const |
|
inline |
◆ set_entity_roots()
void awviz_common::RosTopicProperty::set_entity_roots |
( |
const std::shared_ptr< std::unordered_map< std::string, std::string > > |
entity_roots | ) |
|
|
inline |
Set entity path of record.
- Parameters
-
entity | Entity path of record. |
◆ set_topic()
void awviz_common::RosTopicProperty::set_topic |
( |
const std::string & |
topic | ) |
|
|
inline |
Set ROS topic name.
- Parameters
-
◆ set_type()
void awviz_common::RosTopicProperty::set_type |
( |
const std::string & |
type | ) |
|
|
inline |
Set ROS message type name.
- Parameters
-
type | Name of ROS message type. |
◆ topic()
const std::string & awviz_common::RosTopicProperty::topic |
( |
| ) |
const |
|
inlinenoexcept |
Get ROS topic name.
- Returns
- Name of topic.
◆ type()
const std::string & awviz_common::RosTopicProperty::type |
( |
| ) |
const |
|
inlinenoexcept |
Get ROS message type.
- Returns
- ROS message type name.
The documentation for this class was generated from the following file: