6#include <nlohmann/json_fwd.hpp>
139 {0x0000,
"UNSPECIFIED", 0},
140 {0x0001,
"BOOLEAN", 1},
141 {0x0002,
"INTEGER8", 8},
142 {0x0003,
"INTEGER16", 16},
143 {0x0004,
"INTEGER32", 32},
144 {0x0005,
"UNSIGNED8", 8},
145 {0x0006,
"UNSIGNED16", 16},
146 {0x0007,
"UNSIGNED32", 32},
147 {0x0008,
"REAL32", 32},
148 {0x0009,
"VISIBLE_STRING", 0},
149 {0x000A,
"OCTET_STRING", 0},
150 {0x000B,
"UNICODE_STRING", 0},
151 {0x000C,
"TIME_OF_DAY", 48},
152 {0x000D,
"TIME_DIFFERENCE", 48},
153 {0x000F,
"DOMAIN", 0},
154 {0x0010,
"INTEGER24", 24},
155 {0x0011,
"REAL64", 64},
156 {0x0012,
"INTEGER40", 40},
157 {0x0013,
"INTEGER48", 48},
158 {0x0014,
"INTEGER56", 56},
159 {0x0015,
"INTEGER64", 64},
160 {0x0016,
"UNSIGNED24", 24},
161 {0x0018,
"UNSIGNED40", 40},
162 {0x0019,
"UNSIGNED48", 48},
163 {0x001A,
"UNSIGNED56", 56},
164 {0x001B,
"UNSIGNED64", 64},
165 {0x001D,
"GUID", 128},
167 {0x001F,
"WORD", 16},
168 {0x0020,
"DWORD", 32},
169 {0x0021,
"PDO_MAPPING", 0},
170 {0x0023,
"IDENTITY", 0},
171 {0x0025,
"COMMAND_PAR", 0},
172 {0x0027,
"PDO_PARAMETER", 0},
174 {0x0029,
"SM_SYNCHRONISATION", 0},
175 {0x002A,
"RECORD", 0},
176 {0x002B,
"BACKUP_PARAMETER", 0},
177 {0x002C,
"MODULAR_DEVICE_PROFILE", 0},
178 {0x002D,
"BITARR8", 8},
179 {0x002E,
"BITARR16", 16},
180 {0x002F,
"BITARR32", 32},
190 {0x0039,
"BIT10", 10},
191 {0x003A,
"BIT11", 11},
192 {0x003B,
"BIT12", 12},
193 {0x003C,
"BIT13", 13},
194 {0x003D,
"BIT14", 14},
195 {0x003E,
"BIT15", 15},
196 {0x003F,
"BIT16", 16},
197 {0x0260,
"ARRAY_OF_INT", 0},
198 {0x0261,
"ARRAY_OF_SINT", 0},
199 {0x0262,
"ARRAY_OF_DINT", 0},
200 {0x0263,
"ARRAY_OF_UDINT", 0},
201 {0x0264,
"ARRAY_OF_BITARR8", 0},
202 {0x0265,
"ARRAY_OF_BITARR16", 0},
203 {0x0266,
"ARRAY_OF_BITARR32", 0},
204 {0x0267,
"ARRAY_OF_USINT", 0},
205 {0x0268,
"WSTRING", 0},
206 {0x0269,
"ARRAY_OF_REAL", 0},
207 {0x026A,
"ARRAY_OF_LREAL", 0},
208 {0x0281,
"ERROR_SETTING", 0},
209 {0x0282,
"DIAGNOSIS_HISTORY", 0},
210 {0x0283,
"EXTERNAL_SYNC_STATUS", 0},
211 {0x0284,
"EXTERNAL_SYNC_SETTINGS", 0},
212 {0x0285,
"DEFTYPE_FSOEFRAME", 0},
213 {0x0286,
"DEFTYPE_FSOECOMMPAR", 0},
220 return it !=
kObjectDataTypes.end() ? it->name : std::string_view{
"UNKNOWN"};
Definition al_status_codes.cc:5
void to_json(nlohmann::json &j, const AlStatusCode &c)
Serialises an AlStatusCode to JSON.
Definition al_status_codes.cc:7
ObjectDataType
CoE object dictionary data type codes.
Definition object_data_types.h:27
@ UNSIGNED40
40-bit unsigned integer.
@ INTEGER16
16-bit signed integer.
@ UNICODE_STRING
UCS-2 string (SOEM/CiA numbering; see note above).
@ BACKUP_PARAMETER
Backup parameter (ETG.1020).
@ UNSPECIFIED
Undefined or unknown data type.
@ INTEGER64
64-bit signed integer.
@ ARRAY_OF_BITARR16
Sequence of BITARR16.
@ EXTERNAL_SYNC_STATUS
External sync status (ETG.1020).
@ ERROR_SETTING
Error setting (ETG.1020).
@ INTEGER32
32-bit signed integer.
@ ARRAY_OF_BITARR8
Sequence of BITARR8.
@ ARRAY_OF_INT
Sequence of INT (IEC 61131-3).
@ TIME_OF_DAY
Time of day (ETG.1020).
@ REAL32
32-bit IEEE 754 floating point.
@ UNSIGNED56
56-bit unsigned integer.
@ UNSIGNED8
8-bit unsigned integer.
@ ARRAY_OF_USINT
Sequence of USINT.
@ BITARR8
Array of 8 bits.
@ BITARR32
Array of 32 bits.
@ UNSIGNED64
64-bit unsigned integer.
@ MODULAR_DEVICE_PROFILE
Modular device profile (ETG.5001).
@ REAL64
64-bit IEEE 754 floating point.
@ DEFTYPE_FSOECOMMPAR
FSoE communication parameters (ETG.5120).
@ GUID
128-bit globally unique identifier.
@ INTEGER40
40-bit signed integer.
@ PDO_PARAMETER
PDO parameter (ETG.1020).
@ ENUM
Enumeration (ETG.1020).
@ EXTERNAL_SYNC_SETTINGS
External sync settings (ETG.1020).
@ UNSIGNED48
48-bit unsigned integer.
@ DWORD
32-bit unsigned integer.
@ UTYPE_END
End of user-defined type range.
@ ARRAY_OF_SINT
Sequence of SINT.
@ RECORD
Generic record structure.
@ UNSIGNED16
16-bit unsigned integer.
@ SM_SYNCHRONISATION
Sync manager synchronisation (ETG.1000).
@ ARRAY_OF_BITARR32
Sequence of BITARR32.
@ INTEGER48
48-bit signed integer.
@ ARRAY_OF_UDINT
Sequence of UDINT.
@ INTEGER56
56-bit signed integer.
@ DEFTYPE_FSOEFRAME
FSoE frame (ETG.5120).
@ BITARR16
Array of 16 bits.
@ VISIBLE_STRING
Null-terminated ASCII string.
@ WORD
16-bit unsigned integer.
@ ARRAY_OF_REAL
Sequence of REAL.
@ DOMAIN
Application-specific domain (ETG.1020).
@ BOOLEAN
Boolean value (true or false), transported as a byte.
@ UNSIGNED32
32-bit unsigned integer.
@ DIAGNOSIS_HISTORY
Diagnosis history (ETG.1020).
@ INTEGER24
24-bit signed integer.
@ ARRAY_OF_DINT
Sequence of DINT.
@ WSTRING
UCS-2/wide string — ETG.1020's UNICODE_STRING code (cf. 0x000B).
@ COMMAND_PAR
Command parameter (ETG.1000).
@ IDENTITY
Identity object (ETG.1000).
@ TIME_DIFFERENCE
Time difference (ETG.1020).
@ BYTE
8-bit unsigned integer.
@ PDO_MAPPING
PDO mapping (ETG.1000).
@ ARRAY_OF_LREAL
Sequence of LREAL.
@ UNSIGNED24
24-bit unsigned integer.
@ OCTET_STRING
Variable-length byte array.
@ INTEGER8
8-bit signed integer.
@ UTYPE_START
Start of user-defined type range.
constexpr uint16_t objectDataTypeBitSize(uint16_t code)
Returns the declared bit width of code, or 0 if unknown / variable-length.
Definition object_data_types.h:224
constexpr auto kObjectDataTypes
Catalogue of ETG.1020 object dictionary data types.
Definition object_data_types.h:138
constexpr std::string_view objectDataTypeName(uint16_t code)
Returns the symbolic name of code, or "UNKNOWN" if it is not in the table.
Definition object_data_types.h:217
Metadata for a single object dictionary data type.
Definition object_data_types.h:125
std::string_view name
Symbolic name (e.g. "UNSIGNED32").
Definition object_data_types.h:127
uint16_t code
ETG.1020 data type code.
Definition object_data_types.h:126
uint16_t bitSize
Bit width of one element; 0 for variable-length types.
Definition object_data_types.h:128