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

Message declaration for the BCC protocol. More...

#include <message.h>

Classes

struct  bccMessage
 The Bcc message raw data structure. More...
 
class  Vector
 Class to handle with lists of Message. More...
 

Public Types

enum  DataTypes {
  dtUndef , dtU8 , dtI8 , dtU16 ,
  dtI16 , dtU32 , dtI32 , dtU64 ,
  dtI64 , dtSingle , dtDouble , dtString ,
  dtBool
}
 The types of data. More...
 
enum  Destinations {
  dstLocal = 0x0 , dstEndPoint = 0x1 , dstRemoteTcpServer = 0x2 , dstRemoteNetwork = 0x3 ,
  dstLocalTcpServer = 0xA
}
 
enum  ErrCodes {
  errCodesNoError = 0 , errCodesMissingArgs = 100 , errCodesIllegalArgs = 101 , errCodesWrongCommand = 102 ,
  errCodesInvalidChannel = 103 , errCodesSystemBusy = 104 , errCodesIllegalStatus = 105 , errCodesMemoryFull = 106 ,
  errCodesResourceBusy = 107 , errCodesTimeout = 108 , errCodesNotImplemented = 109 , errCodesFileExist = 110 ,
  errCodesWriteError = 111 , errCodesAborted = 112 , errCodesFileNotExist = 113 , errCodesIllegalLength = 114 ,
  errCodesIllegalDevice = 115 , errCodesUnformattedDevice = 116 , errCodesSameFile = 117 , errCodesOpenError = 118 ,
  errCodesCoffMissingRelTab = 119 , errCodesCoffNo386Code = 120 , errCodesCoffUnresolvedSym = 121 , errCodesBadTaskInit = 122 ,
  errCodesReadOnly = 123 , errCodesWriteOnly = 124 , errCodesCloseError = 125 , errCodesBackupError = 126 ,
  errCodesReadError = 127 , errCodesTooMany = 128 , errCodesTooFew = 129 , errCodesOutOfResource = 130 ,
  errCodesDataOverflow = 131 , errCodesDataUnderflow = 132 , errCodesNotFound = 133 , errCodesSizeMismatch = 134 ,
  errCodesOffsetMismatch = 135 , errCodesTxError = 136 , errCodesRxError = 137 , errCodesBadBif16 = 138 ,
  errCodesTooNested = 139 , errCodesNotProgrammed = 140 , errCodesObsolete = 141 , errCodesSameData = 142 ,
  errCodesDifferentData = 143 , errCodesCantForce = 144 , errCodesCantRelease = 145 , errCodesNotAuthorized = 146 ,
  errCodesExists = 147 , errCodesIllegalDebug = 148 , errCodesNotActive = 149 , errCodesAlreadyActive = 150 ,
  errCodesGeneralError = 151 , errCodesUserRequest = 152 , errCodesInternalError = 153 , errCodesRequestError = 154 ,
  errCodesSeqMismatch = 155 , errCodesDeviceError = 156 , errCodesUnreachDestination = 157 , errCodesUnreachDestinationCh = 158 ,
  errCodesDeviceFull = 159 , errCodesIllegalFile = 160 , errCodesDisconnected = 161 , errCodesConnected = 162 ,
  errCodesEmpty = 163 , errCodesNotEmpty = 164 , errCodesFolderExist = 165 , errCodesFolderNotExist = 166 ,
  errCodesIllegalFolder = 167 , errCodesDeviceNotFound = 168 , errCodesDeviceNotReady = 169 , errCodesIsAFolder = 170 ,
  errCodesIsNotAFolder = 171 , errCodesBitAccessDenied = 172 , errCodesBitAccessNeeded = 173 , errCodesInterfaceNotFound = 174 ,
  errCodesInterfaceNotReady = 175 , errCodesKeyMismatch = 176 , errCodesDataMismatch = 177 , errCodesDeleteError = 178 ,
  errCodesIllegalVarsetId = 179 , errCodesRpeNotInstalled = 180 , errCodesBusy = 181 , errCodesNotBusy = 182 ,
  errCodesLocalFileNotExist = 3000 , errCodesLocalFileExist = 3001 , errCodesLocalFileOpenError = 3002 , errCodesLocalFileReadError = 3003 ,
  errCodesLocalFileWriteError = 3004 , errCodesLocalFileBackupError = 3005 , errCodesLocalMemoryFull = 3006 , errCodesLocalFileSeekError = 3007 ,
  errCodesLocalFolderExist = 3008 , errCodesLocalFolderNotExist = 3009 , errCodesLocalDisconnected = 3010 , errCodesLocalRxError = 3011 ,
  errCodesLocalTxError = 3012 , errCodesLocalTimeout = 3013 , errCodesLocalAborted = 3014 , errCodesLocalIllegalArgs = 3015 ,
  errCodesLocalSeqMismatch = 3016 , errCodesLocalDataUnderflow = 3017 , errCodesLocalDataOverflow = 3018 , errCodesLocalOffsetMismatch = 3019 ,
  errCodesLocalBadBif16 = 3020 , errCodesLocalSizeMismatch = 3021 , errCodesLocalClientBusy = 3022 , errCodesLocalUnreachDestination = 3023
}
 The BCC protocol error codes. More...
 
enum  AlarmSCmdCommands { alarmSCmdClearAll = 1 , alarmSCmdClearPos = 2 , alarmSCmdClearSpec = 3 }
 Command values for MsgCodes.AlarmSCmd More...
 
enum  AlarmHCmdFlagss { alarmHCmdFClear = 0x00000001 , alarmHCmdFSetSize = 0x00000002 }
 Command flags for MsgCodes.AlarmHCmd More...
 
enum  CanObjReadFlagss { canObjReadFEnableErrText = 0x00000001 }
 Command flags for MsgCodes.CanObjRead More...
 
enum  CanObjWriteFlagss { CanObjWriteFEnableErrText = 0x00000001 }
 Command flags for MsgCodes.CanObjWrite More...
 
enum  CanEmcyReadFlagss { canEmcyReadFEnableText = 0x00000001 }
 Command flags for MsgCodes.CanEmcyRead More...
 
enum  MsgCodes {
  msgCodesInvalid = 0x0 , msgCodesAS = 0x8000 , msgCodesAck = 1 , msgCodesNack = 2 ,
  msgCodesData = 3 , msgCodesAbort = (msgCodesAS | 4) , msgCodesAborted = 5 , msgCodesEndData = 6 ,
  msgCodesNoData = 7 , msgCodesIBlock = 8 , msgCodesCheck = (msgCodesAS | 9) , msgCodesBusy = 10 ,
  msgCodesCompleted = 11 , msgCodesWait = 12 , msgCodesPing = (msgCodesAS | 38) , msgCodesPong = 39 ,
  msgCodesFlashFileLoad = (msgCodesAS | 100) , msgCodesFlashFileSave = (msgCodesAS | 101) , msgCodesFlashDir = (msgCodesAS | 102) , msgCodesFlashFileDelete = (msgCodesAS | 103) ,
  msgCodesFlashFileRename = (msgCodesAS | 104) , msgCodesFlashTree = (msgCodesAS | 107) , msgCodesFlashFormat = (msgCodesAS | 108) , msgCodesFlashInfo = (msgCodesAS | 109) ,
  msgCodesFlashFileInfo = (msgCodesAS | 110) , msgCodesFlashList = (msgCodesAS | 111) , msgCodesFlashInit = (msgCodesAS | 112) , msgCodesFlashFolderCreate = (msgCodesAS | 113) ,
  msgCodesFlashFolderDelete = (msgCodesAS | 114) , msgCodesFlashFolderInfo = (msgCodesAS | 115) , msgCodesFlashInfoByFolder = (msgCodesAS | 116) , msgCodesFlashDisk = (msgCodesAS | 117) ,
  msgCodesFlashSetAttributes = (msgCodesAS | 118) , msgCodesReadVar = (msgCodesAS | 310) , msgCodesWriteVar = (msgCodesAS | 311) , msgCodesForceVar = (msgCodesAS | 312) ,
  msgCodesReleaseVar = (msgCodesAS | 313) , msgCodesEnumVar = (msgCodesAS | 314) , msgCodesReleaseAllVars = (msgCodesAS | 315) , msgCodesSafeReadVar = (msgCodesAS | 316) ,
  msgCodesSafeWriteVar = (msgCodesAS | 317) , msgCodesSafeForceVar = (msgCodesAS | 318) , msgCodesSafeReleaseVar = (msgCodesAS | 319) , msgCodesSafeReleaseAllVars = (msgCodesAS | 320) ,
  msgCodesMonCreate = (msgCodesAS | 400) , msgCodesMonDestroy = (msgCodesAS | 401) , msgCodesMonStart = (msgCodesAS | 402) , msgCodesMonStop = (msgCodesAS | 403) ,
  msgCodesMonStatus = (msgCodesAS | 404) , msgCodesMonList = (msgCodesAS | 405) , msgCodesMonQuick = (msgCodesAS | 406) , msgCodesMonWd = 407 ,
  msgCodesMonWrite = (msgCodesAS | 408) , msgCodesMonStatInfo = (msgCodesAS | 409) , msgCodesOscCreate = (msgCodesAS | 420) , msgCodesOscDestroy = (msgCodesAS | 421) ,
  msgCodesOscStart = (msgCodesAS | 422) , msgCodesOscStop = (msgCodesAS | 423) , msgCodesOscStatus = (msgCodesAS | 424) , msgCodesOscList = (msgCodesAS | 425) ,
  msgCodesOscStatInfo = (msgCodesAS | 426) , msgCodesOscWd = 427 , msgCodesGetAlarm = (msgCodesAS | 500) , msgCodesSetAlarm = (msgCodesAS | 501) ,
  msgCodesResetAlarm = (msgCodesAS | 502) , msgCodesGetDateTime = (msgCodesAS | 503) , msgCodesSetDateTime = (msgCodesAS | 504) , msgCodesSoftwareReset = (msgCodesAS | 505) ,
  msgCodesHardwareReset = (msgCodesAS | 506) , msgCodesSysInfo = (msgCodesAS | 507) , msgCodesGetMode = (msgCodesAS | 508) , msgCodesSetMode = (msgCodesAS | 509) ,
  msgCodesAutoConfig = (msgCodesAS | 511) , msgCodesCMosReset = (msgCodesAS | 512) , msgCodesSysProcessList = (msgCodesAS | 513) , msgCodesProductInfo = (msgCodesAS | 514) ,
  msgCodesAlarmHInfo = (msgCodesAS | 515) , msgCodesAlarmHList = (msgCodesAS | 516) , msgCodesAlarmHCmd = (msgCodesAS | 517) , msgCodesAlarmHProg = msgCodesAlarmHCmd ,
  msgCodesAsciiCmd = (msgCodesAS | 518) , msgCodesAlarmSInfo = (msgCodesAS | 519) , msgCodesAlarmSGet = (msgCodesAS | 520) , msgCodesAlarmSList = (msgCodesAS | 521) ,
  msgCodesAlarmSCmd = (msgCodesAS | 522) , msgCodesNetLogin = (msgCodesAS | 600) , msgCodesNetLogout = (msgCodesAS | 601) , msgCodesNetUserList = (msgCodesAS | 602) ,
  msgCodesNetUserCreate = (msgCodesAS | 603) , msgCodesNetUserDelete = (msgCodesAS | 604) , msgCodesNetUserChange = (msgCodesAS | 605) , msgCodesNetInfo = (msgCodesAS | 608) ,
  msgCodesNetClientList = (msgCodesAS | 609) , msgCodesNetClientKill = (msgCodesAS | 610) , msgCodesNetStats = (msgCodesAS | 611) , msgCodesProcessList = (msgCodesAS | 700) ,
  msgCodesProcessInfo = (msgCodesAS | 701) , msgCodesProcessDbgCmd = (msgCodesAS | 702) , msgCodesProcessGetTrace = (msgCodesAS | 703) , msgCodesProcessStatus = (msgCodesAS | 704) ,
  msgCodesProcessCmd = (msgCodesAS | 705) , msgCodesDebugStart = (msgCodesAS | 710) , msgCodesDebugStop = (msgCodesAS | 711) , msgCodesDebugWd = (msgCodesAS | 712) ,
  msgCodesBreakpAdd = (msgCodesAS | 720) , msgCodesBreakpDel = (msgCodesAS | 721) , msgCodesBreakpList = (msgCodesAS | 722) , msgCodesBreakpInfo = (msgCodesAS | 723) ,
  msgCodesBreakpStatus = (msgCodesAS | 724) , msgCodesReportInfo = (msgCodesAS | 730) , msgCodesReportList = (msgCodesAS | 731) , msgCodesReportCmd = (msgCodesAS | 732) ,
  msgCodesSysReportInfo = (msgCodesAS | 733) , msgCodesSysReportList = (msgCodesAS | 734) , msgCodesSysReportCmd = (msgCodesAS | 735) , msgCodesOsAttachedFList = (msgCodesAS | 736) ,
  msgCodesCanObjRead = (msgCodesAS | 750) , msgCodesCanObjWrite = (msgCodesAS | 751) , msgCodesCanNmtRead = (msgCodesAS | 752) , msgCodesCanNmtWrite = (msgCodesAS | 753) ,
  msgCodesCanEmcyRead = (msgCodesAS | 754) , msgCodesCanEmcyInfo = (msgCodesAS | 755) , msgCodesCanRbxChDiag = (msgCodesAS | 756) , msgCodesCanRbxWsDiag = (msgCodesAS | 757) ,
  msgCodesCanPdoRead = (msgCodesAS | 758) , msgCodesCanC402Info = (msgCodesAS | 759) , msgCodesObjBlockList = (msgCodesAS | 770) , msgCodesLadTaskLoad = (msgCodesAS | 800) ,
  msgCodesLadTaskSave = (msgCodesAS | 801) , msgCodesLadLiveLoad = (msgCodesAS | 802) , msgCodesLadLiveTest = (msgCodesAS | 803) , msgCodesLadLiveConfirm = (msgCodesAS | 804) ,
  msgCodesLadLiveCancel = (msgCodesAS | 805) , msgCodesLadLiveWd = 806 , msgCodesLadMonStart = (msgCodesAS | 810) , msgCodesLadMonRestart = (msgCodesAS | 811) ,
  msgCodesLadMonStop = (msgCodesAS | 812) , msgCodesLadMonWd = 813 , msgCodesLadMonStatus = (msgCodesAS | 814) , msgCodesFbReadLocalEntry = (msgCodesAS | 900) ,
  msgCodesFbWriteLocalEntry = (msgCodesAS | 901) , msgCodesFbReadLocalNmt = (msgCodesAS | 902) , msgCodesFbWriteLocalNmt = (msgCodesAS | 903) , msgCodesFbReadCoeEntry = (msgCodesAS | 910) ,
  msgCodesFbWriteCoeEntry = (msgCodesAS | 911) , msgCodesFbReadEcatNmt = (msgCodesAS | 912) , msgCodesFbWriteEcatNmt = (msgCodesAS | 913) , msgCodesFbReadCanEntry = (msgCodesAS | 920) ,
  msgCodesFbWriteCanEntry = (msgCodesAS | 921) , msgCodesFbReadCanNmt = (msgCodesAS | 922) , msgCodesFbWriteCanNmt = (msgCodesAS | 923) , msgCodesFbReadIf = (msgCodesAS | 950) ,
  msgCodesFbWriteIf = (msgCodesAS | 951) , msgCodesRpeAxesGroupResolve = (msgCodesAS | 1000) , msgCodesRpeAxesGroupInfo = (msgCodesAS | 1001) , msgCodesRpeAxesGroupList = (msgCodesAS | 1002) ,
  msgCodesRpeAxesGroupQuotes = (msgCodesAS | 1003)
}
 The BCC protocol message codes. More...
 
enum  VarTypes {
  varInvalid = Protocol::varInvalid , varBitParamI16 = Protocol::varBitParamI16 , varBitParamI32 = Protocol::varBitParamI32 , varBitParamI64 = Protocol::varBitParamI64 ,
  varBitAxisI16 = Protocol::varBitAxisI16 , varBitAxisI32 = Protocol::varBitAxisI32 , varBitAxisI64 = Protocol::varBitAxisI64 , varBitNvR64 = Protocol::varBitNvR64 ,
  varBitVR64 = Protocol::varBitVR64 , varBitLogIW16 = Protocol::varBitLogIW16 , varBitLogIW32 = Protocol::varBitLogIW32 , varBitLogOW16 = Protocol::varBitLogOW16 ,
  varBitLogOW32 = Protocol::varBitLogOW32 , varBitPhyIW16 = Protocol::varBitPhyIW16 , varBitPhyIW32 = Protocol::varBitPhyIW32 , varBitPhyOW16 = Protocol::varBitPhyOW16 ,
  varBitPhyOW32 = Protocol::varBitPhyOW32 , varBitNvR16 = Protocol::varBitNvR16 , varBitNvR32 = Protocol::varBitNvR32 , varBitVR16 = Protocol::varBitVR16 ,
  varBitVR32 = Protocol::varBitVR32 , varBitAM = Protocol::varBitAM , varLogIW16 = Protocol::varLogIW16 , varLogIW32 = Protocol::varLogIW32 ,
  varLogOW16 = Protocol::varLogOW16 , varLogOW32 = Protocol::varLogOW32 , varLogIC = Protocol::varLogIC , varLogOC = Protocol::varLogOC ,
  varPhyIW16 = Protocol::varPhyIW16 , varPhyIW32 = Protocol::varPhyIW32 , varPhyOW16 = Protocol::varPhyOW16 , varPhyOW32 = Protocol::varPhyOW32 ,
  varPhyIC = Protocol::varPhyIC , varPhyOC = Protocol::varPhyOC , varNvR16 = Protocol::varNvR16 , varNvR32 = Protocol::varNvR32 ,
  varNvRR = Protocol::varNvRR , varNvRRF = Protocol::varNvRRF , varNvSR = Protocol::varNvSR , varVR16 = Protocol::varVR16 ,
  varVR32 = Protocol::varVR32 , varVRR = Protocol::varVRR , varVRRF = Protocol::varVRRF , varVSR = Protocol::varVSR ,
  varParamI16 = Protocol::varParamI16 , varParamI32 = Protocol::varParamI32 , varParamR = Protocol::varParamR , varParamF = Protocol::varParamF ,
  varAxisI16 = Protocol::varAxisI16 , varAxisI32 = Protocol::varAxisI32 , varAxisR = Protocol::varAxisR , varAxisF = Protocol::varAxisF ,
  varAM = Protocol::varAM , varAlarmN = Protocol::varAlarmN , varAlarmS = Protocol::varAlarmS , varNvR64 = Protocol::varNvR64 ,
  varVR64 = Protocol::varVR64 , varParamI64 = Protocol::varParamI64 , varAxisI64 = Protocol::varAxisI64 , varNamed = 0xFF01 ,
  varCached = 0xFF02
}
 The BCC protocol variable types. More...
 

Public Member Functions

 Message ()
 Public constructor.
 
 Message (const Message &src)
 Public copy constructor.
 
virtual ~Message ()
 Public destructor.
 
void copy (const Message *src)
 Copy data from source.
 
bool operator== (const Message &other)
 Comparison operator.
 
void clear ()
 Clear the content of the message.
 
bool setU8 (uint32_t offset, uint8_t value)
 Write an U8 value into the data buffer at the specified offset.
 
bool getU8 (uint32_t offset, uint8_t &value)
 Read an U8 value from the data buffer at the specified offset.
 
uint8_t getU8 (uint32_t offset)
 Read an U8 value from the data buffer at the specified offset.
 
bool setI8 (uint32_t offset, int8_t value)
 Write an I8 value into the data buffer at the specified offset.
 
bool getI8 (uint32_t offset, int8_t &value)
 Read an I8 value from the data buffer at the specified offset.
 
int8_t getI8 (uint32_t offset)
 Read an I8 value from the data buffer at the specified offset.
 
bool setU16 (uint32_t offset, uint16_t value)
 Write an U16 value into the data buffer at the specified offset.
 
bool getU16 (uint32_t offset, uint16_t &value)
 Read an U16 value from the data buffer at the specified offset.
 
uint16_t getU16 (uint32_t offset)
 Read an U16 value from the data buffer at the specified offset.
 
bool setI16 (uint32_t offset, int16_t value)
 Write an I16 value into the data buffer at the specified offset.
 
bool getI16 (uint32_t offset, int16_t &value)
 Read an I16 value from the data buffer at the specified offset.
 
int16_t getI16 (uint32_t offset)
 Read an I16 value from the data buffer at the specified offset.
 
bool setU32 (uint32_t offset, uint32_t value)
 Write an U32 value into the data buffer at the specified offset.
 
bool getU32 (uint32_t offset, uint32_t &value)
 Read an U32 value from the data buffer at the specified offset.
 
uint32_t getU32 (uint32_t offset)
 Read an U32 value from the data buffer at the specified offset.
 
bool setI32 (uint32_t offset, int32_t value)
 Write an I32 value into the data buffer at the specified offset.
 
bool getI32 (uint32_t offset, int32_t &value)
 Read an I32 value from the data buffer at the specified offset.
 
int32_t getI32 (uint32_t offset)
 Read an I32 value from the data buffer at the specified offset.
 
bool setU64 (uint32_t offset, uint64_t value)
 Write an U64 value into the data buffer at the specified offset.
 
bool getU64 (uint32_t offset, uint64_t &value)
 Read an U64 value from the data buffer at the specified offset.
 
uint64_t getU64 (uint32_t offset)
 Read an U64 value from the data buffer at the specified offset.
 
bool setI64 (uint32_t offset, int64_t value)
 Write an I64 value into the data buffer at the specified offset.
 
bool getI64 (uint32_t offset, int64_t &value)
 Read an I64 value from the data buffer at the specified offset.
 
int64_t getI64 (uint32_t offset)
 Read an I64 value from the data buffer at the specified offset.
 
bool setSingle (uint32_t offset, float value)
 Write a float value into the data buffer at the specified offset.
 
bool getSingle (uint32_t offset, float &value)
 Read a float value from the data buffer at the specified offset.
 
float getSingle (uint32_t offset)
 Read a float value from the data buffer at the specified offset.
 
bool setDouble (uint32_t offset, double value)
 Write a double value into the data buffer at the specified offset.
 
bool getDouble (uint32_t offset, double &value)
 Read a double value from the data buffer at the specified offset.
 
double getDouble (uint32_t offset)
 Read a double value from the data buffer at the specified offset.
 
bool getStringUTF8 (uint32_t offset, RLibCpp::Tool::String &value)
 Read a UTF-8 encoded string value from the data buffer at the specified offset: the read operation will consider the \0 cstring terminator.
 
RLibCpp::Tool::String getStringUTF8 (uint32_t offset)
 Read a UTF-8 encoded string value from the data buffer at the specified offset: the read operation will consider the \0 cstring terminator.
 
bool setStringUTF8 (uint32_t offset, const RLibCpp::Tool::String &value, int32_t maxChars=-1)
 Write a string value (with UTF-8 encoding) into the data buffer at the specified offset.
 
bool setStringUTF8 (uint32_t offset, const RLibCpp::Tool::String &value, bool cstring=false, int32_t maxChars=-1)
 Write a string value into the data buffer at the specified offset, with UTF-8 encoding.
 
bool copyBuffer (uint8_t *target, uint32_t toffset)
 Copy the data buffer into the target buffer at the specified offset.
 
bool copyToBuffer (RLibCpp::Tool::ByteVector &target, uint32_t soffset, uint32_t count)
 Copy part of the data buffer into the target buffer at the specified offset.
 
bool copyToBuffer (uint8_t *target, uint32_t toffset, uint32_t soffset, uint32_t count)
 Copy part of the data buffer into the target buffer at the specified offset.
 
bool copyFromBuffer (uint32_t toffset, const RLibCpp::Tool::ByteVector &source)
 Copy the source buffer into the data buffer at the specified offset.
 
bool copyFromBuffer (uint32_t toffset, const uint8_t *source, uint32_t count)
 Copy the source buffer into the data buffer at the specified offset.
 
bool copyFromBuffer (uint32_t toffset, const uint8_t *source, uint32_t soffset, uint32_t count)
 Copy part of the source buffer into the data buffer at the specified offset.
 
bool setDataSize (int32_t size)
 Setups the data buffer size.
 
uint8_t * rawData () const
 Get a pointer to the raw message buffer.
 
uint8_t * data ()
 Get a pointer to the data buffer of the message.
 
uint8_t dataLength ()
 Get the data buffer length.
 
void setDataLength (uint8_t len)
 Set the data buffer length.
 
uint16_t msg ()
 Get the message code.
 
void setMsg (uint16_t msg)
 Set the message code.
 
uint8_t src ()
 Get the source id.
 
void setSrc (uint8_t src)
 Set the source id.
 
uint8_t sch ()
 Get the source channel.
 
void setSch (uint8_t sch)
 Set the source channel.
 
uint8_t dst ()
 Get the destination id.
 
void setDst (uint8_t dst)
 Set the destination id.
 
uint8_t dch ()
 Get the destination channel.
 
void setDch (uint8_t dch)
 Set the destination channel.
 
uint8_t pid ()
 The protocol identifier (0-255).
 
void setPid (uint8_t value)
 Set the protocol identifier.
 

Static Public Attributes

static const uint32_t RAW_DATA_SIZE = sizeof(bccMessage)
 Thes size of the message raw data.
 

Protected Member Functions

 Message (const uint8_t *rawData)
 Constructor from BCC raw data.
 
bccMessagemessage ()
 Get the BCC message raw data.
 
void setMessage (const bccMessage &v)
 Set the BCC message raw data.
 

Protected Attributes

struct RLIBCPP_BCC_DLL PACKED_STRUCTURE RLibCpp::Bcc::Message::bccMessage PACKED_STRUCTURE
 

Friends

class ClientStruct::ErrorData
 
class Connection
 
class ClientWrapper
 
class Link
 
class TcpLink
 
class LocalClientLink
 

Detailed Description

Message declaration for the BCC protocol.

Member Enumeration Documentation

◆ AlarmHCmdFlagss

Command flags for MsgCodes.AlarmHCmd

Enumerator
alarmHCmdFClear 

Clear alarm history.

alarmHCmdFSetSize 

Set new history size.

◆ AlarmSCmdCommands

Command values for MsgCodes.AlarmSCmd

Enumerator
alarmSCmdClearAll 

Clear all alarms.

alarmSCmdClearPos 

Clear stack position.

alarmSCmdClearSpec 

Clear specific alarm.

◆ CanEmcyReadFlagss

Command flags for MsgCodes.CanEmcyRead

Enumerator
canEmcyReadFEnableText 

Enable text.

◆ CanObjReadFlagss

Command flags for MsgCodes.CanObjRead

Enumerator
canObjReadFEnableErrText 

Enable error text.

◆ CanObjWriteFlagss

Command flags for MsgCodes.CanObjWrite

Enumerator
CanObjWriteFEnableErrText 

Enable error text.

◆ DataTypes

enum DataTypes

The types of data.

Enumerator
dtUndef 

Not defined.

dtU8 

Unsigned 8 bit data type.

dtI8 

Signed 8 bit data type.

dtU16 

Unsigned 16 bit data type.

dtI16 

Signed 16 bit data type.

dtU32 

Unsigned 32 bit data type.

dtI32 

Signed 32 bit data type.

dtU64 

Unsigned 64 bit data type.

dtI64 

Signed 64 bit data type.

dtSingle 

Single precision real data type.

dtDouble 

Double precision real data type.

dtString 

String data type.

dtBool 

Boolean data type.

◆ Destinations

The BCC protocol destination IDs.

Enumerator
dstLocal 

Local connection.

dstEndPoint 

The default end point.

dstRemoteTcpServer 

Remote TCP server.

dstRemoteNetwork 

Remote network.

dstLocalTcpServer 

Local TCP server.

◆ ErrCodes

enum ErrCodes

The BCC protocol error codes.

For more information about these codes please refer to the BCC/31 Communication Protocol documentation.

Enumerator
errCodesNoError 

No errors.

errCodesMissingArgs 

One or more missing arguments.

errCodesIllegalArgs 

One or more illegal arguments.

errCodesWrongCommand 

Command not recognized or not supported.

errCodesInvalidChannel 

Invalid channel.

errCodesSystemBusy 

System busy in order to handle the command.

errCodesIllegalStatus 

Current mode does not allow the command.

errCodesMemoryFull 

Memory full in handling the command.

errCodesResourceBusy 

Required resource is not available (could be in use)

errCodesTimeout 

Operation/command execution expired.

errCodesNotImplemented 

Command recognized but not yet implemented (usually in a under development software / device).

errCodesFileExist 

File already exist.

errCodesWriteError 

Error writing.

errCodesAborted 

Operation/command execution aborted.

errCodesFileNotExist 

File does not exist.

errCodesIllegalLength 

–obsolete – see nackIllegalArgs

errCodesIllegalDevice 

Illegal device.

errCodesUnformattedDevice 

Device is not correctly formatted.

errCodesSameFile 

File is the same.

errCodesOpenError 

Open error.

errCodesCoffMissingRelTab 

Missing relocation table in COFF.

errCodesCoffNo386Code 

COFF is not for Intel 386 platform.

errCodesCoffUnresolvedSym 

COFF contains unresolved symbols.

errCodesBadTaskInit 

Error in task initialization.

errCodesReadOnly 

Read only.

errCodesWriteOnly 

Write only.

errCodesCloseError 

Close error.

errCodesBackupError 

Backup error.

errCodesReadError 

Error reading.

errCodesTooMany 

Too many error.

errCodesTooFew 

Too few error.

errCodesOutOfResource 

Out of resource.

errCodesDataOverflow 

Data overflow.

errCodesDataUnderflow 

Data underflow.

errCodesNotFound 

Not found (subject)

errCodesSizeMismatch 

Size mismatch.

errCodesOffsetMismatch 

Offset mismatch.

errCodesTxError 

General transmission error.

errCodesRxError 

General reception error.

errCodesBadBif16 

Bad/malformed BIF16.

errCodesTooNested 

Too many nested.

errCodesNotProgrammed 

Not programmed.

errCodesObsolete 

Obsolete command.

errCodesSameData 

Same data.

errCodesDifferentData 

Different data.

errCodesCantForce 

Cant force.

errCodesCantRelease 

Can release.

errCodesNotAuthorized 

Not authorized.

errCodesExists 

Already exist.

errCodesIllegalDebug 

Illegal debug (session)

errCodesNotActive 

Not active.

errCodesAlreadyActive 

Already active.

errCodesGeneralError 

General error.

errCodesUserRequest 

Request by user.

errCodesInternalError 

Internal error.

errCodesRequestError 

Request error.

errCodesSeqMismatch 

Sequence mismatch.

errCodesDeviceError 

Device (generic) error.

errCodesUnreachDestination 

Unreachable destination.

errCodesUnreachDestinationCh 

Unreachable destination channel.

errCodesDeviceFull 

Device full.

errCodesIllegalFile 

Illegal file.

errCodesDisconnected 

Disconnected.

errCodesConnected 

Connected.

errCodesEmpty 

Empty.

errCodesNotEmpty 

Not empty.

errCodesFolderExist 

Folder already exist.

errCodesFolderNotExist 

Folder does not exist.

errCodesIllegalFolder 

Illegal folder.

errCodesDeviceNotFound 

Device not found.

errCodesDeviceNotReady 

Device not ready.

errCodesIsAFolder 

Is a folder.

errCodesIsNotAFolder 

Is not a folder.

errCodesBitAccessDenied 

Bit access denied.

errCodesBitAccessNeeded 

Bit access needed.

errCodesInterfaceNotFound 

Interface not found.

errCodesInterfaceNotReady 

Interface not ready.

errCodesKeyMismatch 

Key mismatch.

errCodesDataMismatch 

Data mismatch.

errCodesDeleteError 

Delete error.

errCodesIllegalVarsetId 

Illegal variable set ID.

errCodesRpeNotInstalled 

RPE firmware is not installed.

errCodesBusy 

Busy.

errCodesNotBusy 

Not busy.

errCodesLocalFileNotExist 

File does not exist.

errCodesLocalFileExist 

File exist.

errCodesLocalFileOpenError 

Error opening the file.

errCodesLocalFileReadError 

Error reading the file.

errCodesLocalFileWriteError 

Error writing the file.

errCodesLocalFileBackupError 

Error in file backup.

errCodesLocalMemoryFull 

Memory full.

errCodesLocalFileSeekError 

Error accessing the file.

errCodesLocalFolderExist 

Folder exist.

errCodesLocalFolderNotExist 

Folder does not exist.

errCodesLocalDisconnected 

Disconnected.

errCodesLocalRxError 

General RX error.

errCodesLocalTxError 

General TX error.

errCodesLocalTimeout 

Timeout.

errCodesLocalAborted 

Aborted.

errCodesLocalIllegalArgs 

Illegal arguments.

errCodesLocalSeqMismatch 

Sequence mismatch.

errCodesLocalDataUnderflow 

Data overflow.

errCodesLocalDataOverflow 

Data overflow.

errCodesLocalOffsetMismatch 

Offset mismatch.

errCodesLocalBadBif16 

Bad/malformed BIF16.

errCodesLocalSizeMismatch 

Size mismatch.

errCodesLocalClientBusy 

Client busy.

errCodesLocalUnreachDestination 

Unreachable destination.

◆ MsgCodes

enum MsgCodes

The BCC protocol message codes.

For more information about these codes please refer to the BCC/31 Communication Protocol documentation.

Enumerator
msgCodesInvalid 

(reserved for internal use)

msgCodesAS 
msgCodesAck 

General acknowledge.

msgCodesNack 

General not acknowledge.

msgCodesData 

Binary data.

msgCodesAbort 

Abort command.

msgCodesAborted 

Abort event.

msgCodesEndData 

End of data.

msgCodesNoData 

No data.

msgCodesIBlock 

Software interblock.

msgCodesCheck 

Check point command.

msgCodesBusy 

System busy event.

msgCodesCompleted 

Completation event.

msgCodesWait 

Wait more.

msgCodesPing 

Ping command.

msgCodesPong 

Ping answer.

msgCodesFlashFileLoad 

Load a file to a flash folder.

msgCodesFlashFileSave 

Save file from a flash folder.

msgCodesFlashDir 

Query flash folder contents.

msgCodesFlashFileDelete 

Delete flash files.

msgCodesFlashFileRename 

Rename a flash file.

msgCodesFlashTree 

Query flash folder tree.

msgCodesFlashFormat 

Format a flash.

msgCodesFlashInfo 

Query flash information.

msgCodesFlashFileInfo 

Query flash file information.

msgCodesFlashList 

Query flashes list.

msgCodesFlashInit 

Define and initialize flashes.

msgCodesFlashFolderCreate 

Create a flash folder.

msgCodesFlashFolderDelete 

Delete a flash folder.

msgCodesFlashFolderInfo 

Query flash folder information.

msgCodesFlashInfoByFolder 

Query flash information by folder.

msgCodesFlashDisk 

Handle disk flashes.

msgCodesFlashSetAttributes 

Set flash file/folder attributes.

msgCodesReadVar 

Read value of a variable.

msgCodesWriteVar 

Write value of a variable.

msgCodesForceVar 

Force value of a variable.

msgCodesReleaseVar 

Release value of a variable.

msgCodesEnumVar 

Enumerate variables.

msgCodesReleaseAllVars 

Release value of all forced variables.

msgCodesSafeReadVar 

Safe read value of a variable.

msgCodesSafeWriteVar 

Safe write value of a variable.

msgCodesSafeForceVar 

Safe force value of a variable.

msgCodesSafeReleaseVar 

Safe release value of a variable.

msgCodesSafeReleaseAllVars 

Safe release value of all forced variables.

msgCodesMonCreate 

Create monitor.

msgCodesMonDestroy 

Destroy monitor.

msgCodesMonStart 

Start monitor data stream.

msgCodesMonStop 

Stop monitor data stream.

msgCodesMonStatus 

Query monitor status.

msgCodesMonList 

Query monitor list.

msgCodesMonQuick 

Quick monitor.

msgCodesMonWd 

Monitor watchdog.

msgCodesMonWrite 

Monitor write.

msgCodesMonStatInfo 

Query monitors statistical information.

msgCodesOscCreate 

Create oscilloscope.

msgCodesOscDestroy 

Destroy oscilloscope.

msgCodesOscStart 

Start oscilloscope data stream.

msgCodesOscStop 

Stop oscilloscope data stream.

msgCodesOscStatus 

Query oscilloscope status.

msgCodesOscList 

Query oscilloscope list.

msgCodesOscStatInfo 

Query oscilloscopes statistical information.

msgCodesOscWd 

Monitor watchdog.

msgCodesGetAlarm 

Get alarm stack.

msgCodesSetAlarm 

Set user alarm.

msgCodesResetAlarm 

Reset alarm stack.

msgCodesGetDateTime 

Get current date and time.

msgCodesSetDateTime 

Set current date and time.

msgCodesSoftwareReset 

Request a software reset.

msgCodesHardwareReset 

Request a hardware reset.

msgCodesSysInfo 

Query system information.

msgCodesGetMode 

Get current mode.

msgCodesSetMode 

Set current mode.

msgCodesAutoConfig 

Request device (self) auto configuration.

msgCodesCMosReset 

Request a CMOS Ram reset.

msgCodesSysProcessList 

Query device system process list.

msgCodesProductInfo 

Query product specific information.

msgCodesAlarmHInfo 

Query alarm history.

msgCodesAlarmHList 

Get alarm history.

msgCodesAlarmHCmd 

Command for alarm history.

msgCodesAlarmHProg 

Command for alarm history.

msgCodesAsciiCmd 

Execute a generic ASCII command.

msgCodesAlarmSInfo 

Query alarm stack information.

msgCodesAlarmSGet 

Query getSingle alarm stack entry.

msgCodesAlarmSList 

Query all alarm stack entries.

msgCodesAlarmSCmd 

Command for alarm stack.

msgCodesNetLogin 

Network login.

msgCodesNetLogout 

Network logout.

msgCodesNetUserList 

Query user list.

msgCodesNetUserCreate 

Create new user.

msgCodesNetUserDelete 

Delete existing user.

msgCodesNetUserChange 

Change existing user settings.

msgCodesNetInfo 

Query network information.

msgCodesNetClientList 

Query client list.

msgCodesNetClientKill 

Kill a specific client.

msgCodesNetStats 

Query network statistics.

msgCodesProcessList 

List available remote process.

msgCodesProcessInfo 

Query process specific information.

msgCodesProcessDbgCmd 

Execute a process debug command.

msgCodesProcessGetTrace 

Ask trace information for specific process.

msgCodesProcessStatus 

Ask R/T status for specific process.

msgCodesProcessCmd 

Execute a process command.

msgCodesDebugStart 

Start a debug session.

msgCodesDebugStop 

Stop a debug session.

msgCodesDebugWd 

Debug session watch-dog.

msgCodesBreakpAdd 

Add a breakpoint.

msgCodesBreakpDel 

Delete multiple breakpoint.

msgCodesBreakpList 

List defined breakpoints.

msgCodesBreakpInfo 

Ask information for a breakpoint.

msgCodesBreakpStatus 

Ask status for a breakpoint.

msgCodesReportInfo 

Query report information.

msgCodesReportList 

Get report.

msgCodesReportCmd 

Command for report.

msgCodesSysReportInfo 

Query system report information.

msgCodesSysReportList 

Get system report.

msgCodesSysReportCmd 

Command for system report.

msgCodesOsAttachedFList 

List OS attached functions.

msgCodesCanObjRead 

Read a CANopen object.

msgCodesCanObjWrite 

Write a CANopen object.

msgCodesCanNmtRead 

Read one or more CANopen NMT.

msgCodesCanNmtWrite 

Write one or more CANopen NMT.

msgCodesCanEmcyRead 

Read a CANopen EMCY message.

msgCodesCanEmcyInfo 

Query CANopen EMCY information.

msgCodesCanRbxChDiag 

Query Robox CANopen channel diagnostic.

msgCodesCanRbxWsDiag 

Query Robox CANopen workstation diagnostic.

msgCodesCanPdoRead 

Read element from Tx/Rx CANopen PDO.

msgCodesCanC402Info 

Query CANopen C402 information.

msgCodesObjBlockList 

List object blocks.

msgCodesLadTaskLoad 

Load ladder task to device.

msgCodesLadTaskSave 

Save ladder task from device.

msgCodesLadLiveLoad 

Load live changes.

msgCodesLadLiveTest 

Start live changes testing.

msgCodesLadLiveConfirm 

Confirm live changes.

msgCodesLadLiveCancel 

Cancel live changes.

msgCodesLadLiveWd 

Live changes watchdog.

msgCodesLadMonStart 

Start ladder monitor.

msgCodesLadMonRestart 

Restart ladder monitor.

msgCodesLadMonStop 

Stop ladder monitor.

msgCodesLadMonWd 

Ladder monitor watchdog.

msgCodesLadMonStatus 

Ladder monitor status.

msgCodesFbReadLocalEntry 

Read entry (field bus, Local)

msgCodesFbWriteLocalEntry 

Write entry (field bus, Local)

msgCodesFbReadLocalNmt 

Read NMT status (field bus, Local)

msgCodesFbWriteLocalNmt 

Write NMT command (field bus, Local)

msgCodesFbReadCoeEntry 

Read entry (field bus, EtherCAT/COE)

msgCodesFbWriteCoeEntry 

Write entry (field bus, EtherCAT/COE)

msgCodesFbReadEcatNmt 

Read NMT status (field bus, EtherCAT)

msgCodesFbWriteEcatNmt 

Force NMT status (field bus, EtherCAT)

msgCodesFbReadCanEntry 

Read entry (field bus, CANopen)

msgCodesFbWriteCanEntry 

Write entry (field bus, CANopen)

msgCodesFbReadCanNmt 

Read NMT status (field bus, CANopen)

msgCodesFbWriteCanNmt 

Write NMT command (field bus, CANopen)

msgCodesFbReadIf 

Read interface information.

msgCodesFbWriteIf 

Write interface information.

msgCodesRpeAxesGroupResolve 

Resolve an axes group.

msgCodesRpeAxesGroupInfo 

Get information for an axes group.

msgCodesRpeAxesGroupList 

List available axes groups.

msgCodesRpeAxesGroupQuotes 

Query quotes for an axes group.

◆ VarTypes

enum VarTypes

The BCC protocol variable types.

For more information about these codes please refer to the BCC/31 Communication Protocol documentation.

For each type of variable, in the square parentheses are listed the properties needed for identification.

Enumerator
varInvalid 

Invalid variable type.

varBitParamI16 

Bit for a 16bit integer parameter [Index, Bit].

varBitParamI32 

Bit for a 32bit integer parameter [Index, Bit].

varBitParamI64 

Bit for a 64bit integer parameter [Index, Bit].

varBitAxisI16 

Bit for a 16bit integer axis parameter [Index, AxIndex, Bit].

varBitAxisI32 

Bit for a 32bit integer axis parameter [Index, AxIndex, Bit].

varBitAxisI64 

Bit for a 64bit integer axis parameter [Index, AxIndex, Bit].

varBitNvR64 

Bit for a 64bit non volatile integer register [Index, Bit].

varBitVR64 

Bit for a 64bit volatile integer register [Index, Bit].

varBitLogIW16 

Bit for a logical 16bit input word [Index, Bit].

varBitLogIW32 

Bit for a logical 32bit input word [Index, Bit].

varBitLogOW16 

Bit for a logical 16bit output word [Index, Bit].

varBitLogOW32 

Bit for a logical 32bit output word [Index, Bit].

varBitPhyIW16 

Bit for a physical 16bit input word [Index, Bit].

varBitPhyIW32 

Bit for a physical 32bit input word [Index, Bit].

varBitPhyOW16 

Bit for a physical 16bit output word [Index, Bit].

varBitPhyOW32 

Bit for a physical 32bit output word [Index, Bit].

varBitNvR16 

Bit for a 16bit non volatile integer register [Index, Bit].

varBitNvR32 

Bit for a 32bit non volatile integer register [Index, Bit].

varBitVR16 

Bit for a 16bit volatile integer register [Index, Bit].

varBitVR32 

Bit for a 32bit volatile integer register [Index, Bit].

varBitAM 

Bit for an alarm mask [Index, Bit].

varLogIW16 

Logical 16bit input word [Index, Count].

varLogIW32 

Logical 32bit input word [Index, Count].

varLogOW16 

Logical 16bit output word [Index, Count].

varLogOW32 

Logical 32bit output word [Index, Count].

varLogIC 

Logical input channel [Index].

varLogOC 

Logical output channel [Index].

varPhyIW16 

Physical 16bit input word [Index, Count].

varPhyIW32 

Physical 32bit input word [Index, Count].

varPhyOW16 

Physical 16bit output word [Index, Count].

varPhyOW32 

Physical 32bit output word [Index, Count].

varPhyIC 

Physical input channel [Index].

varPhyOC 

Physical output channel [Index].

varNvR16 

Non volatile 16bit integer register [Index, Count].

varNvR32 

Non volatile 32bit integer register [Index, Count].

varNvRR 

Non volatile real (double) register [Index, Count].

varNvRRF 

Non volatile float (getSingle) register [Index, Count].

varNvSR 

Non volatile string (zero termined) register [Index, Size].

varVR16 

Volatile 16bit integer register [Index, Count].

varVR32 

Volatile 32bit integer register [Index, Count].

varVRR 

Volatile real (double) register [Index, Count].

varVRRF 

Volatile float (getSingle) register [Index, Count].

varVSR 

Volatile string (zero termined) register [Index, Size].

varParamI16 

16bit integer parameter [Index, Count].

varParamI32 

32bit integer parameter [Index, Count].

varParamR 

Real (double) parameter [Index, Count].

varParamF 

Float (getSingle) parameter [Index, Count].

varAxisI16 

16bit integer axis parameter [Index, AxIndex, AxCount].

varAxisI32 

32bit integer axis parameter [Index, AxIndex, AxCount].

varAxisR 

Real (double) axis parameter [Index, AxIndex, AxCount].

varAxisF 

Float (getSingle) axis parameter [Index, AxIndex, AxCount].

varAM 

Alarm mask [Index, Count].

varAlarmN 

Alarm code (in alarm stack) [Index, Count].

varAlarmS 

Alarm text (in alarm stack) [Index, Size].

varNvR64 

Non volatile 64bit integer register [Index, Count].

varVR64 

Volatile 64bit integer register [Index, Count].

varParamI64 

64 bit integer parameter [Index, Count].

varAxisI64 

64 bit integer axis parameter [Index, AxIndex, AxCount].

varNamed 

Variable identified by its name.

varCached 

Variable identified by its cached information.

Constructor & Destructor Documentation

◆ Message() [1/3]

Message ( )

Public constructor.

◆ Message() [2/3]

Message ( const Message & src)

Public copy constructor.

Parameters
srcThe source message

◆ ~Message()

virtual ~Message ( )
virtual

Public destructor.

◆ Message() [3/3]

Message ( const uint8_t * rawData)
protected

Constructor from BCC raw data.

Parameters
rawDataThe BCC raw data buffer

Member Function Documentation

◆ clear()

void clear ( )

Clear the content of the message.

◆ copy()

void copy ( const Message * src)

Copy data from source.

Parameters
srcThe source message

◆ copyBuffer()

bool copyBuffer ( uint8_t * target,
uint32_t toffset )

Copy the data buffer into the target buffer at the specified offset.

Parameters
targetTarget buffer.
toffsetTarget buffer offset.
Returns
Return operation logical result.

◆ copyFromBuffer() [1/3]

bool copyFromBuffer ( uint32_t toffset,
const RLibCpp::Tool::ByteVector & source )

Copy the source buffer into the data buffer at the specified offset.

Parameters
toffsetData buffer offset.
sourceSource buffer.
Returns
Return operation logical result.

◆ copyFromBuffer() [2/3]

bool copyFromBuffer ( uint32_t toffset,
const uint8_t * source,
uint32_t count )

Copy the source buffer into the data buffer at the specified offset.

Parameters
toffsetData buffer offset.
sourceSource buffer.
countNumber of uint8_t to copy.
Returns
Return operation logical result.

◆ copyFromBuffer() [3/3]

bool copyFromBuffer ( uint32_t toffset,
const uint8_t * source,
uint32_t soffset,
uint32_t count )

Copy part of the source buffer into the data buffer at the specified offset.

Parameters
toffsetData buffer offset.
sourceSource buffer.
soffsetSource buffer offset.
countNumber of uint8_t to copy.
Returns
Return operation logical result.

◆ copyToBuffer() [1/2]

bool copyToBuffer ( RLibCpp::Tool::ByteVector & target,
uint32_t soffset,
uint32_t count )

Copy part of the data buffer into the target buffer at the specified offset.

Parameters
targetTarget buffer.
soffsetData buffer offset.
countNumber of uint8_t to copy.
Returns
Return operation logical result.

◆ copyToBuffer() [2/2]

bool copyToBuffer ( uint8_t * target,
uint32_t toffset,
uint32_t soffset,
uint32_t count )

Copy part of the data buffer into the target buffer at the specified offset.

Parameters
targetTarget buffer.
toffsetTarget buffer offset.
soffsetData buffer offset.
countNumber of uint8_t to copy.
Returns
Return operation logical result.

◆ data()

uint8_t * data ( )

Get a pointer to the data buffer of the message.

Returns
The pointer to the data buffer of the message

Only the first dataLength() bytes are significant

◆ dataLength()

uint8_t dataLength ( )

Get the data buffer length.

Returns
The data buffer length

◆ dch()

uint8_t dch ( )

Get the destination channel.

Returns
The channel id

◆ dst()

uint8_t dst ( )

Get the destination id.

Returns
The destination id

◆ getDouble() [1/2]

double getDouble ( uint32_t offset)

Read a double value from the data buffer at the specified offset.

Parameters
offsetData buffer offset.
Returns
Returns the read value

◆ getDouble() [2/2]

bool getDouble ( uint32_t offset,
double & value )

Read a double value from the data buffer at the specified offset.

Parameters
offsetData buffer offset.
valueValue read.
Returns
Return operation logical result.

◆ getI16() [1/2]

int16_t getI16 ( uint32_t offset)

Read an I16 value from the data buffer at the specified offset.

Parameters
offsetData buffer offset.
Returns
Returns the read value

◆ getI16() [2/2]

bool getI16 ( uint32_t offset,
int16_t & value )

Read an I16 value from the data buffer at the specified offset.

Parameters
offsetData buffer offset.
valueValue read.
Returns
Return operation logical result.

◆ getI32() [1/2]

int32_t getI32 ( uint32_t offset)

Read an I32 value from the data buffer at the specified offset.

Parameters
offsetData buffer offset.
Returns
Returns the read value

◆ getI32() [2/2]

bool getI32 ( uint32_t offset,
int32_t & value )

Read an I32 value from the data buffer at the specified offset.

Parameters
offsetData buffer offset.
valueValue read.
Returns
Return operation logical result.

◆ getI64() [1/2]

int64_t getI64 ( uint32_t offset)

Read an I64 value from the data buffer at the specified offset.

Parameters
offsetData buffer offset.
Returns
Returns the read value

◆ getI64() [2/2]

bool getI64 ( uint32_t offset,
int64_t & value )

Read an I64 value from the data buffer at the specified offset.

Parameters
offsetData buffer offset.
valueValue read.
Returns
Return operation logical result.

◆ getI8() [1/2]

int8_t getI8 ( uint32_t offset)

Read an I8 value from the data buffer at the specified offset.

Parameters
offsetData buffer offset.
Returns
Returns the read value

◆ getI8() [2/2]

bool getI8 ( uint32_t offset,
int8_t & value )

Read an I8 value from the data buffer at the specified offset.

Parameters
offsetData buffer offset.
valueValue read.
Returns
Return operation logical result.

◆ getSingle() [1/2]

float getSingle ( uint32_t offset)

Read a float value from the data buffer at the specified offset.

Parameters
offsetData buffer offset.
Returns
Returns the read value

◆ getSingle() [2/2]

bool getSingle ( uint32_t offset,
float & value )

Read a float value from the data buffer at the specified offset.

Parameters
offsetData buffer offset.
valueValue read.
Returns
Return operation logical result.

◆ getStringUTF8() [1/2]

RLibCpp::Tool::String getStringUTF8 ( uint32_t offset)

Read a UTF-8 encoded string value from the data buffer at the specified offset: the read operation will consider the \0 cstring terminator.

Parameters
offsetData buffer offset.
Returns
Returns the read value

◆ getStringUTF8() [2/2]

bool getStringUTF8 ( uint32_t offset,
RLibCpp::Tool::String & value )

Read a UTF-8 encoded string value from the data buffer at the specified offset: the read operation will consider the \0 cstring terminator.

Parameters
offsetData buffer offset.
valueValue read.
Returns
Return operation logical result.

◆ getU16() [1/2]

uint16_t getU16 ( uint32_t offset)

Read an U16 value from the data buffer at the specified offset.

Parameters
offsetData buffer offset.
Returns
Returns the read value

◆ getU16() [2/2]

bool getU16 ( uint32_t offset,
uint16_t & value )

Read an U16 value from the data buffer at the specified offset.

Parameters
offsetData buffer offset.
valueValue read.
Returns
Return operation logical result.

◆ getU32() [1/2]

uint32_t getU32 ( uint32_t offset)

Read an U32 value from the data buffer at the specified offset.

Parameters
offsetData buffer offset.
Returns
Returns the read value

◆ getU32() [2/2]

bool getU32 ( uint32_t offset,
uint32_t & value )

Read an U32 value from the data buffer at the specified offset.

Parameters
offsetData buffer offset.
valueValue read.
Returns
Return operation logical result.

◆ getU64() [1/2]

uint64_t getU64 ( uint32_t offset)

Read an U64 value from the data buffer at the specified offset.

Parameters
offsetData buffer offset.
Returns
Returns the read value

◆ getU64() [2/2]

bool getU64 ( uint32_t offset,
uint64_t & value )

Read an U64 value from the data buffer at the specified offset.

Parameters
offsetData buffer offset.
valueValue read.
Returns
Return operation logical result.

◆ getU8() [1/2]

uint8_t getU8 ( uint32_t offset)

Read an U8 value from the data buffer at the specified offset.

Parameters
offsetData buffer offset.
Returns
Returns the read value

◆ getU8() [2/2]

bool getU8 ( uint32_t offset,
uint8_t & value )

Read an U8 value from the data buffer at the specified offset.

Parameters
offsetData buffer offset.
valueValue read.
Returns
Return operation logical result.

◆ message()

Message::bccMessage & message ( )
protected

Get the BCC message raw data.

Returns
The parameter value

◆ msg()

uint16_t msg ( )

Get the message code.

Returns
The message code

◆ operator==()

bool operator== ( const Message & other)

Comparison operator.

Parameters
otherThe objetc to compare
Returns
True if the object have same content

◆ pid()

uint8_t pid ( )

The protocol identifier (0-255).

Returns
The protocol identifier

◆ rawData()

uint8_t * rawData ( ) const

Get a pointer to the raw message buffer.

Returns
The pointer to the raw data buffer

◆ sch()

uint8_t sch ( )

Get the source channel.

Returns
The channel id

◆ setDataLength()

void setDataLength ( uint8_t len)

Set the data buffer length.

Parameters
lenThe value to set

◆ setDataSize()

bool setDataSize ( int32_t size)

Setups the data buffer size.

Parameters
sizeThe size to set [0..255]
Returns
Return operation logical result.

If size == 0 the the data buffer is cleared

If data buffer contains some data then they will be preserved for a maximum Min(size, getLength()) bytes

◆ setDch()

void setDch ( uint8_t dch)

Set the destination channel.

Parameters
dchThe value to set

◆ setDouble()

bool setDouble ( uint32_t offset,
double value )

Write a double value into the data buffer at the specified offset.

Parameters
offsetData buffer offset.
valueValue to write.
Returns
Return operation logical result.

◆ setDst()

void setDst ( uint8_t dst)

Set the destination id.

Parameters
dstThe value to set

◆ setI16()

bool setI16 ( uint32_t offset,
int16_t value )

Write an I16 value into the data buffer at the specified offset.

Parameters
offsetData buffer offset.
valueValue to write.
Returns
Return operation logical result.

◆ setI32()

bool setI32 ( uint32_t offset,
int32_t value )

Write an I32 value into the data buffer at the specified offset.

Parameters
offsetData buffer offset.
valueValue to write.
Returns
Return operation logical result.

◆ setI64()

bool setI64 ( uint32_t offset,
int64_t value )

Write an I64 value into the data buffer at the specified offset.

Parameters
offsetData buffer offset.
valueValue to write.
Returns
Return operation logical result.

◆ setI8()

bool setI8 ( uint32_t offset,
int8_t value )

Write an I8 value into the data buffer at the specified offset.

Parameters
offsetData buffer offset.
valueValue to write.
Returns
Return operation logical result.

◆ setMessage()

void setMessage ( const bccMessage & value)
protected

Set the BCC message raw data.

Parameters
valueThe value to set

◆ setMsg()

void setMsg ( uint16_t msg)

Set the message code.

Parameters
msgThe value to set

◆ setPid()

void setPid ( uint8_t value)

Set the protocol identifier.

Parameters
valueThe value to set

◆ setSch()

void setSch ( uint8_t sch)

Set the source channel.

Parameters
schThe value to set

◆ setSingle()

bool setSingle ( uint32_t offset,
float value )

Write a float value into the data buffer at the specified offset.

Parameters
offsetData buffer offset.
valueValue to write.
Returns
Return operation logical result.

◆ setSrc()

void setSrc ( uint8_t src)

Set the source id.

Parameters
srcThe value to set

◆ setStringUTF8() [1/2]

bool setStringUTF8 ( uint32_t offset,
const RLibCpp::Tool::String & value,
bool cstring = false,
int32_t maxChars = -1 )

Write a string value into the data buffer at the specified offset, with UTF-8 encoding.

Parameters
offsetData buffer offset.
valueSource string.
cstringFlag to add the \0 cstring terminator (optional.)
maxCharsMaximum number of chars to write (opzional)
Returns
Return operation logical result.

◆ setStringUTF8() [2/2]

bool setStringUTF8 ( uint32_t offset,
const RLibCpp::Tool::String & value,
int32_t maxChars = -1 )

Write a string value (with UTF-8 encoding) into the data buffer at the specified offset.

Parameters
offsetData buffer offset.
valueValue to write.
maxCharsMaximum number of chars to write (opzional)
Returns
Return operation logical result.

◆ setU16()

bool setU16 ( uint32_t offset,
uint16_t value )

Write an U16 value into the data buffer at the specified offset.

Parameters
offsetData buffer offset.
valueValue to write.
Returns
Return operation logical result.

◆ setU32()

bool setU32 ( uint32_t offset,
uint32_t value )

Write an U32 value into the data buffer at the specified offset.

Parameters
offsetData buffer offset.
valueValue to write.
Returns
Return operation logical result.

◆ setU64()

bool setU64 ( uint32_t offset,
uint64_t value )

Write an U64 value into the data buffer at the specified offset.

Parameters
offsetData buffer offset.
valueValue to write.
Returns
Return operation logical result.

◆ setU8()

bool setU8 ( uint32_t offset,
uint8_t value )

Write an U8 value into the data buffer at the specified offset.

Parameters
offsetData buffer offset.
valueValue to write.
Returns
Return operation logical result.

◆ src()

uint8_t src ( )

Get the source id.

Returns
The source id

Friends And Related Symbol Documentation

◆ ClientStruct::ErrorData

friend class ClientStruct::ErrorData
friend

◆ ClientWrapper

friend class ClientWrapper
friend

◆ Connection

friend class Connection
friend

◆ Link

friend class Link
friend

◆ LocalClientLink

friend class LocalClientLink
friend

◆ TcpLink

friend class TcpLink
friend

Member Data Documentation

◆ PACKED_STRUCTURE

struct RLIBCPP_BCC_DLL PACKED_STRUCTURE RLibCpp::Bcc::Message::bccMessage PACKED_STRUCTURE
protected

◆ RAW_DATA_SIZE

const uint32_t RAW_DATA_SIZE = sizeof(bccMessage)
static

Thes size of the message raw data.