Public Member Functions | Private Member Functions | Private Attributes | List of all members
DataStreamZMQ Class Reference

#include <datastream_zmq.h>

Inheritance diagram for DataStreamZMQ:
Inheritance graph
[legend]

Public Member Functions

 DataStreamZMQ ()
 
virtual bool isDebugPlugin () override
 
virtual bool isRunning () const override
 isRunning More...
 
virtual const char * name () const override
 Name of the plugin type, NOT the particular instance. More...
 
virtual void shutdown () override
 shutdown Stop streaming More...
 
virtual bool start (QStringList *) override
 start streaming. More...
 
virtual ~DataStreamZMQ () override
 
- Public Member Functions inherited from PJ::DataStreamer
PlotDataMapRefdataMap ()
 
const PlotDataMapRefdataMap () const
 
 DataStreamer ()=default
 
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 ParserFactoriesparserFactories () const
 
void setMaximumRangeX (double range)
 
void setParserFactories (ParserFactories *parsers)
 
virtual ~DataStreamer ()=default
 
- Public Member Functions inherited from PJ::PlotJugglerPlugin
virtual const std::vector< QAction * > & availableActions ()
 
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 Member Functions

bool parseMessage (const PJ::MessageRef &msg, double &timestamp)
 
void parseTopicFilters (const QString &filters)
 
void receiveLoop ()
 
void subscribeTopics ()
 
void unsubscribeTopics ()
 

Private Attributes

PJ::MessageParserPtr _parser
 
std::thread _receive_thread
 
bool _running
 
std::string _socket_address
 
std::vector< std::string > _topic_filters
 
zmq::context_t _zmq_context
 
zmq::socket_t _zmq_socket
 

Additional Inherited Members

- Signals inherited from PJ::DataStreamer
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...
 

Detailed Description

Definition at line 22 of file datastream_zmq.h.

Constructor & Destructor Documentation

◆ DataStreamZMQ()

DataStreamZMQ::DataStreamZMQ ( )

Definition at line 31 of file datastream_zmq.cpp.

◆ ~DataStreamZMQ()

DataStreamZMQ::~DataStreamZMQ ( )
overridevirtual

Definition at line 36 of file datastream_zmq.cpp.

Member Function Documentation

◆ isDebugPlugin()

virtual bool DataStreamZMQ::isDebugPlugin ( )
inlineoverridevirtual

Override this to return true, if you want this plugin to be loaded only when the command line option [-t] is used.

Reimplemented from PJ::PlotJugglerPlugin.

Definition at line 47 of file datastream_zmq.h.

◆ isRunning()

virtual bool DataStreamZMQ::isRunning ( ) const
inlineoverridevirtual

isRunning

Returns
true if start() called, false after shutwodn()

Implements PJ::DataStreamer.

Definition at line 37 of file datastream_zmq.h.

◆ name()

virtual const char* DataStreamZMQ::name ( ) const
inlineoverridevirtual

Name of the plugin type, NOT the particular instance.

Implements PJ::PlotJugglerPlugin.

Definition at line 42 of file datastream_zmq.h.

◆ parseMessage()

bool DataStreamZMQ::parseMessage ( const PJ::MessageRef msg,
double &  timestamp 
)
private

Definition at line 217 of file datastream_zmq.cpp.

◆ parseTopicFilters()

void DataStreamZMQ::parseTopicFilters ( const QString &  filters)
private

Definition at line 231 of file datastream_zmq.cpp.

◆ receiveLoop()

void DataStreamZMQ::receiveLoop ( )
private

Definition at line 195 of file datastream_zmq.cpp.

◆ shutdown()

void DataStreamZMQ::shutdown ( )
overridevirtual

shutdown Stop streaming

Implements PJ::DataStreamer.

Definition at line 178 of file datastream_zmq.cpp.

◆ start()

bool DataStreamZMQ::start ( QStringList *  pre_selected_sources)
overridevirtual

start streaming.

Parameters
optionallist of pre selected sources.
Returns
true if started correctly.

Implements PJ::DataStreamer.

Definition at line 41 of file datastream_zmq.cpp.

◆ subscribeTopics()

void DataStreamZMQ::subscribeTopics ( )
private

Definition at line 250 of file datastream_zmq.cpp.

◆ unsubscribeTopics()

void DataStreamZMQ::unsubscribeTopics ( )
private

Definition at line 260 of file datastream_zmq.cpp.

Member Data Documentation

◆ _parser

PJ::MessageParserPtr DataStreamZMQ::_parser
private

Definition at line 56 of file datastream_zmq.h.

◆ _receive_thread

std::thread DataStreamZMQ::_receive_thread
private

Definition at line 58 of file datastream_zmq.h.

◆ _running

bool DataStreamZMQ::_running
private

Definition at line 53 of file datastream_zmq.h.

◆ _socket_address

std::string DataStreamZMQ::_socket_address
private

Definition at line 57 of file datastream_zmq.h.

◆ _topic_filters

std::vector<std::string> DataStreamZMQ::_topic_filters
private

Definition at line 59 of file datastream_zmq.h.

◆ _zmq_context

zmq::context_t DataStreamZMQ::_zmq_context
private

Definition at line 54 of file datastream_zmq.h.

◆ _zmq_socket

zmq::socket_t DataStreamZMQ::_zmq_socket
private

Definition at line 55 of file datastream_zmq.h.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Aug 11 2024 02:24:28