Widget which publishes a custom Gazebo Transport message. More...
#include <Publisher.hh>
Public Slots | |
void | OnPublish (const bool _checked) |
Callback when publish button is checked or unchecked. More... | |
Signals | |
void | FrequencyChanged () |
Notify that frequency has changed. More... | |
void | MsgDataChanged () |
Notify that message data has changed. More... | |
void | MsgTypeChanged () |
Notify that message type has changed. More... | |
void | TopicChanged () |
Notify that topic has changed. More... | |
Public Member Functions | |
Publisher () | |
Constructor. More... | |
virtual | ~Publisher () |
Destructor. More... | |
Q_INVOKABLE double | Frequency () const |
Get the frequency, in Hz. More... | |
virtual void | LoadConfig (const tinyxml2::XMLElement *_pluginElem) |
Q_INVOKABLE QString | MsgData () const |
Get the message data as a string, for example 'data: "Hello"'. More... | |
Q_INVOKABLE QString | MsgType () const |
Get the message type as a string, for example 'gz.msgs.StringMsg'. More... | |
Q_INVOKABLE void | SetFrequency (const double _frequency) |
Set the frequency, in Hz. More... | |
Q_INVOKABLE void | SetMsgData (const QString &_msgData) |
Set the message data from a string, for example 'data: "Hello"'. More... | |
Q_INVOKABLE void | SetMsgType (const QString &_msgType) |
Set the message type from a string, for example 'gz.msgs.StringMsg'. More... | |
Q_INVOKABLE void | SetTopic (const QString &_topic) |
Set the topic from a string, for example '/echo'. More... | |
Q_INVOKABLE QString | Topic () const |
Get the topic as a string, for example '/echo'. More... | |
Properties | |
double | frequency |
Frequency. More... | |
QString | msgData |
Message data. More... | |
QString | msgType |
Message type. More... | |
QString | topic |
Topic. More... | |
Detailed Description
Widget which publishes a custom Gazebo Transport message.
Configuration
This plugin doesn't accept any custom configuration.
Constructor & Destructor Documentation
◆ Publisher()
Publisher | ( | ) |
Constructor.
◆ ~Publisher()
|
virtual |
Destructor.
Member Function Documentation
◆ Frequency()
Q_INVOKABLE double Frequency | ( | ) | const |
Get the frequency, in Hz.
- Returns
- Frequency
◆ FrequencyChanged
|
signal |
Notify that frequency has changed.
◆ LoadConfig()
|
virtual |
◆ MsgData()
Q_INVOKABLE QString MsgData | ( | ) | const |
Get the message data as a string, for example 'data: "Hello"'.
- Returns
- Message data
◆ MsgDataChanged
|
signal |
Notify that message data has changed.
◆ MsgType()
Q_INVOKABLE QString MsgType | ( | ) | const |
Get the message type as a string, for example 'gz.msgs.StringMsg'.
- Returns
- Message type
◆ MsgTypeChanged
|
signal |
Notify that message type has changed.
◆ OnPublish
|
slot |
Callback when publish button is checked or unchecked.
- Parameters
-
[in] _checked True if button is checked.
◆ SetFrequency()
Q_INVOKABLE void SetFrequency | ( | const double | _frequency | ) |
Set the frequency, in Hz.
- Parameters
-
[in] _frequency Frequency
◆ SetMsgData()
Q_INVOKABLE void SetMsgData | ( | const QString & | _msgData | ) |
Set the message data from a string, for example 'data: "Hello"'.
- Parameters
-
[in] _msgData Message data
◆ SetMsgType()
Q_INVOKABLE void SetMsgType | ( | const QString & | _msgType | ) |
Set the message type from a string, for example 'gz.msgs.StringMsg'.
- Parameters
-
[in] _msgType Message type
◆ SetTopic()
Q_INVOKABLE void SetTopic | ( | const QString & | _topic | ) |
Set the topic from a string, for example '/echo'.
- Parameters
-
[in] _topic Topic
◆ Topic()
Q_INVOKABLE QString Topic | ( | ) | const |
Get the topic as a string, for example '/echo'.
- Returns
- Topic
◆ TopicChanged
|
signal |
Notify that topic has changed.
Property Documentation
◆ frequency
|
readwrite |
Frequency.
◆ msgData
|
readwrite |
Message data.
◆ msgType
|
readwrite |
Message type.
◆ topic
|
readwrite |
Topic.
The documentation for this class was generated from the following file: