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 {
26  GroupAddress = 0x80,
27 };
28 
30 {
31  // L_Data services
32  L_data_req = 0x11,
33  L_data_con = 0x2E,
34  L_data_ind = 0x29,
35 
36  // Data Properties
42 
43  // Function Properties
47  M_FuncPropStateRead_con = 0xFA, // same as M_FuncPropStateRead_con (see 3/6/3 p.105)
48 
49  // Further cEMI servies
50  M_Reset_req = 0xF1,
51  M_Reset_ind = 0xF0,
52 };
53 
55 {
56  Unspecified_Error = 0x00, // unknown error (R/W)
57  Out_Of_Range = 0x01, // write value not allowed (general, if not error 2 or 3) (W)
58  Out_Of_Max_Range = 0x02, // write value to high (W)
59  Out_Of_Min_Range = 0x03, // write value to low (W)
60  Memory_Error = 0x04, // memory can not be written or only with fault(s) (W)
61  Read_Only = 0x05, // write access to a ‘read only’ or a write protected Property (W)
62  Illegal_Command = 0x06, // COMMAND not valid or not supported (W)
63  Void_DP = 0x07, // read or write access to an non existing Property (R/W)
64  Type_Conflict = 0x08, // write access with a wrong data type (Datapoint length) (W)
65  Prop_Index_Range_Error = 0x09, // read or write access to a non existing Property array index (R/W)
66  Value_temp_not_writeable = 0x0A, // The Property exists but can at this moment not be written with a new value (W)
67 };
68 
69 // Unified return codes for KNX services and functions
70 // Note, that several older KNX services and functions do not use these return codes.
72 {
73  // Generic positive return codes
74  Success = 0x00, // service, function or command executed sucessfully
75  SuccessWithCrc = 0x01, // positive message confirmation, CRC over original data
76  // Generic negative return codes
77  MemoryError = 0xF1, // memory cannot be accessed or only with fault(s)
78  InvalidCommand = 0xF2, // server does not support the requested command. ets: also non-existing or protected resource
79  ImpossibleCommand = 0xF3, // command cannot be executed because a dependency is not fulfilled
80  ExceedsMaxApduLength = 0xF4, // data will not fit into a frame supported by this server
81  DataOverflow = 0xF5, // attempt to write data beyond what is reserved for the addressed resource
82  OutOfMinRange = 0xF6, // write value below minimum supported value
83  OutOfMaxRange = 0xF7, // write value exceeds maximum supported value
84  DataVoid = 0xF8, // request contains invalid data
85  TemporarilyNotAvailable = 0xF9, // data access not possible at this time
86  AccessWriteOnly = 0xFA, // read access to write-only resource
87  AccessReadOnly = 0xFB, // write access to read-only resource
88  AccessDenied = 0xFC, // access to recource is not allowed because of authorization/security
89  AddressVoid = 0xFD, // resource is not present, address does not exist
90  DataTypeConflict = 0xFE, // write access with wrong datatype (datapoint length)
91  GenericError = 0xFF // service, function or command failed
92 };
93 
95 {
100 };
101 
103 {
105  Broadcast = 0x10,
106 };
107 
109 {
112 };
113 
115 {
118 };
119 
121 {
130 };
131 
133 {
134  // Application Layer services on Multicast Communication Mode
135  GroupValueRead = 0x000,
138 
139  // Application Layer services on Broadcast Communication Mode
146 
147  // Application Layer Services on System Broadcast communication mode
151  // Open media specific Application Layer Services on System Broadcast communication mode
159 
160  // Application Layer Services on Point-to-point Connection-Oriented Communication Mode (mandatory)
161  // Application Layer Services on Point-to-point Connectionless Communication Mode (either optional or mandatory)
162  ADCRead = 0x0180,
163  ADCResponse = 0x01C0,
174  MemoryExtWrite = 0x1FB,
176  MemoryExtRead = 0x1FD,
178  MemoryRead = 0x200,
179  MemoryResponse = 0x240,
180  MemoryWrite = 0x280,
181  UserMemoryRead = 0x2C0,
191  Restart = 0x380,
195  KeyWrite = 0x3d3,
196  KeyResponse = 0x3d4,
202 
203  // Secure Service
204  SecureService = 0x3F1
205 };
206 
208 {
211  AuthConf
212 };
213 
215 {
218 };
219 
221 {
223  MasterReset = 0x1
224 };
225 
227 {
228  Void = 0x00,
230  FactoryReset = 0x02,
231  ResetIA = 0x03,
232  ResetAP = 0x04,
233  ResetParam = 0x05,
234  ResetLinks = 0x06,
235  FactoryResetWithoutIA = 0x07
236 };
237 
239 {
240  // DPT_Medium (20.1004), range 0-255
241  // All other values are reserved.
242  KNX_TP1 = 0x00,
243  KNX_PL110 = 0x01,
244  KNX_RF = 0x02,
245  KNX_IP = 0x05
246 };
Confirm
Definition: knx_types.h:109
@ ConfirmError
Definition: knx_types.h:111
@ ConfirmNoError
Definition: knx_types.h:110
Repetition
Definition: knx_types.h:95
@ WasRepeated
Definition: knx_types.h:97
@ RepetitionAllowed
Definition: knx_types.h:98
@ WasNotRepeated
Definition: knx_types.h:99
@ NoRepitiion
Definition: knx_types.h:96
HopCountType
Definition: knx_types.h:115
@ 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:116
@ NetworkLayerParameter
use NetworkLayer::hopCount as NPDU::hopCount
Definition: knx_types.h:117
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:121
@ DataConnected
Definition: knx_types.h:125
@ Ack
Definition: knx_types.h:128
@ DataBroadcast
Definition: knx_types.h:122
@ DataInduvidual
Definition: knx_types.h:124
@ Nack
Definition: knx_types.h:129
@ Disconnect
Definition: knx_types.h:127
@ Connect
Definition: knx_types.h:126
@ DataGroup
Definition: knx_types.h:123
FrameFormat
Definition: knx_types.h:4
@ StandardFrame
Definition: knx_types.h:6
@ ExtendedFrame
Definition: knx_types.h:5
EraseCode
Definition: knx_types.h:227
@ ResetIA
Definition: knx_types.h:231
@ ResetParam
Definition: knx_types.h:233
@ FactoryReset
Definition: knx_types.h:230
@ Void
Definition: knx_types.h:228
@ ResetAP
Definition: knx_types.h:232
@ FactoryResetWithoutIA
Definition: knx_types.h:235
@ ConfirmedRestart
Definition: knx_types.h:229
@ ResetLinks
Definition: knx_types.h:234
cEmiErrorCode
Definition: knx_types.h:55
@ Value_temp_not_writeable
Definition: knx_types.h:66
@ Memory_Error
Definition: knx_types.h:60
@ Read_Only
Definition: knx_types.h:61
@ Out_Of_Max_Range
Definition: knx_types.h:58
@ Out_Of_Min_Range
Definition: knx_types.h:59
@ Prop_Index_Range_Error
Definition: knx_types.h:65
@ Type_Conflict
Definition: knx_types.h:64
@ Void_DP
Definition: knx_types.h:63
@ Illegal_Command
Definition: knx_types.h:62
@ Out_Of_Range
Definition: knx_types.h:57
@ Unspecified_Error
Definition: knx_types.h:56
RestartType
Definition: knx_types.h:221
@ MasterReset
Definition: knx_types.h:223
@ BasicRestart
Definition: knx_types.h:222
ApduType
Definition: knx_types.h:133
@ MemoryRead
Definition: knx_types.h:178
@ PropertyExtDescriptionRead
Definition: knx_types.h:169
@ DomainAddressSerialNumberWrite
Definition: knx_types.h:158
@ DeviceDescriptorRead
Definition: knx_types.h:189
@ KeyResponse
Definition: knx_types.h:196
@ SystemNetworkParameterRead
Definition: knx_types.h:148
@ PropertyValueExtWriteUnCon
Definition: knx_types.h:168
@ PropertyValueExtRead
Definition: knx_types.h:164
@ UserMemoryRead
Definition: knx_types.h:181
@ IndividualAddressSerialNumberRead
Definition: knx_types.h:143
@ UserMemoryWrite
Definition: knx_types.h:183
@ FunctionPropertyExtStateResponse
Definition: knx_types.h:173
@ Restart
Definition: knx_types.h:191
@ PropertyExtDescriptionResponse
Definition: knx_types.h:170
@ MemoryExtWrite
Definition: knx_types.h:174
@ PropertyValueExtResponse
Definition: knx_types.h:165
@ PropertyValueRead
Definition: knx_types.h:197
@ FunctionPropertyCommand
Definition: knx_types.h:186
@ DomainAddressWrite
Definition: knx_types.h:152
@ IndividualAddressWrite
Definition: knx_types.h:140
@ UserManufacturerInfoResponse
Definition: knx_types.h:185
@ SystemNetworkParameterWrite
Definition: knx_types.h:150
@ DomainAddressSerialNumberRead
Definition: knx_types.h:156
@ SecureService
Definition: knx_types.h:204
@ KeyWrite
Definition: knx_types.h:195
@ FunctionPropertyExtCommand
Definition: knx_types.h:171
@ AuthorizeRequest
Definition: knx_types.h:193
@ FunctionPropertyStateResponse
Definition: knx_types.h:188
@ MemoryResponse
Definition: knx_types.h:179
@ MemoryExtWriteResponse
Definition: knx_types.h:175
@ PropertyValueResponse
Definition: knx_types.h:198
@ DomainAddressSelectiveRead
Definition: knx_types.h:155
@ PropertyValueExtWriteConResponse
Definition: knx_types.h:167
@ IndividualAddressRead
Definition: knx_types.h:141
@ DomainAddressResponse
Definition: knx_types.h:154
@ DeviceDescriptorResponse
Definition: knx_types.h:190
@ ADCResponse
Definition: knx_types.h:163
@ IndividualAddressSerialNumberResponse
Definition: knx_types.h:144
@ ADCRead
Definition: knx_types.h:162
@ PropertyDescriptionResponse
Definition: knx_types.h:201
@ FunctionPropertyExtState
Definition: knx_types.h:172
@ MemoryExtRead
Definition: knx_types.h:176
@ GroupValueResponse
Definition: knx_types.h:136
@ DomainAddressSerialNumberResponse
Definition: knx_types.h:157
@ UserMemoryResponse
Definition: knx_types.h:182
@ DomainAddressRead
Definition: knx_types.h:153
@ FunctionPropertyState
Definition: knx_types.h:187
@ PropertyDescriptionRead
Definition: knx_types.h:200
@ RestartMasterReset
Definition: knx_types.h:192
@ PropertyValueExtWriteCon
Definition: knx_types.h:166
@ IndividualAddressResponse
Definition: knx_types.h:142
@ IndividualAddressSerialNumberWrite
Definition: knx_types.h:145
@ MemoryExtReadResponse
Definition: knx_types.h:177
@ PropertyValueWrite
Definition: knx_types.h:199
@ GroupValueWrite
Definition: knx_types.h:137
@ MemoryWrite
Definition: knx_types.h:180
@ AuthorizeResponse
Definition: knx_types.h:194
@ GroupValueRead
Definition: knx_types.h:135
@ UserManufacturerInfoRead
Definition: knx_types.h:184
@ SystemNetworkParameterResponse
Definition: knx_types.h:149
MessageCode
Definition: knx_types.h:30
@ M_PropWrite_req
Definition: knx_types.h:39
@ M_Reset_ind
Definition: knx_types.h:51
@ M_PropWrite_con
Definition: knx_types.h:40
@ M_PropInfo_ind
Definition: knx_types.h:41
@ M_Reset_req
Definition: knx_types.h:50
@ L_data_con
Definition: knx_types.h:33
@ L_data_req
Definition: knx_types.h:32
@ M_FuncPropStateRead_con
Definition: knx_types.h:47
@ M_FuncPropCommand_con
Definition: knx_types.h:45
@ L_data_ind
Definition: knx_types.h:34
@ M_FuncPropCommand_req
Definition: knx_types.h:44
@ M_PropRead_con
Definition: knx_types.h:38
@ M_FuncPropStateRead_req
Definition: knx_types.h:46
@ M_PropRead_req
Definition: knx_types.h:37
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:239
@ KNX_IP
Definition: knx_types.h:245
@ KNX_TP1
Definition: knx_types.h:242
@ KNX_RF
Definition: knx_types.h:244
@ KNX_PL110
Definition: knx_types.h:243
AddressType
Definition: knx_types.h:24
@ GroupAddress
Definition: knx_types.h:26
@ IndividualAddress
Definition: knx_types.h:25
DataSecurity
Definition: knx_types.h:208
@ AuthConf
Definition: knx_types.h:211
@ Auth
Definition: knx_types.h:210
@ None
Definition: knx_types.h:209
SystemBroadcast
Definition: knx_types.h:103
@ Broadcast
Definition: knx_types.h:105
@ SysBroadcast
Definition: knx_types.h:104
ReturnCodes
Definition: knx_types.h:72
@ DataVoid
Definition: knx_types.h:84
@ AccessReadOnly
Definition: knx_types.h:87
@ OutOfMaxRange
Definition: knx_types.h:83
@ ImpossibleCommand
Definition: knx_types.h:79
@ DataTypeConflict
Definition: knx_types.h:90
@ AccessDenied
Definition: knx_types.h:88
@ OutOfMinRange
Definition: knx_types.h:82
@ SuccessWithCrc
Definition: knx_types.h:75
@ InvalidCommand
Definition: knx_types.h:78
@ TemporarilyNotAvailable
Definition: knx_types.h:85
@ ExceedsMaxApduLength
Definition: knx_types.h:80
@ DataOverflow
Definition: knx_types.h:81
@ AddressVoid
Definition: knx_types.h:89
@ MemoryError
Definition: knx_types.h:77
@ GenericError
Definition: knx_types.h:91
@ AccessWriteOnly
Definition: knx_types.h:86
@ Success
Definition: knx_types.h:74
DataSecurity dataSecurity
Definition: knx_types.h:217