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

Protocol class declaration. More...

#include <protocol.h>

Public Types

enum  VarTypes : uint16_t {
  varInvalid = 0x0 , varBitParamI16 = 0x7 , varBitParamI32 = 0x8 , varBitParamI64 = 0x9 ,
  varBitAxisI16 = 0xA , varBitAxisI32 = 0xB , varBitAxisI64 = 0xC , varBitNvR64 = 0xD ,
  varBitVR64 = 0xE , varBitLogIW16 = 0x10 , varBitLogIW32 = 0x11 , varBitLogOW16 = 0x12 ,
  varBitLogOW32 = 0x13 , varBitPhyIW16 = 0x14 , varBitPhyIW32 = 0x15 , varBitPhyOW16 = 0x16 ,
  varBitPhyOW32 = 0x17 , varBitNvR16 = 0x18 , varBitNvR32 = 0x19 , varBitVR16 = 0x1A ,
  varBitVR32 = 0x1B , varBitMem8 = 0x1C , varBitMem16 = 0x001D , varBitMem32 = 0x1E ,
  varBitAM = 0x1F , varTimerQ = 0x20 , varTimerEN = 0x21 , varTimerET = 0x22 ,
  varTimerPT = 0x23 , varTimerPT2 = 0x24 , varCounterQU = 0x30 , varCounterQD = 0x31 ,
  varCounterCU = 0x32 , varCounterCD = 0x33 , varCounterCV = 0x34 , varCounterPV = 0x35 ,
  varLogU8 = 0x40 , varLogU16 = 0x41 , varLogU32 = 0x42 , varLogU64 = 0x43 ,
  varLogI8 = 0x44 , varLogI16 = 0x45 , varLogI32 = 0x46 , varLogI64 = 0x47 ,
  varLogDouble = 0x48 , varLogFloat = 0x49 , varBitLogU8 = 0x4A , varBitLogU16 = 0x4B ,
  varBitLogU32 = 0x4C , varBitLogU64 = 0x4D , varBitLogI8 = 0x4E , varBitLogI16 = 0x4F ,
  varBitLogI32 = 0x50 , varBitLogI64 = 0x51 , varLogStrZ = 0x52 , varLogIW16 = 0x64 ,
  varLogIW32 = 0x65 , varLogOW16 = 0x66 , varLogOW32 = 0x67 , varLogIC = 0x68 ,
  varLogOC = 0x69 , varPhyIW16 = 0x6A , varPhyIW32 = 0x6B , varPhyOW16 = 0x6C ,
  varPhyOW32 = 0x6D , varPhyIC = 0x6E , varPhyOC = 0x6F , varNvR16 = 0xC8 ,
  varNvR32 = 0xC9 , varNvRR = 0xCA , varNvRRF = 0xCB , varNvSR = 0xCC ,
  varVR16 = 0xCD , varVR32 = 0xCE , varVRR = 0xCF , varVRRF = 0xD0 ,
  varVSR = 0xD1 , varParamI16 = 0xD2 , varParamI32 = 0xD3 , varParamR = 0xD4 ,
  varParamF = 0xD5 , varAxisI16 = 0xD6 , varAxisI32 = 0xD7 , varAxisR = 0xD8 ,
  varAxisF = 0xD9 , varAM = 0xE1 , varAlarmN = 0xE2 , varAlarmS = 0xE3 ,
  varNvR64 = 0xE4 , varVR64 = 0xE5 , varParamI64 = 0xE6 , varAxisI64 = 0xE7 ,
  varSystime = 0x12C , varMemU8 = 0x1F4 , varMemU16 = 0x1F5 , varMemU32 = 0x1F6 ,
  varMemDBL = 0x1F7 , varMemFLT = 0x1F8 , varPortIO8 = 0x1F9 , varPortIO16 = 0x1FA ,
  varMemI8 = 0x1FB , varMemI16 = 0x1FC , varMemI32 = 0x1FD , varMemU64 = 0x1FE ,
  varMemI64 = 0x1FF
}
 Variable types. More...
 
enum  EvaFlags : uint32_t { evafEnumStandardVars = 0x1 , evafEnumUserTaskVars = 0x2 , evafEnumLogicalVars = 0x4 , evafForceEnumeration = 0x8 }
 Flags per bccEnumVar. More...
 

Static Public Member Functions

static int32_t maxDataSize ()
 Get the maximum data size ( MaxDataSize)
 

Static Public Attributes

static const int32_t MaxRxTimeout
 The default maximum general receive timeout [ms].
 
static const int32_t MaxTxTimeout
 The default maximum general send timeout [ms].
 
static const int32_t MaxCmdTimeout
 The default maximum command timeout [ms].
 
static const int32_t MaxAsciiCmdTimeout
 The default maximum ascii command timeout [ms].
 
static const int32_t MaxWDTimeout
 The default maximum watch-dog timeout [ms].
 
static const int32_t MaxRxDataTimeout
 The default maximum data receive timeout [ms].
 
static const int32_t MaxTxDataTimeout
 The default maximum data send timeout [ms].
 
static const int32_t MaxWaitTimeout
 The default maximum wait period [ms].
 
static const int32_t MaxHeader = 9
 
static const int32_t MaxData = 255
 
static const int32_t MaxMsgSize = (MaxHeader + MaxData)
 

Protected Types

enum  EvMemTypes {
  evMemInvalid = 0 , evMemU8 = 1 , evMemI8 = 2 , evMemU16 = 3 ,
  evMemI16 = 4 , evMemU32 = 5 , evMemI32 = 6 , evMemDouble = 7 ,
  evMemFloat = 8 , evMemBool = 9 , evMemChArray = 10 , evMemStruct = 11 ,
  evMemStringZ = 12 , evMemBit = 13 , evMemTimer = 14 , evMemCounter = 15 ,
  evMemU64 = 17 , evMemI64 = 18
}
 Type of variables for bccEnumVar - memory variables. More...
 
enum  EvMemFlags {
  evMemFHasDim0 = 0x1 , evMemFHasDim1 = 0x2 , evMemFHasDim2 = 0x4 , evMemFHasRepeat = 0x8 ,
  evMemFHasParent = 0x10
}
 Flags for bccEnumVar - memory variables. More...
 
enum  EvLogVFlags { evLogVFNoBits = 0x1 }
 Flags for for bccEnumVar - logical variables. More...
 
enum  EvLogSFlags { evLogSFBegStruct = 0x1 , evLogSFEndStruct = 0x2 , evLogSFNoBits = 0x4 }
 Flags for bccEnumVar - logical structures. More...
 
enum  EvLogTypes {
  evLogInvalid = 0x0 , evLogI8 = 0x1 , evLogU8 = 0x2 , evLogI16 = 0x3 ,
  evLogU16 = 0x4 , evLogI32 = 0x5 , evLogU32 = 0x6 , evLogI64 = 0x7 ,
  evLogU64 = 0x8 , evLogStringZ = 0x9 , evLogFloat = 0xA , evLogDouble = 0xB ,
  evLogBool = 0xC , evLogTimer = 0xD , evLogCounter = 0xE , evLogLadAlias = 0xF ,
  evLogLadEdge = 0x10 , evLogFirstUser = 0x10000
}
 Type of variables for bccEnumVar - logical structures. More...
 
enum  EvLadTypes {
  evLadInvalid = 0 , evLadLogIC = 1 , evLadLogIW16 = 2 , evLadBitLogIW16 = 3 ,
  evLadLogIW32 = 4 , evLadBitLogIW32 = 5 , evLadLogOC = 6 , evLadLogOW16 = 7 ,
  evLadBitLogOW16 = 8 , evLadLogOW32 = 9 , evLadBitLogOW32 = 10 , evLadVR32 = 11 ,
  evLadBitVR32 = 12 , evLadNvR32 = 13 , evLadBitNvR32 = 14 , evLadVRR = 15 ,
  evLadNvRR = 16 , evLadAM = 17 , evLadBitAM = 18
}
 Type of variables for bccEnumVar - ladder diagram alias. More...
 
enum  EvStdTypes {
  evStdInvalid = 0 , evStdLogIC = 1 , evStdLogIW16 = 2 , evStdLogIW32 = 3 ,
  evStdLogOC = 4 , evStdLogOW16 = 5 , evStdLogOW32 = 6 , evStdVR32 = 7 ,
  evStdNvR32 = 8 , evStdVRR = 9 , evStdNvRR = 10 , evStdAlMask = 11 ,
  evStdVSR = 12 , evStdNvSR = 13 , evStdParamI16 = 14 , evStdParamI32 = 15 ,
  evStdParamR = 16 , evStdParamF = 17 , evStdAxisI16 = 18 , evStdAxisI32 = 19 ,
  evStdAxisR = 20 , evStdAxisF = 21 , evStdAlarmN = 22 , evStdAlarmS = 23 ,
  evStdVR64 = 24 , evStdNvR64 = 25 , evStdParamI64 = 26 , evStdAxisI64 = 27
}
 Type of variables for bccEnumVar - standard variables. More...
 
enum  EvStdFlags { evStdFHasArray = 0x1 , evStdFHasAxis = 0x2 , evStdFHasRepeat = 0x4 , evStdFHasOffset = 0x8 }
 Flags for bccEnumVar - standard variables. More...
 
enum  EvTypes { evGroupMarker = 0xffff }
 Type of variables for bccEnumVar. More...
 
enum  EvTTypes {
  evTInvalid = 0 , evTLadderAlias = 10 , evTMemoryVar = 11 , evTStandardVar = 12 ,
  evTLogicalStruct = 13 , evTLogicalVar = 14
}
 Type of variables for bccEnumVar. More...
 

Static Protected Attributes

static const char Version
 BCC protocol version.
 
static const int32_t HeaderSize
 BCC header size.
 
static const int32_t MaxDataSize
 BCC maximun data size.
 

Friends

class RVar::FillHelper
 
class RVar::Remote
 
class RVar::RemoteTimer
 
class RVar::RemoteCounter
 
class RVar::Logical
 

Detailed Description

Protocol class declaration.

Member Enumeration Documentation

◆ EvaFlags

enum EvaFlags : uint32_t

Flags per bccEnumVar.

Enumerator
evafEnumStandardVars 

Standard variables.

evafEnumUserTaskVars 

User task variables.

evafEnumLogicalVars 

Logical variables.

evafForceEnumeration 

Flag to force enumeration.

◆ EvLadTypes

enum EvLadTypes
protected

Type of variables for bccEnumVar - ladder diagram alias.

Enumerator
evLadInvalid 

Not valid type.

evLadLogIC 

Logical input channel.

evLadLogIW16 

Logical input word 16.

evLadBitLogIW16 

Logical bit input word 16.

evLadLogIW32 

Logical input word 32.

evLadBitLogIW32 

Logical bitinput word 32.

evLadLogOC 

Logical output channel.

evLadLogOW16 

Logical output word 16.

evLadBitLogOW16 

Logical bit output word 16.

evLadLogOW32 

Logical output word 32.

evLadBitLogOW32 

Logical bit output word 32.

evLadVR32 

Volatile register 32.

evLadBitVR32 

Volatile bit register 32.

evLadNvR32 

Non volatile register 32.

evLadBitNvR32 

Non volatile bit register 32.

evLadVRR 

Volatile real register.

evLadNvRR 

Non volatile real register.

evLadAM 

Alarm mask.

evLadBitAM 

Bit alarm mask.

◆ EvLogSFlags

enum EvLogSFlags
protected

Flags for bccEnumVar - logical structures.

Enumerator
evLogSFBegStruct 

Struct begin flag.

evLogSFEndStruct 

Struct end flag.

evLogSFNoBits 

No bits flag.

◆ EvLogTypes

enum EvLogTypes
protected

Type of variables for bccEnumVar - logical structures.

Enumerator
evLogInvalid 

Not valid type.

evLogI8 

8 bit signed

evLogU8 

8 bit unsigned

evLogI16 

16 bit signed

evLogU16 

16 bit unsigned

evLogI32 

32 bit signed

evLogU32 

32 bit unsigned

evLogI64 

64 bit signed

evLogU64 

64 bit unsigned

evLogStringZ 

Zero termianted string.

evLogFloat 

Signle precison.

evLogDouble 

Double precison.

evLogBool 

Boolean.

evLogTimer 

Timer.

evLogCounter 

Counter.

evLogLadAlias 

Ladder alias.

evLogLadEdge 

Ladder edge.

evLogFirstUser 

First user flag.

◆ EvLogVFlags

enum EvLogVFlags
protected

Flags for for bccEnumVar - logical variables.

Enumerator
evLogVFNoBits 

No bits flag.

◆ EvMemFlags

enum EvMemFlags
protected

Flags for bccEnumVar - memory variables.

Enumerator
evMemFHasDim0 

Has dimension 0 flag.

evMemFHasDim1 

Has dimension 1 flag.

evMemFHasDim2 

Has dimension 2 flag.

evMemFHasRepeat 

Has repetitions flag.

evMemFHasParent 

Has parent flag.

◆ EvMemTypes

enum EvMemTypes
protected

Type of variables for bccEnumVar - memory variables.

Enumerator
evMemInvalid 

Not valid type.

evMemU8 

8 bit unsigned

evMemI8 

8 bit signed

evMemU16 

16 bit unsigned

evMemI16 

16 bit signed

evMemU32 

32 bit unsigned

evMemI32 

32 bit signed

evMemDouble 

Double precison.

evMemFloat 

Signle precison.

evMemBool 

Boolean.

evMemChArray 

Characters array.

evMemStruct 

Structure.

evMemStringZ 

Zero termianted string.

evMemBit 

Bit.

evMemTimer 

Timer.

evMemCounter 

Counter.

evMemU64 

64 bit unsigned

evMemI64 

64 bit signed

◆ EvStdFlags

enum EvStdFlags
protected

Flags for bccEnumVar - standard variables.

Enumerator
evStdFHasArray 

Has array flag.

evStdFHasAxis 

Has axis flag.

evStdFHasRepeat 

Has repetitions flag.

evStdFHasOffset 

Has offset flag.

◆ EvStdTypes

enum EvStdTypes
protected

Type of variables for bccEnumVar - standard variables.

Enumerator
evStdInvalid 

Not valid type.

evStdLogIC 

Logical input channel.

evStdLogIW16 

Logical input word 16.

evStdLogIW32 

Logical input word 32.

evStdLogOC 

Logical output channel.

evStdLogOW16 

Logical output word 16.

evStdLogOW32 

Logical output word 32.

evStdVR32 

Volatile register 32.

evStdNvR32 

Non volatile register 32.

evStdVRR 

Volatile real register.

evStdNvRR 

Non volatile real register.

evStdAlMask 

Alarm mask.

evStdVSR 

Volatile string register.

evStdNvSR 

Non volatile string register.

evStdParamI16 

16 bit signed parameter

evStdParamI32 

32 bit signed parameter

evStdParamR 

R parameter.

evStdParamF 

F parameter.

evStdAxisI16 

16 bit signed axis

evStdAxisI32 

32 bit signed axis

evStdAxisR 

R axis.

evStdAxisF 

F axis.

evStdAlarmN 

Alarm number.

evStdAlarmS 

Alarm string.

evStdVR64 

Volatile register 64.

evStdNvR64 

Non volatile register 64.

evStdParamI64 

64 bit signed parameter

evStdAxisI64 

64 bit signed axis

◆ EvTTypes

enum EvTTypes
protected

Type of variables for bccEnumVar.

Enumerator
evTInvalid 

Invalid type.

evTLadderAlias 

Ladder alias.

evTMemoryVar 

Memory variable.

evTStandardVar 

Standard variable.

evTLogicalStruct 

Logical struct.

evTLogicalVar 

Logical variable.

◆ EvTypes

enum EvTypes
protected

Type of variables for bccEnumVar.

Enumerator
evGroupMarker 

◆ VarTypes

enum VarTypes : uint16_t

Variable types.

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].

varBitMem8 

Bit value for 8bit memory.

varBitMem16 

Bit value for 16bit memory.

varBitMem32 

Bit value for 32bit memory.

varBitAM 

Bit for an alarm mask [Index, Bit].

varTimerQ 

Timer result (Q)

varTimerEN 

Timer enable (EN)

varTimerET 

Timer elapsed time (ET)

varTimerPT 

Timer preset (PT)

varTimerPT2 

Timer preset 2 (PT2)

varCounterQU 

Counter up result (QU)

varCounterQD 

Counter down result (QD)

varCounterCU 

Counter enable up (CU)

varCounterCD 

Counter enable down (CD)

varCounterCV 

Counter current value (CV)

varCounterPV 

Counter preset value (PV)

varLogU8 

Logical unsigned 8bit.

varLogU16 

Logical unsigned 16bit.

varLogU32 

Logical unsigned 32bit.

varLogU64 

Logical unsigned 64bit.

varLogI8 

Logical signed 8bit.

varLogI16 

Logical signed 16bit.

varLogI32 

Logical signed 32bit.

varLogI64 

Logical signed 64bit.

varLogDouble 

Logical double 64bit.

varLogFloat 

Logical float 32bit.

varBitLogU8 

Bit value for logical unsigned 8bit.

varBitLogU16 

Bit value for logical unsigned 16bit.

varBitLogU32 

Bit value for logical unsigned 32bit.

varBitLogU64 

Bit value for logical unsigned 64bit.

varBitLogI8 

Bit value for logical signed 8bit.

varBitLogI16 

Bit value for logical signed 16bit.

varBitLogI32 

Bit value for logical signed 32bit.

varBitLogI64 

Bit value for logical signed 64bit.

varLogStrZ 

Logical string (0 termined)

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 (single) 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 (single) 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 (single) 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 (single) 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].

varSystime 

System time (us, from boot)

varMemU8 

Unsigned memory 8bit.

varMemU16 

Unsigned memory 16bit.

varMemU32 

Unsigned memory 32bit.

varMemDBL 

Memory double (64bit)

varMemFLT 

Memory float (32bit)

varPortIO8 

I/O port 8bit.

varPortIO16 

I/O port 16bit.

varMemI8 

Signed memory 8bit.

varMemI16 

Signed memory 16bit.

varMemI32 

Signed memory 32bi.

varMemU64 

Unsigned memory 64bit.

varMemI64 

Signed memory 64bit.

Member Function Documentation

◆ maxDataSize()

static int32_t maxDataSize ( )
static

Get the maximum data size ( MaxDataSize)

Returns
The maximum data size

Friends And Related Symbol Documentation

◆ RVar::FillHelper

friend class RVar::FillHelper
friend

◆ RVar::Logical

friend class RVar::Logical
friend

◆ RVar::Remote

friend class RVar::Remote
friend

◆ RVar::RemoteCounter

friend class RVar::RemoteCounter
friend

◆ RVar::RemoteTimer

friend class RVar::RemoteTimer
friend

Member Data Documentation

◆ HeaderSize

const int32_t HeaderSize
staticprotected

BCC header size.

◆ MaxAsciiCmdTimeout

const int32_t MaxAsciiCmdTimeout
static

The default maximum ascii command timeout [ms].

◆ MaxCmdTimeout

const int32_t MaxCmdTimeout
static

The default maximum command timeout [ms].

◆ MaxData

const int32_t MaxData = 255
static

◆ MaxDataSize

const int32_t MaxDataSize
staticprotected

BCC maximun data size.

◆ MaxHeader

const int32_t MaxHeader = 9
static

◆ MaxMsgSize

const int32_t MaxMsgSize = (MaxHeader + MaxData)
static

◆ MaxRxDataTimeout

const int32_t MaxRxDataTimeout
static

The default maximum data receive timeout [ms].

◆ MaxRxTimeout

const int32_t MaxRxTimeout
static

The default maximum general receive timeout [ms].

◆ MaxTxDataTimeout

const int32_t MaxTxDataTimeout
static

The default maximum data send timeout [ms].

◆ MaxTxTimeout

const int32_t MaxTxTimeout
static

The default maximum general send timeout [ms].

◆ MaxWaitTimeout

const int32_t MaxWaitTimeout
static

The default maximum wait period [ms].

◆ MaxWDTimeout

const int32_t MaxWDTimeout
static

The default maximum watch-dog timeout [ms].

◆ Version

const char Version
staticprotected

BCC protocol version.