armarx::control::ethercat::datatypes::EtherCATDataType Namespace Reference

Holds all the types we support via EtherCAT as their C++ equivalents along with some tools to handle them. More...

Typedefs

using BIT1 = std::bitset< 1 >
 
using BIT2 = std::bitset< 2 >
 
using BIT3 = std::bitset< 3 >
 
using BIT4 = std::bitset< 4 >
 
using BIT5 = std::bitset< 5 >
 
using BIT6 = std::bitset< 6 >
 
using BIT7 = std::bitset< 7 >
 
using BIT8 = std::bitset< 8 >
 
using BOOLEAN = bool
 
using BYTE = uint8_t
 
using INTEGER16 = int16_t
 
using INTEGER24 = std::bitset< 24 >
 
using INTEGER32 = int32_t
 
using INTEGER64 = int64_t
 
using INTEGER8 = int8_t
 
using OCTET_STRING = std::vector< uint8_t >
 
using REAL32 = float
 
using REAL64 = double
 
using TIME_DIFFERENCE = uint64_t
 
using TIME_OF_DAY = std::bitset< 48 >
 
using UNICODE_STRING = std::string
 
using UNSIGNED16 = uint16_t
 
using UNSIGNED24 = std::bitset< 24 >
 
using UNSIGNED32 = uint32_t
 
using UNSIGNED64 = uint64_t
 
using UNSIGNED8 = uint8_t
 
using VISIBLE_STRING = std::string
 

Variables

template<typename T >
constexpr int bitLength = -1
 Defines the length of the various EtherCATDataTypes in bits. More...
 
template<>
constexpr int bitLength< BIT1 > = 1
 
template<>
constexpr int bitLength< BIT2 > = 2
 
template<>
constexpr int bitLength< BIT3 > = 3
 
template<>
constexpr int bitLength< BIT4 > = 4
 
template<>
constexpr int bitLength< BIT5 > = 5
 
template<>
constexpr int bitLength< BIT6 > = 6
 
template<>
constexpr int bitLength< BIT7 > = 7
 
template<>
constexpr int bitLength< BIT8 > = 8
 
template<>
constexpr int bitLength< BOOLEAN > = 8
 
template<>
constexpr int bitLength< INTEGER16 > = 16
 
template<>
constexpr int bitLength< INTEGER24 > = 24
 
template<>
constexpr int bitLength< INTEGER32 > = 32
 
template<>
constexpr int bitLength< INTEGER64 > = 64
 
template<>
constexpr int bitLength< INTEGER8 > = 8
 
template<>
constexpr int bitLength< OCTET_STRING > = -1
 
template<>
constexpr int bitLength< REAL32 > = 32
 
template<>
constexpr int bitLength< REAL64 > = 64
 
template<>
constexpr int bitLength< TIME_OF_DAY > = 48
 
template<>
constexpr int bitLength< UNSIGNED16 > = 16
 
template<>
constexpr int bitLength< UNSIGNED32 > = 32
 
template<>
constexpr int bitLength< UNSIGNED64 > = 64
 
template<>
constexpr int bitLength< UNSIGNED8 > = 8
 
template<>
constexpr int bitLength< VISIBLE_STRING > = -1
 

Detailed Description

Holds all the types we support via EtherCAT as their C++ equivalents along with some tools to handle them.

We use the types defined here to actually move the data around, and the templates to perform type-agnostic operations.

Typedef Documentation

◆ BIT1

using BIT1 = std::bitset<1>

Definition at line 86 of file EtherCATDataTypes.h.

◆ BIT2

using BIT2 = std::bitset<2>

Definition at line 87 of file EtherCATDataTypes.h.

◆ BIT3

using BIT3 = std::bitset<3>

Definition at line 88 of file EtherCATDataTypes.h.

◆ BIT4

using BIT4 = std::bitset<4>

Definition at line 89 of file EtherCATDataTypes.h.

◆ BIT5

using BIT5 = std::bitset<5>

Definition at line 90 of file EtherCATDataTypes.h.

◆ BIT6

using BIT6 = std::bitset<6>

Definition at line 91 of file EtherCATDataTypes.h.

◆ BIT7

using BIT7 = std::bitset<7>

Definition at line 92 of file EtherCATDataTypes.h.

◆ BIT8

using BIT8 = std::bitset<8>

Definition at line 93 of file EtherCATDataTypes.h.

◆ BOOLEAN

using BOOLEAN = bool

Definition at line 67 of file EtherCATDataTypes.h.

◆ BYTE

using BYTE = uint8_t

Definition at line 85 of file EtherCATDataTypes.h.

◆ INTEGER16

using INTEGER16 = int16_t

Definition at line 69 of file EtherCATDataTypes.h.

◆ INTEGER24

using INTEGER24 = std::bitset<24>

Definition at line 80 of file EtherCATDataTypes.h.

◆ INTEGER32

using INTEGER32 = int32_t

Definition at line 70 of file EtherCATDataTypes.h.

◆ INTEGER64

using INTEGER64 = int64_t

Definition at line 82 of file EtherCATDataTypes.h.

◆ INTEGER8

using INTEGER8 = int8_t

Definition at line 68 of file EtherCATDataTypes.h.

◆ OCTET_STRING

using OCTET_STRING = std::vector<uint8_t>

Definition at line 76 of file EtherCATDataTypes.h.

◆ REAL32

using REAL32 = float

Definition at line 74 of file EtherCATDataTypes.h.

◆ REAL64

using REAL64 = double

Definition at line 81 of file EtherCATDataTypes.h.

◆ TIME_DIFFERENCE

using TIME_DIFFERENCE = uint64_t

Definition at line 79 of file EtherCATDataTypes.h.

◆ TIME_OF_DAY

using TIME_OF_DAY = std::bitset<48>

Definition at line 78 of file EtherCATDataTypes.h.

◆ UNICODE_STRING

using UNICODE_STRING = std::string

Definition at line 77 of file EtherCATDataTypes.h.

◆ UNSIGNED16

using UNSIGNED16 = uint16_t

Definition at line 72 of file EtherCATDataTypes.h.

◆ UNSIGNED24

using UNSIGNED24 = std::bitset<24>

Definition at line 83 of file EtherCATDataTypes.h.

◆ UNSIGNED32

using UNSIGNED32 = uint32_t

Definition at line 73 of file EtherCATDataTypes.h.

◆ UNSIGNED64

using UNSIGNED64 = uint64_t

Definition at line 84 of file EtherCATDataTypes.h.

◆ UNSIGNED8

using UNSIGNED8 = uint8_t

Definition at line 71 of file EtherCATDataTypes.h.

◆ VISIBLE_STRING

using VISIBLE_STRING = std::string

Definition at line 75 of file EtherCATDataTypes.h.

Variable Documentation

◆ bitLength

constexpr int bitLength = -1
constexpr

Defines the length of the various EtherCATDataTypes in bits.

If a type does not have a well-defined length, bitLength<T> == -1.

Note that bitLength<T> != sizeof(T) * 8 in general.

Template Parameters
Tthe EtherCATDataType to get the length of

Definition at line 104 of file EtherCATDataTypes.h.

◆ bitLength< BIT1 >

constexpr int bitLength< BIT1 > = 1
inlineconstexpr

Definition at line 136 of file EtherCATDataTypes.h.

◆ bitLength< BIT2 >

constexpr int bitLength< BIT2 > = 2
inlineconstexpr

Definition at line 138 of file EtherCATDataTypes.h.

◆ bitLength< BIT3 >

constexpr int bitLength< BIT3 > = 3
inlineconstexpr

Definition at line 140 of file EtherCATDataTypes.h.

◆ bitLength< BIT4 >

constexpr int bitLength< BIT4 > = 4
inlineconstexpr

Definition at line 142 of file EtherCATDataTypes.h.

◆ bitLength< BIT5 >

constexpr int bitLength< BIT5 > = 5
inlineconstexpr

Definition at line 144 of file EtherCATDataTypes.h.

◆ bitLength< BIT6 >

constexpr int bitLength< BIT6 > = 6
inlineconstexpr

Definition at line 146 of file EtherCATDataTypes.h.

◆ bitLength< BIT7 >

constexpr int bitLength< BIT7 > = 7
inlineconstexpr

Definition at line 148 of file EtherCATDataTypes.h.

◆ bitLength< BIT8 >

constexpr int bitLength< BIT8 > = 8
inlineconstexpr

Definition at line 150 of file EtherCATDataTypes.h.

◆ bitLength< BOOLEAN >

constexpr int bitLength< BOOLEAN > = 8
inlineconstexpr

Definition at line 106 of file EtherCATDataTypes.h.

◆ bitLength< INTEGER16 >

constexpr int bitLength< INTEGER16 > = 16
inlineconstexpr

Definition at line 110 of file EtherCATDataTypes.h.

◆ bitLength< INTEGER24 >

constexpr int bitLength< INTEGER24 > = 24
inlineconstexpr

Definition at line 128 of file EtherCATDataTypes.h.

◆ bitLength< INTEGER32 >

constexpr int bitLength< INTEGER32 > = 32
inlineconstexpr

Definition at line 112 of file EtherCATDataTypes.h.

◆ bitLength< INTEGER64 >

constexpr int bitLength< INTEGER64 > = 64
inlineconstexpr

Definition at line 132 of file EtherCATDataTypes.h.

◆ bitLength< INTEGER8 >

constexpr int bitLength< INTEGER8 > = 8
inlineconstexpr

Definition at line 108 of file EtherCATDataTypes.h.

◆ bitLength< OCTET_STRING >

constexpr int bitLength< OCTET_STRING > = -1
inlineconstexpr

Definition at line 124 of file EtherCATDataTypes.h.

◆ bitLength< REAL32 >

constexpr int bitLength< REAL32 > = 32
inlineconstexpr

Definition at line 120 of file EtherCATDataTypes.h.

◆ bitLength< REAL64 >

constexpr int bitLength< REAL64 > = 64
inlineconstexpr

Definition at line 130 of file EtherCATDataTypes.h.

◆ bitLength< TIME_OF_DAY >

constexpr int bitLength< TIME_OF_DAY > = 48
inlineconstexpr

Definition at line 126 of file EtherCATDataTypes.h.

◆ bitLength< UNSIGNED16 >

constexpr int bitLength< UNSIGNED16 > = 16
inlineconstexpr

Definition at line 116 of file EtherCATDataTypes.h.

◆ bitLength< UNSIGNED32 >

constexpr int bitLength< UNSIGNED32 > = 32
inlineconstexpr

Definition at line 118 of file EtherCATDataTypes.h.

◆ bitLength< UNSIGNED64 >

constexpr int bitLength< UNSIGNED64 > = 64
inlineconstexpr

Definition at line 134 of file EtherCATDataTypes.h.

◆ bitLength< UNSIGNED8 >

constexpr int bitLength< UNSIGNED8 > = 8
inlineconstexpr

Definition at line 114 of file EtherCATDataTypes.h.

◆ bitLength< VISIBLE_STRING >

constexpr int bitLength< VISIBLE_STRING > = -1
inlineconstexpr

Definition at line 122 of file EtherCATDataTypes.h.