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. | |
Signals | |
void | FrequencyChanged () |
Notify that frequency has changed. | |
void | MsgDataChanged () |
Notify that message data has changed. | |
void | MsgTypeChanged () |
Notify that message type has changed. | |
void | TopicChanged () |
Notify that topic has changed. | |
Public Member Functions | |
Publisher () | |
Constructor. | |
virtual | ~Publisher () |
Destructor. | |
Q_INVOKABLE double | Frequency () const |
Get the frequency, in Hz. | |
virtual void | LoadConfig (const tinyxml2::XMLElement *_pluginElem) |
Q_INVOKABLE QString | MsgData () const |
Get the message data as a string, for example 'data: "Hello"'. | |
Q_INVOKABLE QString | MsgType () const |
Get the message type as a string, for example 'gz.msgs.StringMsg'. | |
Q_INVOKABLE void | SetFrequency (const double _frequency) |
Set the frequency, in Hz. | |
Q_INVOKABLE void | SetMsgData (const QString &_msgData) |
Set the message data from a string, for example 'data: "Hello"'. | |
Q_INVOKABLE void | SetMsgType (const QString &_msgType) |
Set the message type from a string, for example 'gz.msgs.StringMsg'. | |
Q_INVOKABLE void | SetTopic (const QString &_topic) |
Set the topic from a string, for example '/echo'. | |
Q_INVOKABLE QString | Topic () const |
Get the topic as a string, for example '/echo'. | |
Properties | |
double | frequency |
Frequency. | |
QString | msgData |
Message data. | |
QString | msgType |
Message type. | |
QString | topic |
Topic. | |
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: