Robox Library for Cpp: BCC/31 module 1.0.0
RLibCpp BCC/31 protocol implementation
Classes | Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Friends | List of all members
Monitor Class Reference

The class to handle BCC protocol monitors. More...

#include <monitor.h>

Inheritance diagram for Monitor:
BaseMonitor

Classes

class  PtrVector
 Class to handle with lists of Monitor. More...
 

Public Types

typedef MonitorpMonitor
 

Public Member Functions

 Monitor ()
 Class constructor.
 
virtual ~Monitor ()
 Class destructor.
 
Globals::Results start ()
 Starts the monitor.
 
Globals::Results stop ()
 Stops the monitor.
 
Globals::Results read (MonitorStruct::ReadData &data)
 Read the last monitor data from the device.
 
Globals::Results write (MonitorStruct::WriteData &data)
 Writes the monitor data to the device.
 
uint32_t activeEventFrequency ()
 The effective event notification frequency (Hz)
 
uint32_t changeId ()
 The id of the data read from the device.
 
Globals::Results add (const Variable &var) override
 Adds a variable to the monitor.
 
Globals::Results clear () override
 Clears the monitor items list.
 
uint64_t id () const
 This monitor identifier: this is the value specified in the signals' senderId parameter.
 
void setCoherentValues (bool value) override
 Flag setted to use coherent operations , i.e. don't split the command into multiple requests.
 
bool active () const
 Get the flag to indicate if the monitor has been started into the device.
 
bool autoRestart () const
 Get the flag to restart the monitor automatically when the device variable set has changed.
 
void setAutoRestart (bool value)
 Set the flag to restart the monitor automatically when the device variable set has changed.
 
uint16_t dataFrequency () const
 Get the desired frequency of the data returned from the device (Hz)
 
void setDataFrequency (uint16_t value)
 Set the desired frequency of the data returned from the device (Hz)
 
uint16_t activeDataFrequency () const
 Get the effective data frequency returned from the device.
 
uint32_t eventFrequency () const
 Get the desired event frequency (Hz)
 
void setEventFrequency (uint32_t value)
 Set the desired event frequency (Hz)
 
uint32_t watchDog () const
 Get the monitor watchdog time (msec)
 
void setWatchDog (uint32_t value)
 Set the monitor watchdog time (msec)
 
- Public Member Functions inherited from BaseMonitor
 BaseMonitor ()
 Class constructor.
 
virtual ~BaseMonitor ()
 Class desstructor.
 
virtual bool connected ()
 Get the flag to indicate if the monitor is connected to the device.
 
virtual uint32_t count ()
 Get the number of registered variables.
 
virtual bool coherentValues ()
 Get the flag setted to use coherent operations , i.e. don't split the command into multiple requests.
 
virtual Clientclient ()
 Get the owner setted Client object.
 
virtual Connectionconnection ()
 Get the Connection object.
 

Public Attributes

Signal2< uint64_t, uint32_t > started
 Event fired when the monitor is successfully started.
 
Signal1< uint64_t > stopped
 Event fired when the monitor is successfully stopped.
 
Signal2< uint64_t, uint32_t > restarted
 Event fired when the monitor is successfully restarted.
 
Signal2< uint64_t, uint32_t > dataChanged
 Event fired when the monitor data has changed i.e. some new monitor data has been received.
 
Signal2< uint64_t, RLibCpp::Bcc::MonitorStruct::ErrorDataerror
 Event fired when an error occurs during monitor operations.
 

Protected Member Functions

Globals::Results doStop (bool wait, bool emitError=false)
 Stops the monitor, i.e. destroys it on the device and stops the handling thread.
 
void setConnection (Connection *value) override
 The Connection object setted when invoking Connection::getMonitor(Monitor *&) method.
 
void setClient (Client *value) override
 The client object setted when invoking Connection::getMonitor(Monitor *&) method.
 
void handleThread () override
 The handling thread methods.
 
Globals::Results doPrepareRuntime (Client *client, bool coherentValues) override
 Override of the BaseMonitor::doPrepareRuntime(Client *, bool) to set some class specific properties.
 
Message::MsgCodes createMsgCode () override
 Get the message code to create the monitor.
 
ByteVector * createMsgDataPrefix () override
 Get a pointer to byte array containg data per for the create message.
 
Message::MsgCodes writeMsgCode () override
 Get the message code for the monitor write command.
 
ByteVector * writeMsgDataPrefix () override
 Get a pointer to byte array containg data per for the write message.
 
void invoke (long tagData) override
 The method to be invoked for event dispatch.
 
void doInvokeEvent (const Event &event)
 The method that effectively invokes the event.
 
EventDispatcherThreadeventsThread ()
 The thread for event dispatching.
 
ClientwriteClient () const
 Get the internal Client object setted when invoking Connection::getMonitor(Monitor *&) method.
 
void setWriteClient (Client *value)
 Set the internal Client object setted when invoking Connection::getMonitor(Monitor *&) method.
 
QuickMonitor *& quickMonitor ()
 Get the QuickMonitor object used to implement read(MonitorStruct::ReadData &) when the monitor is not active()
 
Tool::ThreadHelper::ScheduleTypes scheduleType () const
 Get the thread schedule type for monitor.
 
void setScheduleType (Tool::ThreadHelper::ScheduleTypes value)
 Set the thread schedule type for monitor.
 
uint32_t monitorId () const
 Get the monitor identifier for the connected device.
 
void setMonitorId (uint32_t value)
 Set the monitor identifier for the connected device.
 
- Protected Member Functions inherited from BaseMonitor
void synchronizeCompleted (uint64_t senderId, RLibCpp::Bcc::Globals::Results re)
 Private handler for the Connection::synchronizeCompleted(uint64_t , Globals::Results); event.
 
void clearUserMonitors ()
 Clears the BaseMonitorStruct::UserMonitorItem
 
void clearDevices ()
 Clear the BaseMonitorStruct::DeviceItem
 
void addUserMonitor (BaseMonitorStruct::UserMonitorItem *item)
 Adds the item to the BaseMonitorStruct::UserMonitorItem list.
 
void addDevice (BaseMonitorStruct::DeviceItem *item)
 Adds the item to the BaseMonitorStruct::DeviceItem list.
 
Globals::Results doSetupReadData (BaseMonitorStruct::BaseData &data)
 Setups the BaseMonitorStruct::DeviceMonitorItem::readSrcValues() and BaseMonitorStruct::DeviceMonitorItem::readSrcValuesOffset(); of the BaseMonitorStruct::DeviceItem to the data values storage.
 
Globals::Results doParseReadData (BaseMonitorStruct::DeviceItem *deviceItem, ByteVector &rawData, uint32_t dataOff)
 Parses the rawData raw data buffer read from the devices and stores values into the deviceItem proper list (BaseMonitorStruct::DeviceMonitorItem::readSrcValues())
 
Globals::Results doParseReadData (BaseMonitorStruct::DeviceItem *deviceItem, const uint8_t *rawData, uint32_t rawDataSize, uint32_t dataOff)
 Parses the rawData raw data buffer read from the devices and stores values into the deviceItem proper list (BaseMonitorStruct::DeviceMonitorItem::readSrcValues())
 
Globals::Results doSetupWriteData (BaseMonitorStruct::BaseData &data)
 Setups the BaseMonitorStruct::DeviceMonitorItem::writeSrcValues() and BaseMonitorStruct::DeviceMonitorItem::writeSrcValuesOffset() of the BaseMonitorStruct::DeviceItem to the data values storage.
 
Globals::Results doParseWriteData (ByteVector &data, uint32_t dataOff, BaseMonitorStruct::DeviceItem *deviceItem)
 Parses the deviceItem proper list (BaseMonitorStruct::DeviceMonitorItem::readSrcValues()) and stores the data into the rawData raw data buffer to be written to the device.
 
Globals::Results doParseWriteData (uint8_t *rawData, uint32_t rawDataSize, uint32_t dataOff, BaseMonitorStruct::DeviceItem *deviceItem)
 Parses the deviceItem proper list (BaseMonitorStruct::DeviceMonitorItem::readSrcValues()) and stores the data into the rawData raw data buffer to be written to the device.
 
BaseMonitorStruct::DeviceItem::PtrVectordeviceItems ()
 Get the list of items to read, i.e. the list of BCC message sent to the device.
 
BaseMonitorStruct::UserMonitorItem::PtrVectoritems ()
 Get the original user defined monitor items' list

See also
BaseMonitorStruct::UserMonitorItem

 
bool dirty () const
 Get the dirty flag: when set, the internal data structures needs to be updated/recreated.
 
void setDirty (bool value)
 Set the dirty flag: when set, the internal data structures needs to be updated/recreated.
 
bool releasing () const
 Get the releasing flag: when set the monitor is about to be released from connection.
 
void setReleasing (bool value)
 Set the releasing flag: when set the monitor is about to be released from connection.
 

Friends

class Connection
 
class Tool::ThreadHandler
 
class Tool::EventDispatcherThread
 

Additional Inherited Members

- Static Protected Attributes inherited from BaseMonitor
static const int MaxItemsPerMonitor = 25
 The number of maximun variable definition for each device monitor.
 

Detailed Description

The class to handle BCC protocol monitors.

Example of general usage of the monitor class:

monitor = nullptr;
return;
// Setup the monitor properties as desired
monitor->setAutoRestart(true);
monitor->setDataFrequency(100);
monitor->setEventFrequency(10);
// Connect to events signals
monitor->dataChanged.connect(onMonDataChanged);
monitor->restarted.connect(onMonRestarted);
monitor->started.connect(onMonStarted);
monitor->stopped.connect(onMonStopped);
monitor->error.connect(onMonError);
// or if event handler are non static member function of class (e.g. MyClass *obj)
// monitor->dataChanged.connect(obj, &MyClass::onMonDataChanged);
// monitor->restarted.connect(obj, &MyClass::onMonRestarted);
// monitor->started.connect(obj, &MyClass::onMonStarted);
// monitor->stopped.connect(obj, &MyClass::onMonStopped);
// monitor->error.connect(obj, &MyClass::onMonError);
// Add some variables
monitor->add(Variable::fromVRR(10, 16));
// Start the monitor
if (monitor->start() != Globals::resSuccess)
{
return;
}
// From now on , data will be received asynchronously through the dataChanged event
// do some work
// ...
// Stop the monitor when done ...
monitor->stop();
// ... and release the resource from the connection
virtual Connection * connection()
Get the Connection object.
virtual Globals::Results releaseMonitor(Monitor *monitor)
Release a monitor for the connection.
virtual Globals::Results getMonitor(Monitor *&monitor)
Obtain a new (default configured) monitor for the connection.
@ resSuccess
The operation completed successfully.
Definition globals.h:39
static Variable fromVRR(uint32_t index, uint32_t count=1)
Factory method to create and initialize a Message::varVRR variable.

And that's an example for the dataChanged event handler

void onMonDataChanged(uint64_t senderId, uint32_t changeId)
{
Globals::Results res = monitor->read(readData);
if (res != Globals::resSuccess)
{
cout << "!!!!!! Failed to read monitor: errCode= " << (int)res << " -> " << Globals::DecodeResult(res) << endl;
return;
}
for (size_t valIdx = 0; valIdx < readData.values().size(); valIdx++)
{
Variable::Data::PtrVector *list = readData.values()[valIdx];
for (size_t itemIdx = 0; itemIdx < list->size(); itemIdx++)
{
Variable::Data *data = (*list)[itemIdx];
switch (data->type())
{
case Variable::Data::dtDouble:
case Variable::Data::dtSingle:
cout << data->getDouble() << " ";
break;
case Variable::Data::dtString:
cout << data->getString() << " ";
break;
default:
cout << data->getU32() << " ";
break;
}
}
}
}
Variable::Data::PtrVector::PtrPtrVector & values()
Get the list of pointers to list of pointers variable data values.
Results
The global operation result codes.
Definition globals.h:37
static RLibCpp::Tool::String DecodeResult(Results re)
Decode the specified result code.
uint32_t changeId()
The id of the data read from the device.
The data for the Monitor::read(MonitorStruct::ReadData &) method.
Definition monitor.h:42
size_t size() const
Get the number of elements in the container.
Class to handle with lists of Data pointers.
Definition variable.h:192
size_t size() const
Get the number of elements in the container.
Class to handle variable data values.
Definition variable.h:52
double getDouble()
Get the value as Types::dtUDouble.
uint32_t getU32()
Get the value as Types::dtU32.
Message::DataTypes type() const
Get the data type.
String getString()
Get the value as Types::dtString.

The monitor must be obtained from a valid connection. It is best practise to explictly release or dispose the monitor when done with it. Otherwise it will be released on connection destruction.

All the methods of the monitor class are blocking, that do not return until the operation is finished (with success or error).

For more usage examples, look at specific monitor methods.

Member Typedef Documentation

◆ pMonitor

typedef Monitor* pMonitor

Constructor & Destructor Documentation

◆ Monitor()

Monitor ( )

Class constructor.

◆ ~Monitor()

virtual ~Monitor ( )
virtual

Class destructor.

Member Function Documentation

◆ active()

bool active ( ) const

Get the flag to indicate if the monitor has been started into the device.

Returns
The parameter value
Remarks
Use start() and stop() methods to activate and deactivate the monitor

◆ activeDataFrequency()

uint16_t activeDataFrequency ( ) const

Get the effective data frequency returned from the device.

Returns
The parameter value

◆ activeEventFrequency()

uint32_t activeEventFrequency ( )

The effective event notification frequency (Hz)

It's the smallest value between the eventFrequency() assumed on start and the activeDataFrequency()

◆ add()

Globals::Results add ( const Variable & var)
overridevirtual

Adds a variable to the monitor.

Parameters
varThe variable to add
Returns
Return the operation result code.

Variable may be added only if the monitor is not active(), otherwise an error will be returned

If the total size of variable added (including repetition values for array of variables) exceeds the maximun BCC protocol specification, you have to reset the coherentValues() flag

Reimplemented from BaseMonitor.

◆ autoRestart()

bool autoRestart ( ) const

Get the flag to restart the monitor automatically when the device variable set has changed.

Returns
The parameter value
Remarks
This parameter may be changed at any time but it's assumed only upon the monitor start() command

◆ changeId()

uint32_t changeId ( )

The id of the data read from the device.

This parameter may be useful ifyou are not using the dataChanged event but pooling data with th read(MonitorStruct::ReadData &) methods at your specific rate, to see if data has changed since last read.

This parameter is updated at any single data message received from the device.

◆ clear()

Globals::Results clear ( )
overridevirtual

Clears the monitor items list.

Returns
Return the operation result code.

Variable may be added only if the monitor is not active(), otherwise an error will be returned

Reimplemented from BaseMonitor.

◆ createMsgCode()

Message::MsgCodes createMsgCode ( )
overrideprotectedvirtual

Get the message code to create the monitor.

Returns
The message code to create the monitor

Implements BaseMonitor.

◆ createMsgDataPrefix()

ByteVector * createMsgDataPrefix ( )
overrideprotectedvirtual

Get a pointer to byte array containg data per for the create message.

Returns
The pointer to byte array

Implements BaseMonitor.

◆ dataFrequency()

uint16_t dataFrequency ( ) const

Get the desired frequency of the data returned from the device (Hz)

Returns
The parameter value
Remarks
Valid value range is [1..100] Hz
The effective data frequency returned from the device will be decided by the device itself upon monitor start() and will be stored into the activeDataFrequency() property
This parameter may be changed at any time but it's assumed only upon the monitor start() command

◆ doInvokeEvent()

void doInvokeEvent ( const Event & event)
protected

The method that effectively invokes the event.

◆ doPrepareRuntime()

Globals::Results doPrepareRuntime ( Client * client,
bool coherentValues )
overrideprotectedvirtual

Override of the BaseMonitor::doPrepareRuntime(Client *, bool) to set some class specific properties.

Parameters
clientThe Client to be used for comunicate to the device
coherentValuesFlag to use coeherent values
Returns
Return the operation result code.

Reimplemented from BaseMonitor.

◆ doStop()

Globals::Results doStop ( bool wait,
bool emitError = false )
protected

Stops the monitor, i.e. destroys it on the device and stops the handling thread.

Parameters
waitIf true, the method will not returns until the handling thread has exited
emitErrorSet this to emit an error signal when this method is invoked when the monitor is not active()
Returns
Return the operation result code.

◆ eventFrequency()

uint32_t eventFrequency ( ) const

Get the desired event frequency (Hz)

Returns
The parameter value
Remarks
This parameter may be changed at any time but it's assumed only upon the monitor start() command

◆ eventsThread()

EventDispatcherThread * eventsThread ( )
protected

The thread for event dispatching.

◆ handleThread()

void handleThread ( )
overrideprotected

The handling thread methods.

This thread provides to all the common monitor operations such as sending watch dog message, checking system information changes and performing autoRestart() (if enabled), retriving data and dispatching events to the user

◆ id()

uint64_t id ( ) const

This monitor identifier: this is the value specified in the signals' senderId parameter.

Returns

◆ invoke()

void invoke ( long tagData)
overrideprotected

The method to be invoked for event dispatch.

◆ monitorId()

uint32_t monitorId ( ) const
protected

Get the monitor identifier for the connected device.

Returns
The parameter value
Remarks
This is the value returned from the device and my change at any monitor creation, not to be confused with th id() which is specific of this object and never changes

◆ quickMonitor()

QuickMonitor *& quickMonitor ( )
protected

Get the QuickMonitor object used to implement read(MonitorStruct::ReadData &) when the monitor is not active()

Returns
The parameter value

◆ read()

Read the last monitor data from the device.

Parameters
dataThe storage filled with the monitor data
Returns
Return the operation result code.

If the monitor is active() , then this methods doesn't really reads the data from the connected device but fills the data parameters with the last values asynchronously returned from the device

◆ scheduleType()

Tool::ThreadHelper::ScheduleTypes scheduleType ( ) const
protected

Get the thread schedule type for monitor.

Returns
The parameter value

◆ setAutoRestart()

void setAutoRestart ( bool value)

Set the flag to restart the monitor automatically when the device variable set has changed.

Parameters
valueThe value to set
Remarks
This parameter may be changed at any time but it's assumed only upon the monitor start() command

◆ setClient()

void setClient ( Client * value)
overrideprotectedvirtual

The client object setted when invoking Connection::getMonitor(Monitor *&) method.

Parameters
valueThe value to set

Reimplemented from BaseMonitor.

◆ setCoherentValues()

void setCoherentValues ( bool value)
overridevirtual

Flag setted to use coherent operations , i.e. don't split the command into multiple requests.

Parameters
valueThe value to set

This parameter may be changed at any time but it's assumed only upon the monitor start() command

Reimplemented from BaseMonitor.

◆ setConnection()

void setConnection ( Connection * value)
overrideprotectedvirtual

The Connection object setted when invoking Connection::getMonitor(Monitor *&) method.

The value to set

Reimplemented from BaseMonitor.

◆ setDataFrequency()

void setDataFrequency ( uint16_t value)

Set the desired frequency of the data returned from the device (Hz)

Parameters
valueThe value to set
Remarks
Valid value range is [1..100] Hz
The effective data frequency returned from the device will be decided by the device itself upon monitor start() and will be stored into the activeDataFrequency() property
This parameter may be changed at any time but it's assumed only upon the monitor start() command

◆ setEventFrequency()

void setEventFrequency ( uint32_t value)

Set the desired event frequency (Hz)

Parameters
valueThe value to set
Remarks
This parameter may be changed at any time but it's assumed only upon the monitor start() command

◆ setMonitorId()

void setMonitorId ( uint32_t value)
protected

Set the monitor identifier for the connected device.

Parameters
valueThe value to set
Remarks
This is the value returned from the device and my change at any monitor creation, not to be confused with th id() which is specific of this object and never changes

◆ setScheduleType()

void setScheduleType ( Tool::ThreadHelper::ScheduleTypes value)
protected

Set the thread schedule type for monitor.

Parameters
valueThe value to set
Remarks
Use start() and stop() methods to activate and deactivate the monitor

◆ setWatchDog()

void setWatchDog ( uint32_t value)

Set the monitor watchdog time (msec)

Parameters
valueThe value to set
Remarks
This parameter may be changed at any time but it's assumed only upon the monitor start() command

◆ setWriteClient()

void setWriteClient ( Client * value)
protected

Set the internal Client object setted when invoking Connection::getMonitor(Monitor *&) method.

Parameters
valueThe value to set
Remarks
This object is used for just for writing operation when the monitor is active()

◆ start()

Globals::Results start ( )

Starts the monitor.

Returns
Return the operation result code.

If the monitor is active() then it destroys the monitor on the device, and then creates the new one with the actual properties

If any error occurs , an error event will be fired

On successfull completition, the active() will be setted and the started event fired

◆ stop()

Globals::Results stop ( )

Stops the monitor.

Returns
Return the operation result code.

If the monitor is not active() then an error code is returned

If any error occurs , an error event will be fired

On successfull completition, the active() will be resetted and the stopped event fired

◆ watchDog()

uint32_t watchDog ( ) const

Get the monitor watchdog time (msec)

Returns
The parameter value
Remarks
This parameter may be changed at any time but it's assumed only upon the monitor start() command

◆ write()

Writes the monitor data to the device.

Parameters
dataThe storage filled by the caller with the monitor data to be written
Returns
Return the operation result code.

Example of general usage of the monitor write method:

const int numReg = 10;
const int numRegSets = 5;
Monitor* mon = nullptr;
// Get a valid monitor from a connection ..
...
// initialize the monitor
...
// suppose we want to read and write 5 set of 10 registers each
// so , add the monitor variables according to it
for (uint32_t regSetIdx = 0; regSetIdx < numRegSets; regSetIdx++)
{
uint32_t regIdx = 2000 + numReg * regSetIdx;
mon->add(Variable::fromVRR(regIdx, numReg));
}
// Now setup some variable to handle the data to be written by the monitor
// the data format must be consistent with the monitor definition , so we have to write
// 5 set of 10 registers each
Variable::Data::PtrVector* monWriteValuesRegSets[numRegSets];
for (int regSetIdx = 0; regSetIdx < numRegSets; regSetIdx++)
{
monWriteValuesRegSets[regSetIdx] = new Variable::Data::PtrVector();
for (int regIdx = 0; regIdx < numReg; regIdx++)
{
monWriteValuesRegSets[regSetIdx]->pushBack(new Variable::Data());
}
monWriteValues.pushBack(monWriteValuesRegSets[regSetIdx]);
}
MonitorStruct::WriteData monWriteData;
// Assign the values by reference: the array storage will be deleted on MonitorStruct::WriteData destruction
monWriteData.setValues(monWriteValues);
// Start the monitor
mon->start();
int numMainLoop = 0;
while (true)
{
for (int regSetIdx = 0; regSetIdx < numRegSets; regSetIdx++)
{
Variable::Data::PtrVector* regSet = monWriteValuesRegSets[regSetIdx];
for (int regIdx = 0; regIdx < numReg; regIdx++)
{
// Write some data : use your logic here ...
regSet->at(regIdx)->setDouble((double)(numMainLoop + regIdx + regSetIdx * numReg));
}
}
Globals::Results re = mon->write(monWriteData);
{
cout << "!!!!!! Failed to write monitor: errCode= " << (int)re << " (" << Globals::DecodeResult(res) << ")" << endl;
}
else
{
cout << "monitor write SUCCESS" << endl;
}
ThreadHandler::sleepMsec(10);
numMainLoop++;
}
The class to handle BCC protocol monitors.
Definition monitor.h:199
Globals::Results add(const Variable &var) override
Adds a variable to the monitor.
Globals::Results start()
Starts the monitor.
Globals::Results write(MonitorStruct::WriteData &data)
Writes the monitor data to the device.
Class to handle with lists of pointers to list of Data pointers.
Definition variable.h:220
void pushBack(const pPtrVector &value)
Appends the given element value to the end of the container.
Data * at(size_t n)
Returns a reference to the element at position n in the vector container.
void pushBack(const pData &value)
Appends the given element value to the end of the container.
void setDouble(double value)
Sets the value to the specified one and type to Types::dtDouble.

This operation will fails if the monitor state is not active(). If you need a monitor just for writing purposes you may setup the monitor at lowest data and event frequency and start() it without connecting to the dataChanged event.

◆ writeClient()

Client * writeClient ( ) const
protected

Get the internal Client object setted when invoking Connection::getMonitor(Monitor *&) method.

Returns
The parameter value
Remarks
This object is used for just for writing operation when the monitor is active()

◆ writeMsgCode()

Message::MsgCodes writeMsgCode ( )
overrideprotectedvirtual

Get the message code for the monitor write command.

Returns
The message code for the monitor write command

Implements BaseMonitor.

◆ writeMsgDataPrefix()

ByteVector * writeMsgDataPrefix ( )
overrideprotectedvirtual

Get a pointer to byte array containg data per for the write message.

Returns
The pointer to byte array

Implements BaseMonitor.

Friends And Related Symbol Documentation

◆ Connection

friend class Connection
friend

◆ Tool::EventDispatcherThread

friend class Tool::EventDispatcherThread
friend

◆ Tool::ThreadHandler

friend class Tool::ThreadHandler
friend

Member Data Documentation

◆ dataChanged

Signal2<uint64_t, uint32_t> dataChanged

Event fired when the monitor data has changed i.e. some new monitor data has been received.

Parameters
senderIdThis monitor identifier as return from id()
changeIdThe progressive Id of the data received from the connected device

◆ error

Signal2<uint64_t, RLibCpp::Bcc::MonitorStruct::ErrorData> error

Event fired when an error occurs during monitor operations.

Parameters
senderIdThis monitor identifier as return from id()
dataThe error data

◆ restarted

Signal2<uint64_t, uint32_t> restarted

Event fired when the monitor is successfully restarted.

The monitor is restarted and this event fired only if the autoRestart() property is setted

Parameters
senderIdThis monitor identifier as return from id()
activeDataFrequencyThe data frequency effectively assumed by the device

◆ started

Signal2<uint64_t, uint32_t> started

Event fired when the monitor is successfully started.

Parameters
senderIdThis monitor identifier as return from id()
activeDataFrequencyThe data frequency effectively assumed by the device

◆ stopped

Signal1<uint64_t> stopped

Event fired when the monitor is successfully stopped.

Parameters
senderIdThis monitor identifier as return from id()