The DataStreamer base classm used to read streaming of data. More...
#include <datastreamer_base.h>
Signals | |
void | clearBuffers () |
Request the main application to clear previous data points. More... | |
void | closed () |
void | dataReceived () |
void | notificationsChanged (int active_notification_count) |
void | removeGroup (std::string group_name) |
All the series which share this group, will be deleted. More... | |
Public Member Functions | |
PlotDataMapRef & | dataMap () |
const PlotDataMapRef & | dataMap () const |
DataStreamer ()=default | |
virtual bool | isRunning () const =0 |
isRunning More... | |
std::mutex & | mutex () |
virtual std::pair< QAction *, int > | notificationAction () |
Gets the action to execute when clicking the 'notifications' button and the current number of outstanding notifications. More... | |
const ParserFactories * | parserFactories () const |
void | setMaximumRangeX (double range) |
void | setParserFactories (ParserFactories *parsers) |
virtual void | shutdown ()=0 |
shutdown Stop streaming More... | |
virtual bool | start (QStringList *pre_selected_sources)=0 |
start streaming. More... | |
virtual | ~DataStreamer ()=default |
Public Member Functions inherited from PJ::PlotJugglerPlugin | |
virtual const std::vector< QAction * > & | availableActions () |
virtual bool | isDebugPlugin () |
virtual const char * | name () const =0 |
Name of the plugin type, NOT the particular instance. More... | |
virtual QWidget * | optionsWidget () |
optionsWidget pointer to a persistent widget used to set the plugin options . More... | |
PlotJugglerPlugin ()=default | |
virtual bool | xmlLoadState (const QDomElement &parent_element) |
Override this method to load the status of the plugin from XML. More... | |
QDomElement | xmlSaveState (QDomDocument &doc) const |
virtual bool | xmlSaveState (QDomDocument &doc, QDomElement &parent_element) const |
Override this method to save the status of the plugin to XML. More... | |
Private Attributes | |
PlotDataMapRef | _data_map |
std::mutex | _mutex |
ParserFactories * | _parser_factories = nullptr |
QAction * | _start_streamer |
The DataStreamer base classm used to read streaming of data.
Important. To avoid problems with thread safety, ANY update to dataMap(), which share its elements with the main application, must be protected using the mutex().
Definition at line 25 of file datastreamer_base.h.
|
default |
|
virtualdefault |
|
signal |
Request the main application to clear previous data points.
|
signal |
The method shutdown () is used by the main app to stop streaming. When the plugin stops itself, this signal must be emitted.
|
inline |
Definition at line 69 of file datastreamer_base.h.
|
inline |
Definition at line 74 of file datastreamer_base.h.
|
signal |
Signal to be published periodically to notify to the main app that new data is available.
|
pure virtual |
isRunning
Implemented in WebsocketServer, UDP_Server, DataStreamZMQ, DataStreamZcm, DataStreamMQTT, and DataStreamSample.
|
inline |
Definition at line 62 of file datastreamer_base.h.
|
inlinevirtual |
Gets the action to execute when clicking the 'notifications' button and the current number of outstanding notifications.
Reimplemented in DataStreamMQTT, and DataStreamSample.
Definition at line 57 of file datastreamer_base.h.
|
signal |
const ParserFactories * PJ::DataStreamer::parserFactories | ( | ) | const |
Definition at line 34 of file datastreamer_base.cpp.
|
signal |
All the series which share this group, will be deleted.
void PJ::DataStreamer::setMaximumRangeX | ( | double | range | ) |
Definition at line 12 of file datastreamer_base.cpp.
void PJ::DataStreamer::setParserFactories | ( | ParserFactories * | parsers | ) |
Definition at line 29 of file datastreamer_base.cpp.
|
pure virtual |
shutdown Stop streaming
Implemented in WebsocketServer, UDP_Server, DataStreamZMQ, DataStreamZcm, DataStreamMQTT, and DataStreamSample.
|
pure virtual |
start streaming.
optional | list of pre selected sources. |
Implemented in WebsocketServer, UDP_Server, DataStreamZMQ, DataStreamZcm, DataStreamMQTT, and DataStreamSample.
|
private |
Definition at line 105 of file datastreamer_base.h.
|
private |
Definition at line 104 of file datastreamer_base.h.
|
private |
Definition at line 107 of file datastreamer_base.h.
|
private |
Definition at line 106 of file datastreamer_base.h.