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

Communication client declaration. More...

#include <connection.h>

Inheritance diagram for Connection:
TcpIpConnection

Classes

class  VariablesCache
 The class to handle variable caches. More...
 
class  VariablesCacheItem
 Class to handle an item in the variables cache. More...
 
class  VariablesDict
 The variable dictionay. More...
 

Public Member Functions

 Connection ()
 The constructor.
 
virtual ~Connection ()
 The destructor.
 
virtual bool active ()
 Get the activation state of the connection.
 
String vtxPath ()
 Get the VtxManager path.
 
void setVtxPath (const String &value)
 Set the VtxManager path.
 
virtual Globals::Results getClient (Client *&client)
 Obtain a new (default configured) communication client for the connection.
 
virtual Globals::Results getClient (Client *&client, int targetId, int targetCh, int sourceCh)
 Obtain a new communication client for the connection.
 
virtual Globals::Results releaseClient (Client *client)
 Release a communication client for the connection.
 
virtual Globals::Results start ()
 Start and activate the connection.
 
virtual Globals::Results stop ()
 Deactivate and stop the connection.
 
virtual Globals::Results getMonitor (Monitor *&monitor)
 Obtain a new (default configured) monitor for the connection.
 
virtual Globals::Results getMonitor (Monitor *&monitor, int targetId, int targetCh, int sourceCh)
 Obtain a new monitor for the connection.
 
virtual Globals::Results releaseMonitor (Monitor *monitor)
 Release a monitor for the connection.
 
virtual Globals::Results getOscilloscope (Oscilloscope *&oscilloscope)
 Obtain a new (default configured) oscilloscope for the connection.
 
virtual Globals::Results getOscilloscope (Oscilloscope *&oscilloscope, int targetId, int targetCh, int sourceCh)
 Obtain a new oscilloscope for the connection.
 
virtual Globals::Results releaseOscilloscope (Oscilloscope *oscilloscope)
 Release a oscilloscope for the connection.
 
uint32_t addToVarsCache (const String &name, const String &extraTag="")
 Adds a variable to the cache.
 
uint32_t findInVarsCache (const String &name, const String &extraTag="")
 Check if the variable of specified in name with extraTag is cached.
 
Globals::Results removeFromVarsCache (uint32_t cacheId)
 Removes the variable specified by cacheId from the cache.
 
void clearVarsCache ()
 Clears the variables' cache removing all the cached variables.
 
Globals::Results updateVarsCache ()
 Performs a refresh of the variables' cache if needed (i.e. reparses the cached variable from the variable dictionary)
 
bool existsInVarsCache (uint32_t cacheId)
 Check if the specified cacheId is a valid id stored into the variable cache.
 
Globals::Results dataTypeForCachedVar (uint32_t cacheId, Message::DataTypes &type)
 Get the data type for the specified cacheId stored into the variable cache.
 
Globals::Results testCachedVar (uint32_t cacheId)
 Check the integrity of the variable for the specified cacheId stored into the variable cache.
 
uint64_t id () const
 Get the object identifier.
 
Tool::ThreadHelper::ScheduleTypes scheduleType () const
 Get the schedule type for the connection.
 
void setScheduleType (Tool::ThreadHelper::ScheduleTypes value)
 Set the schedule type for the connection.
 
EventDispatcherThread * eventsThread () const
 Get the thread for event dispatching.
 

Public Attributes

Signal1< uint64_t > aboutToSynchronize
 Event fired when the connection ia about to be synchronized.
 
Signal2< uint64_t, RLibCpp::Bcc::Globals::ResultssynchronizeCompleted
 Event fired when the connection synchronizaztion has been completed.
 
Signal1< uint64_t > started
 Event fired when the connection has been started.
 
Signal1< uint64_t > stopped
 Event fired when the connection has been stopped.
 

Protected Member Functions

Globals::Results queryDeviceInfo (Client *client, bool force, bool &devInfoChanged)
 Retrives informations from connected device and stoes into the RVar::DevInfo property.
 
Globals::Results ensureSynchronized (Client *client, bool force, bool useCoherentValues)
 Make sure that the connection is synchronized and all structures updated.
 
void onAboutToSynchronize ()
 Wrapper to fire the AboutToSynchronize event.
 
void onSynchronizeCompleted (Globals::Results re)
 Wrapper to fire the synchronizeCompleted event.
 
void onStarted ()
 Wrapper to fire the started event.
 
void onStopped ()
 Wrapper to fire the stopped event.
 
Globals::Results parseVar (const String &name, RVar::Dict::VarData::PtrVector &varDataList, RVar::Dict::ParseFlags parseFlags=RVar::Dict::pfDefault)
 Wrapper for variable parsing.
 
Globals::Results parseVar (const String &name, uint32_t startMsgOffset, uint32_t msgOffset, RVar::Dict::VarData::PtrVector &varDataList, RVar::Index &srcIndex, RVar::Dict::ParseFlags parseFlags=RVar::Dict::pfDefault)
 Wrapper for variable parsing.
 
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.
 
void onEvent (const Event &event)
 Helper for firing the event of specified type.
 
virtual Globals::Results doStart ()=0
 Internal method to start the connection.
 
virtual Globals::Results doStop ()=0
 Internal method to stop the connection.
 
Globals::Results getVariablesCacheItem (Client *client, uint32_t cacheId, bool forceVarDictUpdate, bool useCoherentValues, bool checkFullVar, VariablesCacheItem *&vcache)
 Query a cached item given its ID.
 
Globals::Results getVariablesCacheItem (Client *client, uint32_t cacheId, bool forceVarDictUpdate, bool useCoherentValues, bool checkFullVar, uint32_t startMsgOffset, uint32_t splitOffset, VariablesCacheItem *&vcache)
 Query a cached item given its ID.
 
virtual Globals::Results doGetClient (Client *&client, int targetId, int targetCh, int sourceCh)=0
 Internal method to get the client.
 
virtual Globals::Results doReleaseClient (Client *client)=0
 Internal method to release the client.
 
void doDisposeCaches ()
 Internal method to dispose Monitor and Oscilloscope chaches on derived class destruction.
 
Monitor::PtrVectormonitorsCache ()
 Get the list of monitors created with the getMonitor(Monitor *&) or getMonitor(Monitor *&, int, int, int) methods and not jet released
 
Oscilloscope::PtrVectoroscilloscopesCache ()
 Get the list of oscilloscopes created with the getOscilloscope(Oscilloscope *&) or getOscilloscope(Oscilloscope *&, int32_t, int32_t, int32_t) methods and not jet released
 
RVar::DevInfo & devInfo ()
 Get the device information read from the connected device.
 
bool devInfoValid () const
 Get the to indicate if devInfo() contains valid information or has to be updated (read from the device)
 
void setEventsThread (EventDispatcherThread *value)
 Set the thread for event dispatching.
 

Protected Attributes

bool m_stoppedOnDispose
 Flags to indicate that che connection has been stopped after destruxtion.
 

Friends

class BaseMonitor
 
class Oscilloscope
 
class Client
 

Detailed Description

Communication client declaration.

Constructor & Destructor Documentation

◆ Connection()

The constructor.

This method creates the VtxManager object which relies on the current Globals::language() value to set up the proper localized vtx file, so make sure to have invoked the Globals::setLocale() method with proper values before create any Connection object

◆ ~Connection()

virtual ~Connection ( )
virtual

The destructor.

Member Function Documentation

◆ active()

virtual bool active ( )
virtual

Get the activation state of the connection.

Returns
The activation state of the connection.

Reimplemented in TcpIpConnection.

◆ addToVarsCache()

uint32_t addToVarsCache ( const String & name,
const String & extraTag = "" )

Adds a variable to the cache.

Parameters
nameThe name of the variable to add to the cache
extraTagThe optional extra data used in cache id calculation: you can set this to different values to force caching of distinct entries of the same variable
Returns
Returns the variable cache identifier or 0 if some error occurred

All successive operation onto the variable (Client.readVariable(ClientStruct::ReadVariableData &) , Client.writeVariable(ClientStruct::WriteVariableData &) etc) must refer to returned cache identifier

Variable naming convention must the same as RDE.

Using different extraTag values for the same name may be useful to maximize performance when accessing the same variable from Monitor, Client ( e.g. Client.readVariable(ClientStruct::ReadVariableData &), Client.writeVariable(ClientStruct::WriteVariableData &) , Monitor::read(MonitorStruct::ReadData &), etc) or Oscilloscope: in that cases, using different extraTag values (e.g. "MON", "CLIENT", "OSC" ) will force the caching of distinct entry , improving the overall performance

◆ clearVarsCache()

void clearVarsCache ( )

Clears the variables' cache removing all the cached variables.

◆ dataTypeForCachedVar()

Globals::Results dataTypeForCachedVar ( uint32_t cacheId,
Message::DataTypes & type )

Get the data type for the specified cacheId stored into the variable cache.

Parameters
cacheIdThe variable cache identifier to check
typeThe data type for the specified cacheId stored into the variable cache or Message::DataTypes::dtUndef if cacheId wasn't found into the cache
Returns
Returns Globals::resSuccess if the operation completed succesfully

◆ devInfo()

RVar::DevInfo & devInfo ( )
protected

Get the device information read from the connected device.

Returns
The parameter value

◆ devInfoValid()

bool devInfoValid ( ) const
protected

Get the to indicate if devInfo() contains valid information or has to be updated (read from the device)

Returns
The parameter value

◆ doDisposeCaches()

void doDisposeCaches ( )
protected

Internal method to dispose Monitor and Oscilloscope chaches on derived class destruction.

◆ doGetClient()

virtual Globals::Results doGetClient ( Client *& client,
int targetId,
int targetCh,
int sourceCh )
protectedpure virtual

Internal method to get the client.

Parameters
clientReference to the communication client.
targetIdRequired target ID.
targetChRequired target channel, when applicable (0=default).
sourceChRequired source channel, when applicable (-1=default).
Returns
Return the operation result code.

Implemented in TcpIpConnection.

◆ doInvokeEvent()

void doInvokeEvent ( const Event & event)
protected

The method that effectively invokes the event.

◆ doReleaseClient()

virtual Globals::Results doReleaseClient ( Client * client)
protectedpure virtual

Internal method to release the client.

Parameters
clientThe communication client to release.
Returns
Return the operation result code.

Implemented in TcpIpConnection.

◆ doStart()

virtual Globals::Results doStart ( )
protectedpure virtual

Internal method to start the connection.

Returns
Return the operation result code.

Implemented in TcpIpConnection.

◆ doStop()

virtual Globals::Results doStop ( )
protectedpure virtual

Internal method to stop the connection.

Returns
Return the operation result code.

Implemented in TcpIpConnection.

◆ ensureSynchronized()

Globals::Results ensureSynchronized ( Client * client,
bool force,
bool useCoherentValues )
protected

Make sure that the connection is synchronized and all structures updated.

Parameters
clientThe client to use for comunicate to the device.
forceFlag to force the dictionary update , otherwise the dictionary is updated only if devInfoValid() is false
useCoherentValuesFlag to indicate that coherent values operations are required
Returns
Returns Globals::resSuccess if the dictionary is still valid or successfully updated

If client is null, a temporary client will be used to perform the operation.

◆ eventsThread()

EventDispatcherThread * eventsThread ( ) const

Get the thread for event dispatching.

Returns
The parameter value

◆ existsInVarsCache()

bool existsInVarsCache ( uint32_t cacheId)

Check if the specified cacheId is a valid id stored into the variable cache.

Parameters
cacheIdThe variable cache identifier to check
Returns
True if the cacheId is a valid id stored into the variable cache

◆ findInVarsCache()

uint32_t findInVarsCache ( const String & name,
const String & extraTag = "" )

Check if the variable of specified in name with extraTag is cached.

Parameters
nameThe name of the variable to earch for
extraTagThe optional extra tag used in cache id calculation
See also
addToVarsCache(const String &, const String &)
Returns
Returns the variable cache identifier or 0 if some error occurred or variable not cached

The search is case insensitive: leading and traling whites char are trimmed.

◆ getClient() [1/2]

virtual Globals::Results getClient ( Client *& client)
virtual

Obtain a new (default configured) communication client for the connection.

Parameters
clientReference to the communication client.
Returns
Return the operation result code.
Connection* connection;
// ... setup the connection object using your logic here ....
Client* client;
if (connection->getClient(client) == Globals::resSuccess)
{
// ... do desired communication ...
connection->releaseClient(client);
}
Communication client declaration.
Definition client.h:4639
Communication client declaration.
Definition connection.h:48
virtual Globals::Results getClient(Client *&client)
Obtain a new (default configured) communication client for the connection.
virtual Globals::Results releaseClient(Client *client)
Release a communication client for the connection.
@ resSuccess
The operation completed successfully.
Definition globals.h:39

In case you need more clients and you run out of them in this connection, you can instantiate a second connection for managing an additional set of clients.

See also
Client

◆ getClient() [2/2]

virtual Globals::Results getClient ( Client *& client,
int targetId,
int targetCh,
int sourceCh )
virtual

Obtain a new communication client for the connection.

Parameters
clientReference to the communication client.
targetIdRequired target ID.
targetChRequired target channel, when applicable (0=default).
sourceChRequired source channel, when applicable (-1=default).
Returns
Return the operation result code.
Connection* connection;
// ... setup the connection object using your logic here ....
Client* client;
if (connection->getClient(client, 1, 0, -1) == Globals::resSuccess)
{
// ... do desired communication ...
connection->releaseClient(client);
}
See also
Client

◆ getMonitor() [1/2]

virtual Globals::Results getMonitor ( Monitor *& monitor)
virtual

Obtain a new (default configured) monitor for the connection.

Parameters
monitorReference to the monitor.
Returns
Return the operation result code.
Connection* connection;
// ... setup the connection object using your logic here ....
Monitor* monitor;
if (connection->getMonitor(monitor) == Globals::resSuccess)
{
// ... do desired communication ...
connection->releaseMonitor(monitor);
}
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.
The class to handle BCC protocol monitors.
Definition monitor.h:199

In case you need more monitor and you run out of them in this connection, you can instantiate a second connection for managing an additional set of monitors.

See also
Monitor

◆ getMonitor() [2/2]

virtual Globals::Results getMonitor ( Monitor *& monitor,
int targetId,
int targetCh,
int sourceCh )
virtual

Obtain a new monitor for the connection.

Parameters
monitorReference to the monitor.
targetIdRequired target ID.
targetChRequired target channel, when applicable (0=default).
sourceChRequired source channel, when applicable (-1=default).
Returns
Return the operation result code.
Connection* connection;
// ... setup the connection object using your logic here ....
Monitor* monitor;
if (connection->getMonitor(monitor, 1, 0, -1) == Globals::resSuccess)
{
// ... do desired communication ...
connection->releaseMonitor(monitor);
}

In case you need more monitor and you run out of them in this connection, you can instantiate a second connection for managing an additional set of monitors.

See also
Monitor

◆ getOscilloscope() [1/2]

virtual Globals::Results getOscilloscope ( Oscilloscope *& oscilloscope)
virtual

Obtain a new (default configured) oscilloscope for the connection.

Parameters
oscilloscopeReference to the oscilloscope.
Returns
Return the operation result code.
Connection* connection;
// ... setup the connection object using your logic here ....
Oscilloscope* oscilloscope;
if (connection->getOscilloscope(oscilloscope) == Globals::resSuccess)
{
// ... do desired communication ...
connection->releaseOscilloscope(oscilloscope);
}
virtual Globals::Results releaseOscilloscope(Oscilloscope *oscilloscope)
Release a oscilloscope for the connection.
virtual Globals::Results getOscilloscope(Oscilloscope *&oscilloscope)
Obtain a new (default configured) oscilloscope for the connection.
The class to handle BCC protocol oscilloscopes.
Definition oscilloscope.h:853

In case you need more oscilloscope and you run out of them in this connection, you can instantiate a second connection for managing an additional set of oscilloscopes.

See also
Oscilloscope

◆ getOscilloscope() [2/2]

virtual Globals::Results getOscilloscope ( Oscilloscope *& oscilloscope,
int targetId,
int targetCh,
int sourceCh )
virtual

Obtain a new oscilloscope for the connection.

Parameters
oscilloscopeReference to the oscilloscope.
targetIdRequired target ID.
targetChRequired target channel, when applicable (0=default).
sourceChRequired source channel, when applicable (-1=default).
Returns
Return the operation result code.
Connection* connection;
// ... setup the connection object using your logic here ....
Oscilloscope* oscilloscope;
if (connection->getOscilloscope(oscilloscope, 1, 0, -1) == Globals::resSuccess)
{
// ... do desired communication ...
connection->releaseOscilloscope(oscilloscope);
}

In case you need more oscilloscope and you run out of them in this connection, you can instantiate a second connection for managing an additional set of oscilloscopes.

See also
Oscilloscope

◆ getVariablesCacheItem() [1/2]

Globals::Results getVariablesCacheItem ( Client * client,
uint32_t cacheId,
bool forceVarDictUpdate,
bool useCoherentValues,
bool checkFullVar,
uint32_t startMsgOffset,
uint32_t splitOffset,
VariablesCacheItem *& vcache )
protected

Query a cached item given its ID.

Parameters
clientThe client to use for comunicate to the device.
cacheIdThe Id of the variable into the cache
forceVarDictUpdateFlag to force the update of the variable dictionary
useCoherentValuesFlag to use coherent values operations
checkFullVarFlag to enable the variable full check when parsing
startMsgOffsetMessage offset to be used on new var
splitOffsetOffset to be applyed to the to the parsing variable logic to properly split the variable. Thats applies when a variable has to be fitted into a BCC message which contains other data (tipcally when using monitors)
vcacheThe cache object , or null if some error occurred
Returns
Return the operation result code.

If client is null, a temporary client will be used to perform the operation.

◆ getVariablesCacheItem() [2/2]

Globals::Results getVariablesCacheItem ( Client * client,
uint32_t cacheId,
bool forceVarDictUpdate,
bool useCoherentValues,
bool checkFullVar,
VariablesCacheItem *& vcache )
protected

Query a cached item given its ID.

Parameters
clientThe client to use for comunicate to the device.
cacheIdThe Id of the variable into the cache
forceVarDictUpdateFlag to force the update of the variable dictionary
useCoherentValuesFlag to use coherent values operations
checkFullVarFlag to enable the variable full check when parsing
vcacheThe cache object , or null if some error occurred
Returns
Return the operation result code.

If client is null, a temporary client will be used to perform the operation.

◆ id()

uint64_t id ( ) const

Get the object identifier.

Returns
The object identifier

◆ invoke()

void invoke ( long tagData)
overrideprotected

The method to be invoked for event dispatch.

◆ monitorsCache()

Monitor::PtrVector & monitorsCache ( )
protected

Get the list of monitors created with the getMonitor(Monitor *&) or getMonitor(Monitor *&, int, int, int) methods and not jet released

Returns
The parameter value

◆ onAboutToSynchronize()

void onAboutToSynchronize ( )
protected

Wrapper to fire the AboutToSynchronize event.

◆ onEvent()

void onEvent ( const Event & event)
protected

Helper for firing the event of specified type.

Parameters
eventThe event to send

◆ onStarted()

void onStarted ( )
protected

Wrapper to fire the started event.

◆ onStopped()

void onStopped ( )
protected

Wrapper to fire the stopped event.

◆ onSynchronizeCompleted()

void onSynchronizeCompleted ( Globals::Results re)
protected

Wrapper to fire the synchronizeCompleted event.

Parameters
reThe result code of the update operation

◆ oscilloscopesCache()

Oscilloscope::PtrVector & oscilloscopesCache ( )
protected

Get the list of oscilloscopes created with the getOscilloscope(Oscilloscope *&) or getOscilloscope(Oscilloscope *&, int32_t, int32_t, int32_t) methods and not jet released

Returns
The parameter value

◆ parseVar() [1/2]

Globals::Results parseVar ( const String & name,
RVar::Dict::VarData::PtrVector & varDataList,
RVar::Dict::ParseFlags parseFlags = RVar::Dict::pfDefault )
protected

Wrapper for variable parsing.

Parameters
nameName of the variable
varDataListThe returned list of RVar::Dict::VarData
parseFlagsParsing flags (RVar::Dict::ParseFlags). Optional : default value is RVar::Dict::pfDefault
Returns
Return the operation result code.

◆ parseVar() [2/2]

Globals::Results parseVar ( const String & name,
uint32_t startMsgOffset,
uint32_t msgOffset,
RVar::Dict::VarData::PtrVector & varDataList,
RVar::Index & srcIndex,
RVar::Dict::ParseFlags parseFlags = RVar::Dict::pfDefault )
protected

Wrapper for variable parsing.

Parameters
nameName of the variable
startMsgOffsetMessage offset to be used on new var
msgOffsetMessage offset for the first var
varDataListThe returned list of RVar::Dict::VarData
srcIndexThe returned source indes RVar::Index
parseFlagsParsing flags (RVar::Dict::ParseFlags). Optional : default value is RVar::Dict::pfDefault
Returns
Return the operation result code.

◆ queryDeviceInfo()

Globals::Results queryDeviceInfo ( Client * client,
bool force,
bool & devInfoChanged )
protected

Retrives informations from connected device and stoes into the RVar::DevInfo property.

Parameters
clientThe client to use for comunicate to the device.
forceFlag to force device info data read: if resetted the device will be queried only if devInfoValid() is false
devInfoChangedFlag setted if the device informations has been changed since last read (the value stored into the RVar::DevInfo property)
Returns
Returns Globals::resSuccess if the operation was successfully completed

If client is null, a temporary client will be used to perform the operation.

◆ releaseClient()

virtual Globals::Results releaseClient ( Client * client)
virtual

Release a communication client for the connection.

Parameters
clientThe communication client to release.
Returns
Return the operation result code.
Connection* connection;
// ... setup the connection object using your logic here ....
Client* client;
if (connection->getClient(client) == Globals::resSuccess)
{
// ... do desired communication ...
connection->releaseClient(client);
}

It is best practise to explictly release the client or dispose when done with the client. Otherwise it will be released when the object is destroyed.

◆ releaseMonitor()

virtual Globals::Results releaseMonitor ( Monitor * monitor)
virtual

Release a monitor for the connection.

Parameters
monitorThe monitor to release.
Returns
Return the operation result code.
Connection* connection;
// ... setup the connection object using your logic here ....
Monitor* monitor;
if (connection->getMonitor(monitor) == Globals::resSuccess)
{
// ... do desired communication ...
connection->releaseMonitor(monitor);
}

It is best practise to explictly release the monitor or dispose when done with the client. Otherwise it will be released when the object is destroyed.

See also
Monitor

◆ releaseOscilloscope()

virtual Globals::Results releaseOscilloscope ( Oscilloscope * oscilloscope)
virtual

Release a oscilloscope for the connection.

Parameters
oscilloscopeThe oscilloscope to release.
Returns
Return the operation result code.
Connection* connection;
// ... setup the connection object using your logic here ....
Oscilloscope* oscilloscope;
if (connection->getOscilloscope(oscilloscope) == Globals::resSuccess)
{
// ... do desired communication ...
connection->releaseOscilloscope(oscilloscope);
}

It is best practise to explictly release the oscilloscope or dispose when done with the client. Otherwise it will be released when the object is destroyed.

See also
Oscilloscope

◆ removeFromVarsCache()

Globals::Results removeFromVarsCache ( uint32_t cacheId)

Removes the variable specified by cacheId from the cache.

Parameters
cacheIdThe cache identifier to remove
Returns
Returns Globals::resSuccess if the cacheId was found and succesfully removed from cache

◆ scheduleType()

Tool::ThreadHelper::ScheduleTypes scheduleType ( ) const

Get the schedule type for the connection.

Returns
The parameter value
Remarks
You can change the schedule type when the connection is active, but it will not be assumed until the connection is restarted.
Set the scheduling type as scheduleTypeFast or scheduleTypeAggressive may have side effects on the PC, such as increased frequency of scheduler and/or increase the activity of the processor and battery consumption, etc.

◆ setEventsThread()

void setEventsThread ( EventDispatcherThread * value)
protected

Set the thread for event dispatching.

Returns
The value to set

◆ setScheduleType()

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

Set the schedule type for the connection.

Parameters
valueThe value to set
Remarks
You can change the schedule type when the connection is active, but it will not be assumed until the connection is restarted.
Set the scheduling type as scheduleTypeFast or scheduleTypeAggressive may have side effects on the PC, such as increased frequency of scheduler and/or increase the activity of the processor and battery consumption, etc.

◆ setVtxPath()

void setVtxPath ( const String & value)

Set the VtxManager path.

Parameters
valueThe value to set

◆ start()

virtual Globals::Results start ( )
virtual

Start and activate the connection.

Returns
Return the operation result code.
Connection* connection;
// ... setup the connection object using your logic here ....
if (connection->start() == Globals::resSuccess)
{
// ... do desired communication ...
connection->stop();
}
virtual Globals::Results start()
Start and activate the connection.
virtual Globals::Results stop()
Deactivate and stop the connection.

◆ stop()

virtual Globals::Results stop ( )
virtual

Deactivate and stop the connection.

Returns
Return the operation result code.
Connection* connection;
// ... setup the connection object using your logic here ....
if (connection->start() == Globals::resSuccess)
{
// ... do desired communication ...
connection->stop();
}

◆ testCachedVar()

Globals::Results testCachedVar ( uint32_t cacheId)

Check the integrity of the variable for the specified cacheId stored into the variable cache.

Parameters
cacheIdThe variable cache identifier to check
Returns
Returns Globals::resSuccess if the operation completed succesfully

◆ updateVarsCache()

Globals::Results updateVarsCache ( )

Performs a refresh of the variables' cache if needed (i.e. reparses the cached variable from the variable dictionary)

Returns
Returns Globals::resSuccess if the operation completed succesfully

◆ vtxPath()

String vtxPath ( )

Get the VtxManager path.

Returns
The VtxManager path

The default assigned value is "../etc/vtx" relative to the executing assembly path

Friends And Related Symbol Documentation

◆ BaseMonitor

friend class BaseMonitor
friend

◆ Client

friend class Client
friend

◆ Oscilloscope

friend class Oscilloscope
friend

Member Data Documentation

◆ aboutToSynchronize

Signal1<uint64_t> aboutToSynchronize

Event fired when the connection ia about to be synchronized.

Parameters
senderIdThis objetc identifier

◆ m_stoppedOnDispose

bool m_stoppedOnDispose
protected

Flags to indicate that che connection has been stopped after destruxtion.

◆ started

Signal1<uint64_t> started

Event fired when the connection has been started.

Parameters
senderIdThis objetc identifier

◆ stopped

Signal1<uint64_t> stopped

Event fired when the connection has been stopped.

Parameters
senderIdThis objetc identifier

◆ synchronizeCompleted

Signal2<uint64_t, RLibCpp::Bcc::Globals::Results> synchronizeCompleted

Event fired when the connection synchronizaztion has been completed.

Parameters
senderIdThis objetc identifier
reThe operation result code