Gazebo Gui

API Reference

8.3.0
PlottingInterface Class Reference

Plotting Interface Responsible for plotting transport msgs-fields Used by TransportPlotting Plugin & GazeboPlotting Plugin Accepts dragged items from TopicViewer Plugin & ComponentInspector Plugin. More...

#include <PlottingInterface.hh>

Public Slots

bool exportCSV (QString _path, int _chart, QMap< QString, QVariant > _serieses)
 export plot graphs to csv files More...
 
std::string FilePath (QString _path, std::string _name, std::string _extention)
 Create suitable file path with unique name and extention. More...
 
void onComponentSubscribe (QString _entity, QString _typeId, QString _type, QString _attribute, int _chart)
 called by Qml to register a chart to a component attribute More...
 
void onComponentUnSubscribe (QString _entity, QString _typeId, QString _attribute, int _chart)
 called by Qml to remove a chart from a component attribute More...
 
void onPlot (int _chart, QString _fieldID, double _x, double _y)
 slot to get triggered to plot a point and send its data to the UI More...
 
void subscribe (int _chart, QString _fieldPath, QString _topic)
 subscribe to a field to plotted on a chart More...
 
void unsubscribe (int _chart, QString _fieldPath, QString _topic)
 unsubscribe from a field and deattach it from a chart More...
 
void UpdateTime ()
 update the plotting tool time More...
 

Signals

std::string ComponentName (uint64_t _typeId)
 Get Component Name based on its type Id. More...
 
void ComponentSubscribe (uint64_t _entity, uint64_t _typeId, const std::string &_type, const std::string &_attribute, int _chart)
 Notify the gazebo plugin to subscribe to a component data. More...
 
void ComponentUnSubscribe (uint64_t _entity, uint64_t _typeId, const std::string &_attribute, int _chart)
 Notify the gazebo plugin to unsubscribe a component data. More...
 
void plot (int _chart, QString _fieldID, double _x, double _y)
 plot a point to a chart More...
 

Public Member Functions

 PlottingInterface ()
 Constructor. More...
 
 ~PlottingInterface ()
 Destructor. More...
 
void InitTimer ()
 configration of the timer More...
 
float Timeout () const
 Get the timeout of updating the plot. More...
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
 QObject (QObject *parent, const char *name)
 
virtual ~QObject ()
 
bool blockSignals (bool block)
 
QObjectchild (const char *objName, const char *inheritsClass, bool recursiveSearch) const
 
const QObjectList & children () const
 
const char * className () const
 
bool connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *receiver, const char *method)
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QByteArraydynamicPropertyNames () const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QList< T > findChildren (const QString &name) const
 
bool inherits (const char *className) const
 
void insertChild (QObject *object)
 
void installEventFilter (QObject *filterObj)
 
bool isA (const char *className) const
 
bool isWidgetType () const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const
 
void moveToThread (QThread *targetThread)
 
const char * name () const
 
const char * name (const char *defaultName) const
 
QString objectName () const
 
QObjectparent () const
 
QVariant property (const char *name) const
 
void removeChild (QObject *object)
 
void removeEventFilter (QObject *obj)
 
void setName (const char *name)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval)
 
QThreadthread () const
 

Additional Inherited Members

- Static Public Member Functions inherited from QObject
bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Protected Member Functions inherited from QObject
bool checkConnectArgs (const char *signal, const QObject *object, const char *method)
 
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const char *signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const char *signal)
 
int receivers (const char *signal) const
 
QObjectsender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Properties inherited from QObject
 objectName
 

Detailed Description

Plotting Interface Responsible for plotting transport msgs-fields Used by TransportPlotting Plugin & GazeboPlotting Plugin Accepts dragged items from TopicViewer Plugin & ComponentInspector Plugin.

Constructor & Destructor Documentation

◆ PlottingInterface()

PlottingInterface ( )
explicit

Constructor.

◆ ~PlottingInterface()

Destructor.

Member Function Documentation

◆ ComponentName

std::string ComponentName ( uint64_t  _typeId)
signal

Get Component Name based on its type Id.

Parameters
[in]_typeIdtype Id of the component
Returns
Component name

◆ ComponentSubscribe

void ComponentSubscribe ( uint64_t  _entity,
uint64_t  _typeId,
const std::string _type,
const std::string _attribute,
int  _chart 
)
signal

Notify the gazebo plugin to subscribe to a component data.

Parameters
[in]_entityentity id which has the component
[in]_typeIdcomponent type id
[in]_typecomponent data type
[in]_attributecomponent specefice attribte
[in]_chartchart id

◆ ComponentUnSubscribe

void ComponentUnSubscribe ( uint64_t  _entity,
uint64_t  _typeId,
const std::string _attribute,
int  _chart 
)
signal

Notify the gazebo plugin to unsubscribe a component data.

Parameters
[in]_entityentity id which has the component
[in]_typeIdcomponent type id
[in]_attributecomponent specefice attribte
[in]_chartchart id

◆ exportCSV

bool exportCSV ( QString  _path,
int  _chart,
QMap< QString, QVariant _serieses 
)
slot

export plot graphs to csv files

Parameters
[in]_pathpath of folder to save the csv files
[in]_chartplot id to make its name unique
[in]_seriesesserieses (graphs) of the plot
Returns
True if successfully export, False if any error

◆ FilePath

std::string FilePath ( QString  _path,
std::string  _name,
std::string  _extention 
)
slot

Create suitable file path with unique name and extention.

Parameters
[in]_pathpath selected from the UI
[in]_namefile name
[in]_extentionfile extention (csv or pdf)

◆ InitTimer()

void InitTimer ( )

configration of the timer

◆ onComponentSubscribe

void onComponentSubscribe ( QString  _entity,
QString  _typeId,
QString  _type,
QString  _attribute,
int  _chart 
)
slot

called by Qml to register a chart to a component attribute

Parameters
[in]_entityentity id which has the component
[in]_typeIdcomponent type id
[in]_typecomponent data type
[in]_attributecomponent specefice attribte
[in]_chartchart id

◆ onComponentUnSubscribe

void onComponentUnSubscribe ( QString  _entity,
QString  _typeId,
QString  _attribute,
int  _chart 
)
slot

called by Qml to remove a chart from a component attribute

Parameters
[in]_entityentity id which has the component
[in]_typeIdcomponent type id
[in]_attributecomponent specefice attribte
[in]_chartchart id

◆ onPlot

void onPlot ( int  _chart,
QString  _fieldID,
double  _x,
double  _y 
)
slot

slot to get triggered to plot a point and send its data to the UI

Parameters
[in]_chartchart ID
[in]_fieldIDfield path ID
[in]_xx coordinates of the plot point
[in]_yy coordinates of the plot point

◆ plot

void plot ( int  _chart,
QString  _fieldID,
double  _x,
double  _y 
)
signal

plot a point to a chart

Parameters
[in]_chartchart ID
[in]_fieldIDfield path ID
[in]_xx coordinates of the plot point
[in]_yy coordinates of the plot point

◆ subscribe

void subscribe ( int  _chart,
QString  _fieldPath,
QString  _topic 
)
slot

subscribe to a field to plotted on a chart

param[in] _topic the topic that includes that field

param[in] _fieldPath path to the field to reach it from the msg

param[in] _chart chart id to be attached to that field

◆ Timeout()

float Timeout ( ) const

Get the timeout of updating the plot.

Returns
updating plot timeout

◆ unsubscribe

void unsubscribe ( int  _chart,
QString  _fieldPath,
QString  _topic 
)
slot

unsubscribe from a field and deattach it from a chart

param[in] _topic the topic that includes that field

param[in] _fieldPath path to the field to reach it from the msg

param[in] _chart chart id to be deattached to that field

◆ UpdateTime

void UpdateTime ( )
slot

update the plotting tool time


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