Gazebo Gui

API Reference

9.0.0

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 ~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: