Gazebo Gui

API Reference

7.2.2

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 ~Publisher ( )
virtual

Destructor.

Member Function Documentation

◆ Frequency()

Q_INVOKABLE double Frequency ( ) const

Get the frequency, in Hz.

Returns
Frequency

◆ FrequencyChanged

void FrequencyChanged ( )
signal

Notify that frequency has changed.

◆ LoadConfig()

virtual void LoadConfig ( const tinyxml2::XMLElement *  _pluginElem)
virtual

◆ MsgData()

Q_INVOKABLE QString MsgData ( ) const

Get the message data as a string, for example 'data: "Hello"'.

Returns
Message data

◆ MsgDataChanged

void 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

void MsgTypeChanged ( )
signal

Notify that message type has changed.

◆ OnPublish

void OnPublish ( const bool  _checked)
slot

Callback when publish button is checked or unchecked.

Parameters
[in]_checkedTrue if button is checked.

◆ SetFrequency()

Q_INVOKABLE void SetFrequency ( const double  _frequency)

Set the frequency, in Hz.

Parameters
[in]_frequencyFrequency

◆ SetMsgData()

Q_INVOKABLE void SetMsgData ( const QString _msgData)

Set the message data from a string, for example 'data: "Hello"'.

Parameters
[in]_msgDataMessage data

◆ SetMsgType()

Q_INVOKABLE void SetMsgType ( const QString _msgType)

Set the message type from a string, for example 'gz.msgs.StringMsg'.

Parameters
[in]_msgTypeMessage type

◆ SetTopic()

Q_INVOKABLE void SetTopic ( const QString _topic)

Set the topic from a string, for example '/echo'.

Parameters
[in]_topicTopic

◆ Topic()

Q_INVOKABLE QString Topic ( ) const

Get the topic as a string, for example '/echo'.

Returns
Topic

◆ TopicChanged

void TopicChanged ( )
signal

Notify that topic has changed.

Property Documentation

◆ frequency

double frequency
readwrite

Frequency.

◆ msgData

QString msgData
readwrite

Message data.

◆ msgType

QString msgType
readwrite

Message type.

◆ topic

QString topic
readwrite

Topic.


The documentation for this class was generated from the following file: