The connection class for the BCC protocol with the standard single socket TCP/IP transport.
More...
|
| TcpIpConnection () |
| Class constructor.
|
|
virtual | ~TcpIpConnection () |
| Class destructor.
|
|
bool | active () override |
| The activation state of the connection.
|
|
bool | connected () |
| The state of the underlying TCP socket connection.
|
|
String & | serverIp () |
| Get the server IP destination address to which you want to connect.
|
|
void | setServerIp (const String &value) |
| Set the server IP destination address to which you want to connect.
|
|
int | serverPort () const |
| Get the server TCP port to which you want to connect (1-65535).
|
|
void | setServerPort (int value) |
| Set the server TCP port to which you want to connect (1-65535).
|
|
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.
|
|
| Connection () |
| The constructor.
|
|
virtual | ~Connection () |
| The destructor.
|
|
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.
|
|
|
Globals::Results | doGetClient (Client *&client, int targetId, int targetCh, int sourceCh) override |
| Obtain a new communication client for the connection.
|
|
Globals::Results | doReleaseClient (Client *client) override |
| Release a communication client for the connection.
|
|
Globals::Results | doStart () override |
| Start and activate the connection.
|
|
Globals::Results | doStop () override |
| Deactivate and stop the connection.
|
|
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.
|
|
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.
|
|
void | doDisposeCaches () |
| Internal method to dispose Monitor and Oscilloscope chaches on derived class destruction.
|
|
Monitor::PtrVector & | monitorsCache () |
| Get the list of monitors created with the getMonitor(Monitor *&) or getMonitor(Monitor *&, int, int, int) methods and not jet released
|
|
Oscilloscope::PtrVector & | oscilloscopesCache () |
| 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.
|
|
The connection class for the BCC protocol with the standard single socket TCP/IP transport.
Example of connecting to a Robox device with a TCP single socket connection.
{
{
}
}
Communication client declaration.
Definition client.h:4639
virtual Globals::Results command(Message *cmd, Message *asw, ClientStruct::OperationData *data)
Execute a generic command sequence on the connected device.
virtual Globals::Results start()
Start and activate the connection.
virtual Globals::Results getClient(Client *&client)
Obtain a new (default configured) communication client for the connection.
virtual Globals::Results stop()
Deactivate and stop the connection.
virtual Globals::Results releaseClient(Client *client)
Release a communication client for the connection.
@ resSuccess
The operation completed successfully.
Definition globals.h:39
The connection class for the BCC protocol with the standard single socket TCP/IP transport.
Definition tcpipconnection.h:70
void setServerIp(const String &value)
Set the server IP destination address to which you want to connect.
void setServerPort(int value)
Set the server TCP port to which you want to connect (1-65535).
This type of connection use a single TCP socket, regardless of the number of clients obtained.
In case you need more clients and you run out of them in the first connection, you can instantiate a second connection managing an additional set of clients: in this case, the second connection will use a different (and indipendent) TCP socket.
- See also
- Client