knx
ETS configurable knx-stack
knx_types.h
Go to the documentation of this file.
1 #pragma once
2 
4 {
6  StandardFrame = 0x80
7 };
8 
9 enum Priority
10 {
11  LowPriority = 0xC,
14  SystemPriority = 0x0
15 };
16 
17 enum AckType
18 {
20  AckRequested = 0x2,
21 };
22 
24 {
25  // see U_ACK_REQ defines in tpuart_data_link_layer.cpp
26  AckReqNack = 0x04,
27  AckReqBusy = 0x02,
28  AckReqAck = 0x01,
29  AckReqNone = 0x0,
30 };
31 
33 {
35  GroupAddress = 0x80,
36 };
37 
39 {
40  // L_Data services
41  L_data_req = 0x11,
42  L_data_con = 0x2E,
43  L_data_ind = 0x29,
44 
45  // Data Properties
51 
52  // Function Properties
56  M_FuncPropStateRead_con = 0xFA, // same as M_FuncPropStateRead_con (see 3/6/3 p.105)
57 
58  // Further cEMI servies
59  M_Reset_req = 0xF1,
60  M_Reset_ind = 0xF0,
61 };
62 
64 {
65  Unspecified_Error = 0x00, // unknown error (R/W)
66  Out_Of_Range = 0x01, // write value not allowed (general, if not error 2 or 3) (W)
67  Out_Of_Max_Range = 0x02, // write value to high (W)
68  Out_Of_Min_Range = 0x03, // write value to low (W)
69  Memory_Error = 0x04, // memory can not be written or only with fault(s) (W)
70  Read_Only = 0x05, // write access to a ‘read only’ or a write protected Property (W)
71  Illegal_Command = 0x06, // COMMAND not valid or not supported (W)
72  Void_DP = 0x07, // read or write access to an non existing Property (R/W)
73  Type_Conflict = 0x08, // write access with a wrong data type (Datapoint length) (W)
74  Prop_Index_Range_Error = 0x09, // read or write access to a non existing Property array index (R/W)
75  Value_temp_not_writeable = 0x0A, // The Property exists but can at this moment not be written with a new value (W)
76 };
77 
78 // Unified return codes for KNX services and functions
79 // Note, that several older KNX services and functions do not use these return codes.
81 {
82  // Generic positive return codes
83  Success = 0x00, // service, function or command executed sucessfully
84  SuccessWithCrc = 0x01, // positive message confirmation, CRC over original data
85  // Generic negative return codes
86  MemoryError = 0xF1, // memory cannot be accessed or only with fault(s)
87  InvalidCommand = 0xF2, // server does not support the requested command. ets: also non-existing or protected resource
88  ImpossibleCommand = 0xF3, // command cannot be executed because a dependency is not fulfilled
89  ExceedsMaxApduLength = 0xF4, // data will not fit into a frame supported by this server
90  DataOverflow = 0xF5, // attempt to write data beyond what is reserved for the addressed resource
91  OutOfMinRange = 0xF6, // write value below minimum supported value
92  OutOfMaxRange = 0xF7, // write value exceeds maximum supported value
93  DataVoid = 0xF8, // request contains invalid data
94  TemporarilyNotAvailable = 0xF9, // data access not possible at this time
95  AccessWriteOnly = 0xFA, // read access to write-only resource
96  AccessReadOnly = 0xFB, // write access to read-only resource
97  AccessDenied = 0xFC, // access to recource is not allowed because of authorization/security
98  AddressVoid = 0xFD, // resource is not present, address does not exist
99  DataTypeConflict = 0xFE, // write access with wrong datatype (datapoint length)
100  GenericError = 0xFF // service, function or command failed
101 };
102 
104 {
109 };
110 
112 {
114  Broadcast = 0x10,
115 };
116 
118 {
121 };
122 
124 {
127 };
128 
130 {
139 };
140 
142 {
143  // Application Layer services on Multicast Communication Mode
144  GroupValueRead = 0x000,
147 
148  // Application Layer services on Broadcast Communication Mode
155 
156  // Application Layer Services on System Broadcast communication mode
160  // Open media specific Application Layer Services on System Broadcast communication mode
168 
169  // Application Layer Services on Point-to-point Connection-Oriented Communication Mode (mandatory)
170  // Application Layer Services on Point-to-point Connectionless Communication Mode (either optional or mandatory)
171  ADCRead = 0x0180,
172  ADCResponse = 0x01C0,
183  MemoryExtWrite = 0x1FB,
185  MemoryExtRead = 0x1FD,
187  MemoryRead = 0x200,
188  MemoryResponse = 0x240,
189  MemoryWrite = 0x280,
190  UserMemoryRead = 0x2C0,
200  Restart = 0x380,
210  KeyWrite = 0x3d3,
211  KeyResponse = 0x3d4,
217 
218  // Secure Service
219  SecureService = 0x3F1
220 };
221 
223 {
226  AuthConf
227 };
228 
230 {
233 };
234 
236 {
238  MasterReset = 0x1
239 };
240 
242 {
243  Void = 0x00,
245  FactoryReset = 0x02,
246  ResetIA = 0x03,
247  ResetAP = 0x04,
248  ResetParam = 0x05,
249  ResetLinks = 0x06,
250  FactoryResetWithoutIA = 0x07
251 };
252 
254 {
255  // DPT_Medium (20.1004), range 0-255
256  // All other values are reserved.
257  KNX_TP1 = 0x00,
258  KNX_PL110 = 0x01,
259  KNX_RF = 0x02,
260  KNX_IP = 0x05
261 };
262 
264 {
265  GROUP_6FFF = 0b00000011,
266  GROUP_7000 = 0b00001100,
267  GROUP_REPEAT = 0b00010000,
268  GROUP_6FFFUNLOCK = 0b00000001,
269  GROUP_6FFFLOCK = 0b00000010,
270  GROUP_6FFFROUTE = 0b00000011,
271  GROUP_7000UNLOCK = 0b00000100,
272  GROUP_7000LOCK = 0b00001000,
273  GROUP_7000ROUTE = 0b00001100
274 };
275 
277 {
278  PHYS_FRAME = 0b00000011,
279  PHYS_FRAME_UNLOCK = 0b00000001,
280  PHYS_FRAME_LOCK = 0b00000010,
281  PHYS_FRAME_ROUT = 0b00000011,
282  PHYS_REPEAT = 0b00000100,
283  BROADCAST_LOCK = 0b00001000,
284  BROADCAST_REPEAT = 0b00010000,
285  GROUP_IACK_ROUT = 0b00100000,
286  PHYS_IACK = 0b11000000,
287  PHYS_IACK_NORMAL = 0b01000000,
288  PHYS_IACK_ALL = 0b10000000,
289  PHYS_IACK_NACK = 0b11000000
290 };
Confirm
Definition: knx_types.h:118
@ ConfirmError
Definition: knx_types.h:120
@ ConfirmNoError
Definition: knx_types.h:119
Repetition
Definition: knx_types.h:104
@ WasRepeated
Definition: knx_types.h:106
@ RepetitionAllowed
Definition: knx_types.h:107
@ WasNotRepeated
Definition: knx_types.h:108
@ NoRepitiion
Definition: knx_types.h:105
LCGRPCONFIG
Definition: knx_types.h:264
@ GROUP_7000ROUTE
Definition: knx_types.h:273
@ GROUP_6FFFROUTE
Definition: knx_types.h:270
@ GROUP_6FFFUNLOCK
Definition: knx_types.h:268
@ GROUP_6FFF
Definition: knx_types.h:265
@ GROUP_7000
Definition: knx_types.h:266
@ GROUP_REPEAT
Definition: knx_types.h:267
@ GROUP_6FFFLOCK
Definition: knx_types.h:269
@ GROUP_7000UNLOCK
Definition: knx_types.h:271
@ GROUP_7000LOCK
Definition: knx_types.h:272
HopCountType
Definition: knx_types.h:124
@ UnlimitedRouting
NPDU::hopCount is set to 7. This means that the frame never expires. This could be a problem if your ...
Definition: knx_types.h:125
@ NetworkLayerParameter
use NetworkLayer::hopCount as NPDU::hopCount
Definition: knx_types.h:126
Priority
Definition: knx_types.h:10
@ NormalPriority
More important telegrams like central functions.
Definition: knx_types.h:12
@ UrgentPriority
Used for alarms.
Definition: knx_types.h:13
@ SystemPriority
Mainly used by ETS for device programming.
Definition: knx_types.h:14
@ LowPriority
Normal priority of group communication.
Definition: knx_types.h:11
TpduType
Definition: knx_types.h:130
@ DataConnected
Definition: knx_types.h:134
@ Ack
Definition: knx_types.h:137
@ DataBroadcast
Definition: knx_types.h:131
@ DataInduvidual
Definition: knx_types.h:133
@ Nack
Definition: knx_types.h:138
@ Disconnect
Definition: knx_types.h:136
@ Connect
Definition: knx_types.h:135
@ DataGroup
Definition: knx_types.h:132
FrameFormat
Definition: knx_types.h:4
@ StandardFrame
Definition: knx_types.h:6
@ ExtendedFrame
Definition: knx_types.h:5
EraseCode
Definition: knx_types.h:242
@ ResetIA
Definition: knx_types.h:246
@ ResetParam
Definition: knx_types.h:248
@ FactoryReset
Definition: knx_types.h:245
@ Void
Definition: knx_types.h:243
@ ResetAP
Definition: knx_types.h:247
@ FactoryResetWithoutIA
Definition: knx_types.h:250
@ ConfirmedRestart
Definition: knx_types.h:244
@ ResetLinks
Definition: knx_types.h:249
cEmiErrorCode
Definition: knx_types.h:64
@ Value_temp_not_writeable
Definition: knx_types.h:75
@ Memory_Error
Definition: knx_types.h:69
@ Read_Only
Definition: knx_types.h:70
@ Out_Of_Max_Range
Definition: knx_types.h:67
@ Out_Of_Min_Range
Definition: knx_types.h:68
@ Prop_Index_Range_Error
Definition: knx_types.h:74
@ Type_Conflict
Definition: knx_types.h:73
@ Void_DP
Definition: knx_types.h:72
@ Illegal_Command
Definition: knx_types.h:71
@ Out_Of_Range
Definition: knx_types.h:66
@ Unspecified_Error
Definition: knx_types.h:65
RestartType
Definition: knx_types.h:236
@ MasterReset
Definition: knx_types.h:238
@ BasicRestart
Definition: knx_types.h:237
ApduType
Definition: knx_types.h:142
@ MemoryRead
Definition: knx_types.h:187
@ PropertyExtDescriptionRead
Definition: knx_types.h:178
@ DomainAddressSerialNumberWrite
Definition: knx_types.h:167
@ DeviceDescriptorRead
Definition: knx_types.h:198
@ KeyResponse
Definition: knx_types.h:211
@ SystemNetworkParameterRead
Definition: knx_types.h:157
@ PropertyValueExtWriteUnCon
Definition: knx_types.h:177
@ PropertyValueExtRead
Definition: knx_types.h:173
@ RoutingTableRead
Definition: knx_types.h:203
@ UserMemoryRead
Definition: knx_types.h:190
@ IndividualAddressSerialNumberRead
Definition: knx_types.h:152
@ UserMemoryWrite
Definition: knx_types.h:192
@ FunctionPropertyExtStateResponse
Definition: knx_types.h:182
@ Restart
Definition: knx_types.h:200
@ PropertyExtDescriptionResponse
Definition: knx_types.h:179
@ MemoryExtWrite
Definition: knx_types.h:183
@ PropertyValueExtResponse
Definition: knx_types.h:174
@ PropertyValueRead
Definition: knx_types.h:212
@ FunctionPropertyCommand
Definition: knx_types.h:195
@ RoutingTableOpen
Definition: knx_types.h:202
@ DomainAddressWrite
Definition: knx_types.h:161
@ IndividualAddressWrite
Definition: knx_types.h:149
@ UserManufacturerInfoResponse
Definition: knx_types.h:194
@ SystemNetworkParameterWrite
Definition: knx_types.h:159
@ DomainAddressSerialNumberRead
Definition: knx_types.h:165
@ SecureService
Definition: knx_types.h:219
@ KeyWrite
Definition: knx_types.h:210
@ FunctionPropertyExtCommand
Definition: knx_types.h:180
@ AuthorizeRequest
Definition: knx_types.h:208
@ FunctionPropertyStateResponse
Definition: knx_types.h:197
@ MemoryResponse
Definition: knx_types.h:188
@ MemoryExtWriteResponse
Definition: knx_types.h:184
@ PropertyValueResponse
Definition: knx_types.h:213
@ DomainAddressSelectiveRead
Definition: knx_types.h:164
@ PropertyValueExtWriteConResponse
Definition: knx_types.h:176
@ IndividualAddressRead
Definition: knx_types.h:150
@ DomainAddressResponse
Definition: knx_types.h:163
@ DeviceDescriptorResponse
Definition: knx_types.h:199
@ MemoryRouterWrite
Definition: knx_types.h:206
@ ADCResponse
Definition: knx_types.h:172
@ IndividualAddressSerialNumberResponse
Definition: knx_types.h:153
@ RoutingTableWrite
Definition: knx_types.h:205
@ ADCRead
Definition: knx_types.h:171
@ PropertyDescriptionResponse
Definition: knx_types.h:216
@ FunctionPropertyExtState
Definition: knx_types.h:181
@ MemoryExtRead
Definition: knx_types.h:185
@ RoutingTableReadResponse
Definition: knx_types.h:204
@ GroupValueResponse
Definition: knx_types.h:145
@ DomainAddressSerialNumberResponse
Definition: knx_types.h:166
@ UserMemoryResponse
Definition: knx_types.h:191
@ DomainAddressRead
Definition: knx_types.h:162
@ FunctionPropertyState
Definition: knx_types.h:196
@ PropertyDescriptionRead
Definition: knx_types.h:215
@ RestartMasterReset
Definition: knx_types.h:201
@ PropertyValueExtWriteCon
Definition: knx_types.h:175
@ IndividualAddressResponse
Definition: knx_types.h:151
@ MemoryRouterReadResponse
Definition: knx_types.h:207
@ IndividualAddressSerialNumberWrite
Definition: knx_types.h:154
@ MemoryExtReadResponse
Definition: knx_types.h:186
@ PropertyValueWrite
Definition: knx_types.h:214
@ GroupValueWrite
Definition: knx_types.h:146
@ MemoryWrite
Definition: knx_types.h:189
@ AuthorizeResponse
Definition: knx_types.h:209
@ GroupValueRead
Definition: knx_types.h:144
@ UserManufacturerInfoRead
Definition: knx_types.h:193
@ SystemNetworkParameterResponse
Definition: knx_types.h:158
MessageCode
Definition: knx_types.h:39
@ M_PropWrite_req
Definition: knx_types.h:48
@ M_Reset_ind
Definition: knx_types.h:60
@ M_PropWrite_con
Definition: knx_types.h:49
@ M_PropInfo_ind
Definition: knx_types.h:50
@ M_Reset_req
Definition: knx_types.h:59
@ L_data_con
Definition: knx_types.h:42
@ L_data_req
Definition: knx_types.h:41
@ M_FuncPropStateRead_con
Definition: knx_types.h:56
@ M_FuncPropCommand_con
Definition: knx_types.h:54
@ L_data_ind
Definition: knx_types.h:43
@ M_FuncPropCommand_req
Definition: knx_types.h:53
@ M_PropRead_con
Definition: knx_types.h:47
@ M_FuncPropStateRead_req
Definition: knx_types.h:55
@ M_PropRead_req
Definition: knx_types.h:46
AckType
Definition: knx_types.h:18
@ AckRequested
We want a DataLinkLayer acknowledgement.
Definition: knx_types.h:20
@ AckDontCare
We don't care about DataLinkLayer acknowledgement.
Definition: knx_types.h:19
DptMedium
Definition: knx_types.h:254
@ KNX_IP
Definition: knx_types.h:260
@ KNX_TP1
Definition: knx_types.h:257
@ KNX_RF
Definition: knx_types.h:259
@ KNX_PL110
Definition: knx_types.h:258
LCCONFIG
Definition: knx_types.h:277
@ BROADCAST_LOCK
Definition: knx_types.h:283
@ PHYS_FRAME_UNLOCK
Definition: knx_types.h:279
@ PHYS_IACK_NACK
Definition: knx_types.h:289
@ PHYS_REPEAT
Definition: knx_types.h:282
@ PHYS_FRAME
Definition: knx_types.h:278
@ PHYS_FRAME_LOCK
Definition: knx_types.h:280
@ PHYS_IACK_ALL
Definition: knx_types.h:288
@ GROUP_IACK_ROUT
Definition: knx_types.h:285
@ PHYS_IACK
Definition: knx_types.h:286
@ BROADCAST_REPEAT
Definition: knx_types.h:284
@ PHYS_IACK_NORMAL
Definition: knx_types.h:287
@ PHYS_FRAME_ROUT
Definition: knx_types.h:281
AddressType
Definition: knx_types.h:33
@ GroupAddress
Definition: knx_types.h:35
@ IndividualAddress
Definition: knx_types.h:34
DataSecurity
Definition: knx_types.h:223
@ AuthConf
Definition: knx_types.h:226
@ Auth
Definition: knx_types.h:225
@ None
Definition: knx_types.h:224
SystemBroadcast
Definition: knx_types.h:112
@ Broadcast
Definition: knx_types.h:114
@ SysBroadcast
Definition: knx_types.h:113
ReturnCodes
Definition: knx_types.h:81
@ DataVoid
Definition: knx_types.h:93
@ AccessReadOnly
Definition: knx_types.h:96
@ OutOfMaxRange
Definition: knx_types.h:92
@ ImpossibleCommand
Definition: knx_types.h:88
@ DataTypeConflict
Definition: knx_types.h:99
@ AccessDenied
Definition: knx_types.h:97
@ OutOfMinRange
Definition: knx_types.h:91
@ SuccessWithCrc
Definition: knx_types.h:84
@ InvalidCommand
Definition: knx_types.h:87
@ TemporarilyNotAvailable
Definition: knx_types.h:94
@ ExceedsMaxApduLength
Definition: knx_types.h:89
@ DataOverflow
Definition: knx_types.h:90
@ AddressVoid
Definition: knx_types.h:98
@ MemoryError
Definition: knx_types.h:86
@ GenericError
Definition: knx_types.h:100
@ AccessWriteOnly
Definition: knx_types.h:95
@ Success
Definition: knx_types.h:83
TPAckType
Definition: knx_types.h:24
@ AckReqNack
Definition: knx_types.h:26
@ AckReqNone
Definition: knx_types.h:29
@ AckReqAck
Definition: knx_types.h:28
@ AckReqBusy
Definition: knx_types.h:27
DataSecurity dataSecurity
Definition: knx_types.h:232