Robox Library for Cpp: BCC/31 module 1.0.0
RLibCpp BCC/31 protocol implementation
|
Communication client declaration. More...
#include <client.h>
Public Member Functions | |
Globals::Results | abort () |
Abort the current operation. | |
virtual Globals::Results | pushIn (Message *msg) |
Emulate a message reception from the connected device. | |
virtual Globals::Results | popIn (Message *msg) |
Receive a message from the connected device. | |
virtual Globals::Results | pushOut (Message *msg) |
Send the message to the connected device. | |
virtual Globals::Results | popOut (Message *msg) |
Remove the first message sent to the connected device but not yet started (still present in the client outgoing queue). | |
virtual Globals::Results | flushMessages () |
Flush messages in the client ingoing queue. | |
virtual Globals::Results | command (Message *cmd, Message *asw, ClientStruct::OperationData *data) |
Execute a generic command sequence on the connected device. | |
Globals::Results | replyBusy (Message *src) |
Reply with a BUSY message to the source message. | |
Globals::Results | replyMsg (Message *src, Message::MsgCodes msgCode, void *data, uint8_t len=0) |
Reply with a generic message to the source message. | |
Globals::Results | ping (ClientStruct::PingData &data) |
Execute a ping sequence on the connected device. | |
void | fillSystemInfoData (Message &msg, ClientStruct::SystemInfoData &data) |
Fill the SysInfoData data structure from the content of the Message msg. | |
Globals::Results | systemInfo (ClientStruct::SystemInfoData &data) |
Get the system information from the connected device. | |
Globals::Results | downloadSequence (ClientStruct::DownloadSequenceData &data) |
Execute a generic download sequence on the connected device. | |
Globals::Results | dataSaveSequence (ClientStruct::DataSaveSequenceData &data) |
Execute a generic data save sequence from on the connected device. | |
Globals::Results | dataLoadSequence (ClientStruct::DataLoadSequenceData &data) |
Execute a generic data load sequence to the connected device. | |
Globals::Results | flashDir (ClientStruct::FlashDirData &data) |
Get the content of the flash on the conencted device. | |
Globals::Results | flashFileLoad (ClientStruct::FlashFileLoadData &data) |
Load a file to the flash of the connected device. | |
Globals::Results | flashFileSave (ClientStruct::FlashFileSaveData &data) |
Save a file from the flash of the connected device. | |
Globals::Results | flashFileDelete (ClientStruct::FlashFileDeleteData &data) |
Delete files from the flash of the connected device. | |
Globals::Results | flashFileRename (ClientStruct::FlashFileRenameData &data) |
Rename a file in the flash of the connected device. | |
Globals::Results | flashFileInfo (ClientStruct::FlashFileInfoData &data) |
Get information for a file in the flash of the connected device. | |
Globals::Results | flashFormat (ClientStruct::FlashFormatData &data) |
Format a flash of the connecte device. | |
Globals::Results | flashFolderCreate (ClientStruct::FlashFolderCreateData &data) |
Create a folder in the flash of the connected device. | |
Globals::Results | flashFolderDelete (ClientStruct::FlashFolderDeleteData &data) |
Delete a folder in the flash of the connected device. | |
Globals::Results | flashFolderInfo (ClientStruct::FlashFolderInfoData &data) |
Get information for a folder in the flash of the connected device. | |
Globals::Results | flashDiskCreate (ClientStruct::FlashDiskCreateData &data) |
Create a flash in the physical storage of the connected device. | |
Globals::Results | flashDiskDelete (ClientStruct::FlashDiskDeleteData &data) |
Delete a flash form the physical storage of the connected device. | |
Globals::Results | flashDiskBackup (ClientStruct::FlashDiskBackpupData &data) |
Backup a flash content to the backup area of the connected device. | |
Globals::Results | flashDiskRestore (ClientStruct::FlashDiskRestoreData &data) |
Restore a flash content from the backup area of the connected device. | |
Globals::Results | flashSetAttributes (ClientStruct::FlashSetAttributesData &data) |
Sets attributes for flash's objects (files/folders) | |
Globals::Results | readVariable (ClientStruct::ReadVariableData &data) |
Read variable values from the connected device. | |
Globals::Results | writeVariable (ClientStruct::WriteVariableData &data) |
Write variable values to the connected device. | |
Globals::Results | forceVariable (ClientStruct::ForceVariableData &data) |
Force variable values on the connected device. | |
Globals::Results | releaseVariable (ClientStruct::ReleaseVariableData &data) |
Release variable values on the connected device. | |
Globals::Results | releaseAllVariables (ClientStruct::ReleaseAllVariablesData &data) |
Release all variables value on the connected device. | |
Globals::Results | alarmStackInfo (ClientStruct::AlarmStackInfoData &data) |
Get information about the alarm stack. | |
Globals::Results | alarmStackGet (ClientStruct::AlarmStackGetData &data) |
Get a single item from the alarm stack. | |
Globals::Results | alarmStackList (ClientStruct::AlarmStackListData &data) |
Get the list of alarms in the stack. | |
Globals::Results | alarmStackClear (ClientStruct::AlarmStackClearData &data) |
Clear alarm at index from the stack. | |
Globals::Results | alarmStackClearAll (ClientStruct::AlarmStackClearAllData &data) |
Clear all alarms from the stack. | |
Globals::Results | alarmStackClearSpec (ClientStruct::AlarmStackClearSpecData &data) |
Clear specific alarm from the stack. | |
Globals::Results | alarmHistoryInfo (ClientStruct::AlarmHistoryInfoData &data) |
Get information on alarm history. | |
Globals::Results | alarmHistoryList (ClientStruct::AlarmHistoryListData &data) |
Get alarm history list. | |
Globals::Results | alarmHistoryClear (ClientStruct::AlarmHistoryClearData &data) |
Clear alarm history. | |
Globals::Results | canObjRead (ClientStruct::CanObjReadData &data) |
Read CANopen object value. | |
Globals::Results | canObjWrite (ClientStruct::CanObjWriteData &data) |
Write CANopen object value. | |
Globals::Results | canNmtRead (ClientStruct::CanNmtReadData &data) |
Read CANopen NMT status. | |
Globals::Results | canNmtWrite (ClientStruct::CanNmtWriteData &data) |
Write CANopen NMT status. | |
Globals::Results | canEmcyRead (ClientStruct::CanEmcyReadData &data) |
Read CANopen emergency. | |
Globals::Results | canRbxChDiag (ClientStruct::CanRbxChDiagData &data) |
Read Robox diagnostic for CANopen's channel. | |
Globals::Results | canRbxWsDiag (ClientStruct::CanRbxWsDiagData &data) |
Read Robox diagnostic for CANopen's workstation. | |
Globals::Results | canRxPdoRead (ClientStruct::CanPdoReadData &data) |
Read Rx PDO data for CANopen's workstation. | |
Globals::Results | canTxPdoRead (ClientStruct::CanPdoReadData &data) |
Read Tx PDO data for CANopen's workstation. | |
Globals::Results | canC402Info (ClientStruct::CanC402InfoData &data) |
Read CAN402 information for CANopen's workstation. | |
Globals::Results | reportInfo (ClientStruct::ReportInfoData &data) |
Read information for user report. | |
Globals::Results | reportList (ClientStruct::ReportListData &data) |
Read list for user report. | |
Globals::Results | reportClear (ClientStruct::ReportClearData &data) |
Clear user report. | |
Globals::Results | reportSetMode (ClientStruct::ReportSetModeData &data) |
Set mode for user report. | |
Globals::Results | sysReportInfo (ClientStruct::SysReportInfoData &data) |
Read information for system report. | |
Globals::Results | sysReportList (ClientStruct::SysReportListData &data) |
Read list for system report. | |
Globals::Results | sysReportClear (ClientStruct::SysReportClearData &data) |
Clear system report. | |
Globals::Results | sysReportSetMode (ClientStruct::SysReportSetModeData &data) |
Set mode for system report. | |
Globals::Results | fbReadLocalEntry (ClientStruct::FbEntryData &data) |
Read entry from fieldbus local interface. | |
Globals::Results | fbWriteLocalEntry (ClientStruct::FbEntryData &data) |
Write to from fieldbus local interface. | |
Globals::Results | fbReadLocalNmt (ClientStruct::FbReadNmtData &data) |
Read NMT from fieldbus local interface. | |
Globals::Results | fbWriteLocalNmt (ClientStruct::FbWriteNmtData &data) |
Write NMT to fieldbus local interface. | |
Globals::Results | fbReadCoeEntry (ClientStruct::FbEntryData &data) |
Read entry from fieldbus EtherCAT (CoE) interface. | |
Globals::Results | fbWriteCoeEntry (ClientStruct::FbEntryData &data) |
Write to from fieldbus local interface. | |
Globals::Results | fbReadEcatNmt (ClientStruct::FbReadEcatNmtData &data) |
Read NMT from fieldbus EtherCAT interface. | |
Globals::Results | fbWriteEcatNmt (ClientStruct::FbWriteEcatNmtData &data) |
Write NMT from fieldbus EtherCAT interface. | |
Globals::Results | fbReadCanEntry (ClientStruct::FbEntryData &data) |
Read entry from fieldbus CANopen interface. | |
Globals::Results | fbWriteCanEntry (ClientStruct::FbEntryData &data) |
Write to from fieldbus CANopen interface. | |
Globals::Results | fbReadCanNmt (ClientStruct::FbReadNmtData &data) |
Read NMT from fieldbus CANopen interface. | |
Globals::Results | fbWriteCanNmt (ClientStruct::FbWriteNmtData &data) |
Write NMT to fieldbus CANopen interface. | |
Globals::Results | fbReadIf (ClientStruct::FbReadIfData &data) |
Read fieldbus interface. | |
Globals::Results | fbWriteIf (ClientStruct::FbWriteIfData &data) |
Write fieldbus interface. | |
Globals::Results | fbLoadFirmware (ClientStruct::FbLoadFirmwareData &data) |
load firmware file for fieldbus | |
int | txNumBlock (ClientStruct::OperationData *data=nullptr) |
Query the data interlocking value (trasmission) | |
virtual bool | connected () |
The client connection state. | |
virtual bool | reconnecting () |
The client reconnection state. | |
uint64_t | id () const |
Get the object identifier. | |
Connection * | connection () const |
Get the Connection object. | |
void | setConnection (Connection *value) |
Set the Connection object. | |
virtual uint8_t | targetId () |
Get the client target identifier. | |
virtual void | setTargetId (uint8_t value) |
Set the client target identifier. | |
virtual uint8_t | targetCh () |
Get the client target channel. | |
virtual void | setTargetCh (uint8_t value) |
Set the client target channel. | |
virtual uint8_t | sourceId () |
Get the client source identifier. | |
virtual void | setSourceId (uint8_t value) |
Set the client source identifier. | |
virtual uint8_t | sourceCh () |
Get the client source channel. | |
virtual void | setSourceCh (uint8_t value) |
Set the client source channel. | |
int | maxCmdTimeout () const |
Get the maximum generic command timeout [ms]. | |
void | setMaxCmdTimeout (int value) |
Set the maximum generic command timeout [ms]. | |
int | maxWaitTimeout () const |
Get the maximum generic wait timeout [ms]. | |
void | setMaxWaitTimeout (int value) |
Set the maximum generic wait timeout [ms]. | |
Protected Member Functions | |
Client () | |
Class constructor. | |
virtual | ~Client () |
Class destructor. | |
virtual bool | doGetIBInfo (int &ibTx, int &ibRx, ClientStruct::OperationData &data) |
Query informations for the data interlocking. | |
uint8_t | nextCommandPid () |
Get the next command Pid. | |
Globals::Results | checkSafeVarAvailability (ClientStruct::SafeModes safeMode, bool &useSafeVar) |
Helper method to check if we can use safe variable operations. | |
Globals::Results | doQueryDeviceInfo () |
Retrieves informations from connected device. | |
Globals::Results | doReadStdVar (ClientStruct::ReadVariableData &data) |
Helper to read a standard variable. | |
Globals::Results | doReadStringVar (ClientStruct::ReadVariableData &data) |
Helper to read a string variable. | |
Globals::Results | doReadChVar (ClientStruct::ReadVariableData &data) |
Helper to read a channel variable. | |
Globals::Results | doReadAxisVar (ClientStruct::ReadVariableData &data) |
Helper to read an axis variable. | |
Globals::Results | doReadBitVar (ClientStruct::ReadVariableData &data) |
Helper to read an bit variable. | |
Globals::Results | doReadCachedVar (ClientStruct::ReadVariableData &data) |
Helper to read the values of a cached variable. | |
Globals::Results | doReadNamedVar (ClientStruct::ReadVariableData &data) |
Helper to read variable values from the connected device by specified data.Var.Name. | |
Globals::Results | doGetDataFromReadVar (Message &asw, const RVar::Base &var, const RVar::Index &index, Variable::Data::Vector &values) |
Helper to parse data stored into the asw message and fills the values list. | |
bool | canForceOrReleaseVariable (Protocol::VarTypes type) |
Helper to check if the specified variable type can be forced or released. | |
Globals::Results | doWriteVariable (ClientStruct::BaseWriteVariableData &data, bool force, bool coherentValues) |
Helper method to write or force a variable. | |
Globals::Results | doWriteStdVar (ClientStruct::BaseWriteVariableData &data, bool force, bool coherentValues) |
Helper to write or force a standard variable. | |
Globals::Results | doSetDataToWriteVar (Message &msg, bool useSafeVar, RVar::Dict::VarData &varData, Variable::Data::Vector &values, int &valOffset) |
Helper to fill the msg with values from values | |
Globals::Results | doWriteStringVar (ClientStruct::BaseWriteVariableData &data, bool force, bool coherentValues) |
Helper to write or force a string variable. | |
Globals::Results | doWriteChVar (ClientStruct::BaseWriteVariableData &data, bool force, bool coherentValues) |
Helper to write or force a channel variable. | |
Globals::Results | doWriteAxisVar (ClientStruct::BaseWriteVariableData &data, bool force, bool coherentValues) |
Helper to write or force an axis variable. | |
Globals::Results | doWriteBitVar (ClientStruct::BaseWriteVariableData &data, bool force, bool coherentValues) |
Helper to write a bit variable. | |
Globals::Results | doWriteNamedVar (ClientStruct::BaseWriteVariableData &data, bool force, bool coherentValues) |
Helper to write or force variable values to the connected device by specified data.Var.Name. | |
Globals::Results | doWriteCachedVar (ClientStruct::BaseWriteVariableData &data, bool force, bool coherentValues) |
Helper to write or force the values to a cached variable. | |
Globals::Results | doReleaseStdVar (ClientStruct::ReleaseVariableData &data) |
Helper to release a standard variable. | |
Globals::Results | doReleaseVarByName (ClientStruct::ReleaseVariableData &data) |
Helper to release a variable from the connected device specified by data.Name. | |
Globals::Results | doReleaseCachedVar (ClientStruct::ReleaseVariableData &data) |
Helper to release a cached variable. | |
Globals::Results | doReleaseChVar (ClientStruct::ReleaseVariableData &data) |
Helper to release a channel variable. | |
Globals::Results | doReleaseAxisVar (ClientStruct::ReleaseVariableData &data) |
Helper to release an axis variable. | |
Globals::Results | doReleaseBitVar (ClientStruct::ReleaseVariableData &data) |
Helper to release an bit variable. | |
Globals::Results | doCanPdoRead (ClientStruct::CanPdoReadData &data, bool isTx) |
Read Tx/Rx PDO data for CANopen's workstation. | |
Globals::Results | doFbReadEntry (ClientStruct::FbEntryData &data, Message::MsgCodes msgCode) |
Helper for reading fieldbus entry. | |
Globals::Results | doFbWriteEntry (ClientStruct::FbEntryData &data, Message::MsgCodes msgCode) |
Helper for writing fieldbus entry. | |
Globals::Results | doFbReadNmt (ClientStruct::FbReadNmtData &data, Message::MsgCodes msgCode) |
Helper for reading fieldbus Nmt. | |
Globals::Results | doFbWriteNmt (ClientStruct::FbWriteNmtData &data, Message::MsgCodes msgCode) |
Helper for writing fieldbus Nmt. | |
Globals::Results | doFlashFileLoad (ClientStruct::FlashFileLoadData &data) |
Load a file to the flash of the connected device. | |
bool | abortRequest () const |
Get the flag to abort operation. | |
void | setAbortRequest (bool value) |
Set the flag to abort operation. | |
LocalClientLink * | localLink () const |
Get the LocalClientLink object. | |
void | setLocalLink (LocalClientLink *value) |
Set the LocalClientLink object. | |
MessageQueue * | outQueue () const |
Get the outgoing message queue. | |
void | setOutQueue (MessageQueue *value) |
Set the outgoing message queue. | |
Protected Attributes | |
std::recursive_timed_mutex | m_pidLock |
Object to lock the m_commandPid when generating the next pid value | |
uint8_t | m_commandPid |
Command protocol Id. | |
Friends | |
class | Connection |
class | TcpIpConnection |
class | Monitor |
class | Oscilloscope |
class | LocalClientLink |
Communication client declaration.
|
protected |
Class constructor.
|
protectedvirtual |
Class destructor.
Globals::Results abort | ( | ) |
Abort the current operation.
This method is non blocking and returns immediatly without waiting for the effective operation abort.
|
protected |
Get the flag to abort operation.
Globals::Results alarmHistoryClear | ( | ClientStruct::AlarmHistoryClearData & | data | ) |
Clear alarm history.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results alarmHistoryInfo | ( | ClientStruct::AlarmHistoryInfoData & | data | ) |
Get information on alarm history.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results alarmHistoryList | ( | ClientStruct::AlarmHistoryListData & | data | ) |
Get alarm history list.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results alarmStackClear | ( | ClientStruct::AlarmStackClearData & | data | ) |
Clear alarm at index from the stack.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results alarmStackClearAll | ( | ClientStruct::AlarmStackClearAllData & | data | ) |
Clear all alarms from the stack.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results alarmStackClearSpec | ( | ClientStruct::AlarmStackClearSpecData & | data | ) |
Clear specific alarm from the stack.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results alarmStackGet | ( | ClientStruct::AlarmStackGetData & | data | ) |
Get a single item from the alarm stack.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results alarmStackInfo | ( | ClientStruct::AlarmStackInfoData & | data | ) |
Get information about the alarm stack.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results alarmStackList | ( | ClientStruct::AlarmStackListData & | data | ) |
Get the list of alarms in the stack.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results canC402Info | ( | ClientStruct::CanC402InfoData & | data | ) |
Read CAN402 information for CANopen's workstation.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results canEmcyRead | ( | ClientStruct::CanEmcyReadData & | data | ) |
Read CANopen emergency.
data | The operation data. |
This method make use of the state and progress events.
|
protected |
Helper to check if the specified variable type can be forced or released.
type | Type of the variable to check |
Globals::Results canNmtRead | ( | ClientStruct::CanNmtReadData & | data | ) |
Read CANopen NMT status.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results canNmtWrite | ( | ClientStruct::CanNmtWriteData & | data | ) |
Write CANopen NMT status.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results canObjRead | ( | ClientStruct::CanObjReadData & | data | ) |
Read CANopen object value.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results canObjWrite | ( | ClientStruct::CanObjWriteData & | data | ) |
Write CANopen object value.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results canRbxChDiag | ( | ClientStruct::CanRbxChDiagData & | data | ) |
Read Robox diagnostic for CANopen's channel.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results canRbxWsDiag | ( | ClientStruct::CanRbxWsDiagData & | data | ) |
Read Robox diagnostic for CANopen's workstation.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results canRxPdoRead | ( | ClientStruct::CanPdoReadData & | data | ) |
Read Rx PDO data for CANopen's workstation.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results canTxPdoRead | ( | ClientStruct::CanPdoReadData & | data | ) |
Read Tx PDO data for CANopen's workstation.
data | The operation data. |
This method make use of the state and progress events.
|
protected |
Helper method to check if we can use safe variable operations.
safeMode | The requested ClientStruct::SafeModes: if setted to ClientStruct::safeModeIfSupported the remote device firmware version will be checked |
useSafeVar | Flag to indicate if safe operation can be performed |
|
virtual |
Execute a generic command sequence on the connected device.
cmd | The command message. |
asw | The answer message if the command was successfull executed, otherwise null |
data | The operation data. |
This method sends the command message and waits for the corresponding reply message, no later than a certain maximum time( maxCmdTimeout() property).
In case of success the answer message contains copy of the confirmation message; in case of failure the answer message contain the corresponding BCC error message.
When a Nack response message is received, the return result code is setted to resRemoteError and the operation data fields ClientStruct::ErrorData::nackErrCode(), ClientStruct::ErrorData::nackErrExtra() are updated
When a Abort response message is received or the operation is locally aborted, the return result code is setted to Globals::resAborted and the operation data fields ClientStruct::ErrorData::nackErrCode(), ClientStruct::ErrorData::nackErrExtra() are updated
Example of getting current data and time from the connected device:
Example of setting current date and time to the connected device.
Example of decoding a NACK error message:
|
virtual |
The client connection state.
This value reflect the connected state of the underlying connection system.
Connection * connection | ( | ) | const |
Get the Connection object.
Globals::Results dataLoadSequence | ( | ClientStruct::DataLoadSequenceData & | data | ) |
Execute a generic data load sequence to the connected device.
data | Reference to the operation data. |
This method make use of the state and progress events.
Example of manually loading of a ladder diagram task into memory:
Globals::Results dataSaveSequence | ( | ClientStruct::DataSaveSequenceData & | data | ) |
Execute a generic data save sequence from on the connected device.
data | Reference to the operation data. |
This method make use of the state and progress events.
Example of manually saving of a ladder diagram task from memory:
|
protected |
Read Tx/Rx PDO data for CANopen's workstation.
data | The operation data. |
isTx | Setted to read Tx PDO |
|
protected |
Helper for reading fieldbus entry.
data | The operation data. |
msgCode | The message code to handle |
This method make use of the state and progress events.
|
protected |
Helper for reading fieldbus Nmt.
data | The operation data. |
msgCode | The message code to handle |
This method make use of the state and progress events.
|
protected |
Helper for writing fieldbus entry.
data | The operation data. |
msgCode | The message code to handle |
This method make use of the state and progress events.
|
protected |
Helper for writing fieldbus Nmt.
data | The operation data. |
msgCode | The message code to handle |
This method make use of the state and progress events.
|
protected |
Load a file to the flash of the connected device.
data | The operation data. |
See documentation for Client::flashFileLoad(ClientStruct::FlashFileLoadData &)
|
protected |
Helper to parse data stored into the asw message and fills the values list.
asw | The message to read the data from |
var | The variable read (Base ) |
index | The index of the variable (Index) |
values | Storage for the data retrived from the message |
|
protectedvirtual |
Query informations for the data interlocking.
ibTx | Reference to interlocking for trasmission |
ibRx | Reference to interlocking for reception |
data | The operation data |
|
protected |
Retrieves informations from connected device.
This method wraps the Connection::queryDeviceInfo(Client *, bool, bool &) method call.
The values of m_devInfoValid field will be synched to the value of the Connection::devInfoValid() parameter
|
protected |
Helper to read an axis variable.
data | The operation data. |
|
protected |
Helper to read an bit variable.
data | The operation data. |
|
protected |
Helper to read the values of a cached variable.
data | The operation data with the chaced Id of the variable to read |
The variable must be previously cached with the method Connection.AddToVarsCache(string, string)
|
protected |
Helper to read a channel variable.
data | The operation data. |
|
protected |
Helper to read variable values from the connected device by specified data.Var.Name.
data | The operation data with the name of the variable to be read. |
|
protected |
Helper to read a standard variable.
data | The operation data. |
|
protected |
Helper to read a string variable.
data | The operation data. |
|
protected |
Helper to release an axis variable.
data | The operation data. |
|
protected |
Helper to release an bit variable.
data | The operation data. |
|
protected |
Helper to release a cached variable.
data | The operation data with the Id of the cached variable to release |
The variable must be previously cached with the method Connection.AddToVarsCache(string, string)
|
protected |
Helper to release a channel variable.
data | The operation data. |
|
protected |
Helper to release a standard variable.
data | The operation data. |
|
protected |
Helper to release a variable from the connected device specified by data.Name.
data | The operation data. |
|
protected |
Helper to fill the msg with values from values
msg | The message to fill (Message) |
useSafeVar | Flag to use safe variable commands |
varData | The Dict.VarData containing the variable data definition |
values | The list of values to store into msg |
valOffset | The starting offset into values array of values |
Globals::Results downloadSequence | ( | ClientStruct::DownloadSequenceData & | data | ) |
Execute a generic download sequence on the connected device.
data | The operation data. |
This method make use of the state and progress events.
Example of manually getting a complete user report from the connected device:
|
protected |
Helper to write or force an axis variable.
data | The operation data. |
force | Flag to force the variable instead of write. |
coherentValues | Flag to ensure coherent values operations |
|
protected |
Helper to write a bit variable.
data | The operation data. |
force | Flag to force the variable instead of write. |
coherentValues | Flag to ensure coherent values operations |
|
protected |
Helper to write or force the values to a cached variable.
data | The operation data with the Id of the cached variable to write |
force | Flag to force the variable instead of write. |
coherentValues | Flag to ensure coherent values operations |
The variable must be previously cached with the method Connection.AddToVarsCache(string, string)
|
protected |
Helper to write or force a channel variable.
data | The operation data. |
force | Flag to force the variable instead of write. |
coherentValues | Flag to ensure coherent values operations |
|
protected |
Helper to write or force variable values to the connected device by specified data.Var.Name.
data | The operation data. |
force | Flag to force the variable instead of write. |
coherentValues | Flag to ensure coherent values operations |
|
protected |
Helper to write or force a standard variable.
data | The operation data. |
force | Flag to force the variable instead of write. |
coherentValues | Flag to ensure coherent values operations |
|
protected |
Helper to write or force a string variable.
data | The operation data. |
force | Flag to force the variable instead of write. |
coherentValues | Flag to ensure coherent values operations |
|
protected |
Helper method to write or force a variable.
data | The operation data |
force | Flag setted to force the variable, resetted to write the variable |
coherentValues | Flag setted to use coherent operations , i.e. don't split the command into multiple requests |
Globals::Results fbLoadFirmware | ( | ClientStruct::FbLoadFirmwareData & | data | ) |
load firmware file for fieldbus
data | The operation data. |
This method make use of the state and progress events.
Globals::Results fbReadCanEntry | ( | ClientStruct::FbEntryData & | data | ) |
Read entry from fieldbus CANopen interface.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results fbReadCanNmt | ( | ClientStruct::FbReadNmtData & | data | ) |
Read NMT from fieldbus CANopen interface.
data | The operation data. |
This method make use of the state and progress events.
and
Globals::Results fbReadCoeEntry | ( | ClientStruct::FbEntryData & | data | ) |
Read entry from fieldbus EtherCAT (CoE) interface.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results fbReadEcatNmt | ( | ClientStruct::FbReadEcatNmtData & | data | ) |
Read NMT from fieldbus EtherCAT interface.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results fbReadIf | ( | ClientStruct::FbReadIfData & | data | ) |
Read fieldbus interface.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results fbReadLocalEntry | ( | ClientStruct::FbEntryData & | data | ) |
Read entry from fieldbus local interface.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results fbReadLocalNmt | ( | ClientStruct::FbReadNmtData & | data | ) |
Read NMT from fieldbus local interface.
data | The operation data. |
This method make use of the state and progress events.
and
Globals::Results fbWriteCanEntry | ( | ClientStruct::FbEntryData & | data | ) |
Write to from fieldbus CANopen interface.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results fbWriteCanNmt | ( | ClientStruct::FbWriteNmtData & | data | ) |
Write NMT to fieldbus CANopen interface.
data | The operation data. |
This method make use of the state and progress events.
and
Globals::Results fbWriteCoeEntry | ( | ClientStruct::FbEntryData & | data | ) |
Write to from fieldbus local interface.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results fbWriteEcatNmt | ( | ClientStruct::FbWriteEcatNmtData & | data | ) |
Write NMT from fieldbus EtherCAT interface.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results fbWriteIf | ( | ClientStruct::FbWriteIfData & | data | ) |
Write fieldbus interface.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results fbWriteLocalEntry | ( | ClientStruct::FbEntryData & | data | ) |
Write to from fieldbus local interface.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results fbWriteLocalNmt | ( | ClientStruct::FbWriteNmtData & | data | ) |
Write NMT to fieldbus local interface.
data | The operation data. |
This method make use of the state and progress events.
and
void fillSystemInfoData | ( | Message & | msg, |
ClientStruct::SystemInfoData & | data ) |
Fill the SysInfoData data structure from the content of the Message msg.
msg | The source message from which retrive the data |
data | The object to fill |
Globals::Results flashDir | ( | ClientStruct::FlashDirData & | data | ) |
Get the content of the flash on the conencted device.
data | The operation data. |
This method make use of the state and progress events.
Example of enumeration of flash files:
Globals::Results flashDiskBackup | ( | ClientStruct::FlashDiskBackpupData & | data | ) |
Backup a flash content to the backup area of the connected device.
data | The operation data. |
This method make use of the state and progress events.
For more detailed information about managing flashes look at the RTE Firmware Documentation.
Globals::Results flashDiskCreate | ( | ClientStruct::FlashDiskCreateData & | data | ) |
Create a flash in the physical storage of the connected device.
data | Reference to the operation data. |
This method make use of the state and progress events.
For more detailed information about managing flashes look at the RTE Firmware Documentation.
Globals::Results flashDiskDelete | ( | ClientStruct::FlashDiskDeleteData & | data | ) |
Delete a flash form the physical storage of the connected device.
data | Reference to the operation data. |
This method make use of the state and progress events.
For more detailed information about managing flashes look at the RTE Firmware Documentation.
Globals::Results flashDiskRestore | ( | ClientStruct::FlashDiskRestoreData & | data | ) |
Restore a flash content from the backup area of the connected device.
data | The operation data. |
WARNING: all previous data in the flash will be overwritten with files restored from the backup area!
This method make use of the state and progress events.
For more detailed information about managing flashes look at the RTE Firmware Documentation.
Globals::Results flashFileDelete | ( | ClientStruct::FlashFileDeleteData & | data | ) |
Delete files from the flash of the connected device.
data | The operation data. |
This method make use of the state and progress events.
Example of deleting files from the flash:
Globals::Results flashFileInfo | ( | ClientStruct::FlashFileInfoData & | data | ) |
Get information for a file in the flash of the connected device.
data | The operation data. |
This method make use of the state and progress events.
Example of getting information of a file in the flash:
Globals::Results flashFileLoad | ( | ClientStruct::FlashFileLoadData & | data | ) |
Load a file to the flash of the connected device.
data | The operation data. |
This method make use of the state and progress events.
The files are also loaded into the ramdisk with this same command, only need to specify the path corresponding to the desired ramdisk.
Example of loading a file to the flash.
Globals::Results flashFileRename | ( | ClientStruct::FlashFileRenameData & | data | ) |
Rename a file in the flash of the connected device.
data | The operation data. |
This method make use of the state and progress events.
Example of renaming of a file in the flash:
Globals::Results flashFileSave | ( | ClientStruct::FlashFileSaveData & | data | ) |
Save a file from the flash of the connected device.
data | The operation data. |
This method make use of the state and progress events.
The files are also saved from the ramdisk with this same command, only need to specify the path corresponding to the desired ramdisk.
Example of saving a file from the flash.
Globals::Results flashFolderCreate | ( | ClientStruct::FlashFolderCreateData & | data | ) |
Create a folder in the flash of the connected device.
data | The operation data. |
This method make use of the state and progress events.
Example of creating a folder in the flash:
Globals::Results flashFolderDelete | ( | ClientStruct::FlashFolderDeleteData & | data | ) |
Delete a folder in the flash of the connected device.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results flashFolderInfo | ( | ClientStruct::FlashFolderInfoData & | data | ) |
Get information for a folder in the flash of the connected device.
data | The operation data. |
This method make use of the state and progress events.
Example of getting information of a folder in the flash:
Globals::Results flashFormat | ( | ClientStruct::FlashFormatData & | data | ) |
Format a flash of the connecte device.
data | Reference to the operation data. |
This method make use of the state and progress events.
For more detailed information about managing flashes look at the RTE Firmware Documentation.
Globals::Results flashSetAttributes | ( | ClientStruct::FlashSetAttributesData & | data | ) |
Sets attributes for flash's objects (files/folders)
data | The operation data. |
|
virtual |
Flush messages in the client ingoing queue.
Globals::Results forceVariable | ( | ClientStruct::ForceVariableData & | data | ) |
Force variable values on the connected device.
data | The operation data. |
Example of forcing a bit of a physical 16bit output word.
Example of forcing a logical 16bit input word.
Example of forcing a bit of a physical 16bit output word.
Example of forcing a logical 16bit input word specified by name.
Example of forcing a logical 16bit input word specified by name and stored into the cache:
This method make use of the state and progress events.
For more information about parameter and axis parameter indexes, look at R3 Programming Language documentation, chapter Prefined Variables.
The Count and AxCount attributes are not present in the ForceVariableData class because they are automatically calculated based on the content of the Values list.
The above examples show the usage of the raccomended method to initialize a Variable object , i.e. using the factory helper function for the specific data type, but you can allocate the object by your own and set the getSingle specific parameters required for the variable data type.
uint64_t id | ( | ) | const |
Get the object identifier.
|
protected |
Get the LocalClientLink object.
int32_t maxCmdTimeout | ( | ) | const |
Get the maximum generic command timeout [ms].
int32_t maxWaitTimeout | ( | ) | const |
Get the maximum generic wait timeout [ms].
|
protected |
Get the next command Pid.
|
protected |
Get the outgoing message queue.
Globals::Results ping | ( | ClientStruct::PingData & | data | ) |
Execute a ping sequence on the connected device.
data | The operation data. |
Example of testing communication timing with the connected device:
|
virtual |
Receive a message from the connected device.
msg | The removed message, if successfully. |
|
virtual |
Remove the first message sent to the connected device but not yet started (still present in the client outgoing queue).
msg | The removed message, if successfully. |
|
virtual |
Emulate a message reception from the connected device.
msg | The desired message. |
|
virtual |
Send the message to the connected device.
msg | The desired message. |
Globals::Results readVariable | ( | ClientStruct::ReadVariableData & | data | ) |
Read variable values from the connected device.
data | The operation data. |
Example of reading volatile integer 32bit registers:
Example of reading a non volatile string register:
Example of reading a real axis parameter:
Example of reading volatile integer 32bit registers specified by name:
Example of reading volatile integer 32bit registers specified by name and stored into the cache:
This method make use of the state and progress events.
Although there is the possibility to read specific bits of a variable it is advisable, for performance reasons, reading the variable in full (for example if you need a bit from integer register, its better to read the whole register value and then test the desired bit).
For more information about parameter and axis parameter indexes, look at R3 Programming Language documentation, chapter Prefined Variables.
The ClientStruct.ReadVariableData.coherentValues() defaults to false so you can perform operations returning a number of data above the BCC protocol specification. The method will provide to send multile commands to acomplish the BCC protocol data size, so the data consistency is not guaranteed
The above examples show the usage of the raccomended method to initialize a Variable object , i.e. using the factory helper function for the specific data type, but you can allocate the object by your own and set the getSingle specific parameters required for the variable data type.
|
virtual |
The client reconnection state.
Value of true indicate the there is a reconnection action in progress.
Globals::Results releaseAllVariables | ( | ClientStruct::ReleaseAllVariablesData & | data | ) |
Release all variables value on the connected device.
data | The operation data. |
WARNING: this method will release all the forced variables on the connected device, including those set by other subjects / connections, for which there could be unwanted side effects.
Globals::Results releaseVariable | ( | ClientStruct::ReleaseVariableData & | data | ) |
Release variable values on the connected device.
data | The operation data. |
Example of releasing a bit of a physical 16bit output word.
Example of releasing a logical 16bit input word.
Example of releasing a logical 16bit input word specified by name.
Example of releasing a logical 16bit input word specified by name and stored into the cache.
This method make use of the state and progress events.
For more information about parameter and axis parameter indexes, look at R3 Programming Language documentation, chapter Prefined Variables.
The above examples show the usage of the raccomended method to initialize a Variable object , i.e. using the factory helper function for the specific data type, but you can allocate the object by your own and set the getSingle specific parameters required for the variable data type.
Globals::Results replyBusy | ( | Message * | src | ) |
Reply with a BUSY message to the source message.
src | The source message. |
The reply message will be sent immediately to the connected device.
Globals::Results replyMsg | ( | Message * | src, |
Message::MsgCodes | msgCode, | ||
void * | data, | ||
uint8_t | len = 0 ) |
Reply with a generic message to the source message.
src | The source message. |
msgCode | The message code. |
data | The message data (null=no data) |
len | The message data len (0=no data) |
The reply message will be sent immediately to the connected device.
Globals::Results reportClear | ( | ClientStruct::ReportClearData & | data | ) |
Clear user report.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results reportInfo | ( | ClientStruct::ReportInfoData & | data | ) |
Read information for user report.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results reportList | ( | ClientStruct::ReportListData & | data | ) |
Read list for user report.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results reportSetMode | ( | ClientStruct::ReportSetModeData & | data | ) |
Set mode for user report.
data | The operation data. |
This method make use of the state and progress events.
|
protected |
Set the flag to abort operation.
value | The value to set |
void setConnection | ( | Connection * | value | ) |
Set the Connection object.
value | The value to set |
|
protected |
Set the LocalClientLink object.
value | The value to set |
void setMaxCmdTimeout | ( | int | value | ) |
Set the maximum generic command timeout [ms].
value | The value to set |
void setMaxWaitTimeout | ( | int | value | ) |
Set the maximum generic wait timeout [ms].
value | The value to set |
|
protected |
Set the outgoing message queue.
value | The value to set |
|
virtual |
Set the client source channel.
value | The value to set |
|
virtual |
Set the client source identifier.
value | The value to set |
|
virtual |
Set the client target channel.
value | The value to set |
|
virtual |
Set the client target identifier.
value | The value to set |
|
virtual |
Get the client source channel.
|
virtual |
Get the client source identifier.
Globals::Results sysReportClear | ( | ClientStruct::SysReportClearData & | data | ) |
Clear system report.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results sysReportInfo | ( | ClientStruct::SysReportInfoData & | data | ) |
Read information for system report.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results sysReportList | ( | ClientStruct::SysReportListData & | data | ) |
Read list for system report.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results sysReportSetMode | ( | ClientStruct::SysReportSetModeData & | data | ) |
Set mode for system report.
data | The operation data. |
This method make use of the state and progress events.
Globals::Results systemInfo | ( | ClientStruct::SystemInfoData & | data | ) |
Get the system information from the connected device.
data | The operation data. |
|
virtual |
Get the client target channel.
|
virtual |
Get the client target identifier.
int txNumBlock | ( | ClientStruct::OperationData * | data = nullptr | ) |
Query the data interlocking value (trasmission)
data | The operation data (opz) |
Globals::Results writeVariable | ( | ClientStruct::WriteVariableData & | data | ) |
Write variable values to the connected device.
data | The operation data. |
Example of writing volatile real registers:
Example of writing a volatile string register:
Example of writing a real parameter:
Example of writing volatile real registers with non coherent values:
Example of writing volatile real registers specified by name:
Example of writing volatile integer 32bit registers specified by name and stored into the cache:
This method make use of the state and progress events.
For more information about parameter and axis parameter indexes, look at R3 Programming Language documentation, chapter Prefined Variables.
The Count and AxCount attributes are not present in the ClientStruct.WriteVariableData class because they are automatically calculated based on the content of the Values list.
The ClientStruct.WriteVariableData.coherentValues() defaults to false so you can perform write operations on a number of data above the BCC protocol specification. The method will provide to send multile commands to acomplish the BCC protocol data size, so the data consistency is not guaranteed
The above examples show the usage of the raccomended method to initialize a Variable object , i.e. using the factory helper function for the specific data type, but you can allocate the object by your own and set the getSingle specific parameters required for the variable data type.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
protected |
Command protocol Id.
|
protected |
Object to lock the m_commandPid when generating the next pid value