Gazebo Gui

API Reference

9.0.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
 
std::string FilePath (QString _path, std::string _name, std::string _extention)
 Create suitable file path with unique name and extention.
 
void onComponentSubscribe (QString _entity, QString _typeId, QString _type, QString _attribute, int _chart)
 called by Qml to register a chart to a component attribute
 
void onComponentUnSubscribe (QString _entity, QString _typeId, QString _attribute, int _chart)
 called by Qml to remove a chart from a component attribute
 
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
 
void subscribe (int _chart, QString _fieldPath, QString _topic)
 subscribe to a field to plotted on a chart
 
void unsubscribe (int _chart, QString _fieldPath, QString _topic)
 unsubscribe from a field and deattach it from a chart
 
void UpdateTime ()
 update the plotting tool time
 

Signals

std::string ComponentName (uint64_t _typeId)
 Get Component Name based on its type Id.
 
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.
 
void ComponentUnSubscribe (uint64_t _entity, uint64_t _typeId, const std::string &_attribute, int _chart)
 Notify the gazebo plugin to unsubscribe a component data.
 
void plot (int _chart, QString _fieldID, double _x, double _y)
 plot a point to a chart
 

Public Member Functions

 PlottingInterface ()
 Constructor.
 
 ~PlottingInterface ()
 Destructor.
 
void InitTimer ()
 configration of the timer
 
float Timeout () const
 Get the timeout of updating the plot.
 
- 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: