knx
ETS configurable knx-stack
router_object.cpp
Go to the documentation of this file.
1 #include "config.h"
2 
3 #include <cstring>
4 #include "router_object.h"
5 #include "bits.h"
6 #include "memory.h"
7 #include "data_property.h"
8 #include "callback_property.h"
9 #include "function_property.h"
10 
11 
12 // Filter Table Realization Type 3
13 // The Filter Table Realisation Type 3 shall be organised as a memory mapped bit-field of
14 // 65536 bits and thus 8 192 octets. Each bit shall uniquely correspond to one Group Address.
15 // The full 16 bit KNX GA encoding range shall be supported.
16 //
17 // octet_address = GA_value div 8
18 // bit_position = GA_value mod 8
19 static constexpr uint16_t kFilterTableSize = 65536 / 8; // Each group address is represented by one bit
20 
22 {
23  ClearRoutingTable = 0x01, // no info bytes
24  SetRoutingTable = 0x02, // no info bytes
25  ClearGroupAddress = 0x03, // 4 bytes: start address and end address
26  SetGroupAddress = 0x04, // 4 bytes: start address and end address
27 };
28 
29 RouterObject::RouterObject(Memory& memory, uint32_t staticTableAdr, uint32_t staticTableSize)
30  : TableObject(memory, staticTableAdr, staticTableSize)
31 {
32 }
33 
34 void RouterObject::initialize1x(DptMedium mediumType, uint16_t maxApduSize)
35 {
36  // Object index property is not included for coupler model 1.x, so value is "don't care".
37  initialize(CouplerModel::Model_1x, 200, mediumType, RouterObjectType::Single, maxApduSize);
38 }
39 
40 void RouterObject::initialize20(uint8_t objIndex, DptMedium mediumType, RouterObjectType rtType, uint16_t maxApduSize)
41 {
42  initialize(CouplerModel::Model_20, objIndex, mediumType, rtType, maxApduSize);
43 }
44 
45 void RouterObject::initialize(CouplerModel model, uint8_t objIndex, DptMedium mediumType, RouterObjectType rtType, uint16_t maxApduSize)
46 {
47  bool useHopCount = false;
48  bool useTable = true;
49  _model = model;
50 
51  if (model == CouplerModel::Model_20)
52  {
53  useHopCount = (rtType == RouterObjectType::Primary);
54  useTable = (rtType == RouterObjectType::Secondary);
55  }
56 
57  // These properties are always present
58  Property* fixedProperties[] =
59  {
60  new DataProperty( PID_OBJECT_TYPE, false, PDT_UNSIGNED_INT, 1, ReadLv3 | WriteLv0, (uint16_t) OT_ROUTER ),
61  new DataProperty( PID_MEDIUM_STATUS, false, PDT_GENERIC_01, 1, ReadLv3 | WriteLv0, (uint16_t) 0 ), // 0 means communication is possible, could be set by datalink layer or bau to 1 (comm impossible)
63  };
64  uint8_t fixedPropertiesCount = sizeof(fixedProperties) / sizeof(Property*);
65 
66  // Only present if coupler model is 1.x
67  Property* model1xProperties[] =
68  {
69  // default values from Spec, see 03_05_01 4.4.4 and 4.4.5
70  new DataProperty( PID_MAIN_LCCONFIG, true, PDT_BITSET8, 1, ReadLv3 | WriteLv0, (uint8_t) (LCCONFIG::PHYS_FRAME_ROUT | LCCONFIG::PHYS_REPEAT | LCCONFIG::BROADCAST_REPEAT | LCCONFIG::GROUP_IACK_ROUT | LCCONFIG::PHYS_IACK_NORMAL) ), // Primary: data individual (connless and connorient) + broadcast
71  new DataProperty( PID_SUB_LCCONFIG, true, PDT_BITSET8, 1, ReadLv3 | WriteLv0, (uint8_t) (LCCONFIG::PHYS_FRAME_ROUT | LCCONFIG::PHYS_REPEAT | LCCONFIG::BROADCAST_REPEAT | LCCONFIG::GROUP_IACK_ROUT | LCCONFIG::PHYS_IACK_NORMAL) ), // Secondary: data individual (connless and connorient) + broadcast
74  };
75  uint8_t model1xPropertiesCount = sizeof(model1xProperties) / sizeof(Property*);
76 
77  // Only present if coupler model is 2.0
78  // One router object per interface, currently only TP1/RF coupler specified
79  Property* model20Properties[] =
80  {
81  new DataProperty( PID_OBJECT_INDEX, false, PDT_UNSIGNED_CHAR, 1, ReadLv3 | WriteLv0, objIndex ), // Must be set by concrete BAUxxxx!
82  new DataProperty( PID_MEDIUM, false, PDT_ENUM8, 1, ReadLv3 | WriteLv0, (uint8_t) mediumType ),
83  };
84  uint8_t model20PropertiesCount = sizeof(model20Properties) / sizeof(Property*);
85 
86  Property* tableProperties[] =
87  {
89  // Command Callback of PID_ROUTETABLE_CONTROL
90  [](RouterObject * obj, uint8_t* data, uint8_t length, uint8_t* resultData, uint8_t& resultLength) -> void {
91  obj->functionRouteTableControl(true, data, length, resultData, resultLength);
92  },
93  // State Callback of PID_ROUTETABLE_CONTROL
94  [](RouterObject * obj, uint8_t* data, uint8_t length, uint8_t* resultData, uint8_t& resultLength) -> void {
95  obj->functionRouteTableControl(false, data, length, resultData, resultLength);
96  })
97  };
98 
99  Property* tableProperties20[] =
100  {
101  new DataProperty( PID_COUPLER_SERVICES_CONTROL, true, PDT_GENERIC_01, 1, ReadLv3 | WriteLv0, (uint8_t) 0), // written by ETS TODO: implement
102  new DataProperty( PID_FILTER_TABLE_USE, true, PDT_BINARY_INFORMATION, 1, ReadLv3 | WriteLv0, (uint16_t) 0 ) // default: invalid filter table, do not use, written by ETS
103  };
104 
105  uint8_t tablePropertiesCount = sizeof(tableProperties) / sizeof(Property*);
106  uint8_t tableProperties20Count = sizeof(tableProperties20) / sizeof(Property*);
107 
108  size_t allPropertiesCount = fixedPropertiesCount;
109  allPropertiesCount += (model == CouplerModel::Model_1x) ? model1xPropertiesCount : model20PropertiesCount;
110  allPropertiesCount += useHopCount ? 1 : 0;
111  allPropertiesCount += useTable ? tablePropertiesCount : 0;
112  allPropertiesCount += useTable && (model == CouplerModel::Model_20) ? tableProperties20Count : 0;
113  allPropertiesCount += ((mediumType == DptMedium::KNX_RF) || (mediumType == DptMedium::KNX_IP)) ? 1 : 0; // PID_RF_ENABLE_SBC and PID_IP_ENABLE_SBC
114 
115  Property* allProperties[allPropertiesCount];
116 
117  memcpy(&allProperties[0], &fixedProperties[0], sizeof(fixedProperties));
118 
119  uint8_t i = fixedPropertiesCount;
120 
121  if (model == CouplerModel::Model_1x)
122  {
123  memcpy(&allProperties[i], model1xProperties, sizeof(model1xProperties));
124  i += model1xPropertiesCount;
125  }
126  else
127  {
128  memcpy(&allProperties[i], model20Properties, sizeof(model20Properties));
129  i += model20PropertiesCount;
130  }
131 
132  if (useHopCount)
133  {
134  // TODO: Primary side: 5 for line coupler, 4 for backbone coupler, only exists if secondary is open medium without hop count
135  // Do we need to set a default value here or is it written by ETS?
136  allProperties[i++] = new DataProperty( PID_HOP_COUNT, true, PDT_UNSIGNED_INT, 1, ReadLv3 | WriteLv0, (uint16_t) 5);
137  }
138 
139  if (useTable)
140  {
141  memcpy(&allProperties[i], tableProperties, sizeof(tableProperties));
142  i += tablePropertiesCount;
143 
144  if ((model == CouplerModel::Model_20))
145  {
146  memcpy(&allProperties[i], tableProperties20, sizeof(tableProperties20));
147  i += tableProperties20Count;
148  }
149  }
150 
151  if (mediumType == DptMedium::KNX_RF)
152  {
153  allProperties[i++] = new FunctionProperty<RouterObject>(this, PID_RF_ENABLE_SBC,
154  // Command Callback of PID_RF_ENABLE_SBC
155  [](RouterObject * obj, uint8_t* data, uint8_t length, uint8_t* resultData, uint8_t& resultLength) -> void
156  {
157  obj->functionRfEnableSbc(true, data, length, resultData, resultLength);
158  },
159  // State Callback of PID_RF_ENABLE_SBC
160  [](RouterObject * obj, uint8_t* data, uint8_t length, uint8_t* resultData, uint8_t& resultLength) -> void
161  {
162  obj->functionRfEnableSbc(false, data, length, resultData, resultLength);
163  });
164  }
165  else if (mediumType == DptMedium::KNX_IP)
166  {
167  allProperties[i++] = new FunctionProperty<RouterObject>(this, PID_IP_ENABLE_SBC,
168  // Command Callback of PID_IP_ENABLE_SBC
169  [](RouterObject * obj, uint8_t* data, uint8_t length, uint8_t* resultData, uint8_t& resultLength) -> void
170  {
171  obj->functionIpEnableSbc(true, data, length, resultData, resultLength);
172  },
173  // State Callback of PID_IP_ENABLE_SBC
174  [](RouterObject * obj, uint8_t* data, uint8_t length, uint8_t* resultData, uint8_t& resultLength) -> void
175  {
176  obj->functionIpEnableSbc(false, data, length, resultData, resultLength);
177  });
178  }
179 
180  if (useTable)
181  TableObject::initializeProperties(sizeof(allProperties), allProperties);
182  else
183  InterfaceObject::initializeProperties(sizeof(allProperties), allProperties);
184 }
185 
186 const uint8_t* RouterObject::restore(const uint8_t* buffer)
187 {
188  return TableObject::restore(buffer);
189 }
190 
191 void RouterObject::commandClearSetRoutingTable(bool bitIsSet)
192 {
193  uint8_t fillbyte = bitIsSet ? 0xFF : 0x00;
194  uint32_t relptr = _memory.toRelative(data());
195 #ifdef KNX_LOG_COUPLER
196  print("RouterObject::commandClearSetRoutingTable ");
197  println(bitIsSet);
198  println(relptr);
199  println((uint32_t)data());
200 #endif
201 
202  for (uint16_t i = 0; i < kFilterTableSize; i++)
203  {
204  _memory.writeMemory(relptr + i, 1, &fillbyte);
205  }
206 }
207 
208 bool RouterObject::statusClearSetRoutingTable(bool bitIsSet)
209 {
210 #ifdef KNX_LOG_COUPLER
211  print("RouterObject::statusClearSetRoutingTable ");
212  println(bitIsSet);
213 #endif
214 
215  for (uint16_t i = 0; i < kFilterTableSize; i++)
216  {
217  if (data()[i] != (bitIsSet ? 0xFF : 0x00))
218  return false;
219  }
220 
221  return true;
222 }
223 
224 void RouterObject::commandClearSetGroupAddress(uint16_t startAddress, uint16_t endAddress, bool bitIsSet)
225 {
226 #ifdef KNX_LOG_COUPLER
227  print("RouterObject::commandClearSetGroupAddress ");
228  print(startAddress);
229  print(" ");
230  print(endAddress);
231  print(" ");
232  println(bitIsSet);
233 #endif
234 
235  uint16_t startOctet = startAddress / 8;
236  uint8_t startBitPosition = startAddress % 8;
237  uint16_t endOctet = endAddress / 8;
238  uint8_t endBitPosition = endAddress % 8;
239 
240  if (startOctet == endOctet)
241  {
242  uint32_t relptr = _memory.toRelative(data()) + startOctet;
243  uint8_t octetData = 0; // = data()[startOctet];
244  _memory.readMemory(relptr, 1, &octetData);
245 
246  for (uint8_t bitPos = startBitPosition; bitPos <= endBitPosition; bitPos++)
247  {
248  if (bitIsSet)
249  octetData |= 1 << bitPos;
250  else
251  octetData &= ~(1 << bitPos);
252  }
253 
254  _memory.writeMemory(relptr, 1, &octetData);
255  return;
256  }
257 
258  for (uint16_t i = startOctet; i <= endOctet; i++)
259  {
260  uint32_t relptr = _memory.toRelative(data()) + i;
261  uint8_t octetData = 0;
262  _memory.readMemory(relptr, 1, &octetData);
263 
264  if (i == startOctet)
265  {
266  for (uint8_t bitPos = startBitPosition; bitPos <= 7; bitPos++)
267  {
268  if (bitIsSet)
269  octetData |= 1 << bitPos;
270  else
271  octetData &= ~(1 << bitPos);
272  }
273  }
274  else if (i == endOctet)
275  {
276  for (uint8_t bitPos = 0; bitPos <= endBitPosition; bitPos++)
277  {
278  if (bitIsSet)
279  octetData |= 1 << bitPos;
280  else
281  octetData &= ~(1 << bitPos);
282  }
283  }
284  else
285  {
286  if (bitIsSet)
287  octetData = 0xFF;
288  else
289  octetData = 0x00;
290  }
291 
292  _memory.writeMemory(relptr, 1, &octetData);
293  }
294 }
295 
296 bool RouterObject::statusClearSetGroupAddress(uint16_t startAddress, uint16_t endAddress, bool bitIsSet)
297 {
298 #ifdef KNX_LOG_COUPLER
299  print("RouterObject::statusClearSetGroupAddress ");
300  print(startAddress);
301  print(" ");
302  print(endAddress);
303  print(" ");
304  println(bitIsSet);
305 #endif
306 
307  uint16_t startOctet = startAddress / 8;
308  uint8_t startBitPosition = startAddress % 8;
309  uint16_t endOctet = endAddress / 8;
310  uint8_t endBitPosition = endAddress % 8;
311 
312  if (startOctet == endOctet)
313  {
314  for (uint8_t bitPos = startBitPosition; bitPos <= endBitPosition; bitPos++)
315  {
316  if (bitIsSet)
317  {
318  if ((data()[startOctet] & (1 << bitPos)) == 0)
319  return false;
320  }
321  else
322  {
323  if ((data()[startOctet] & (1 << bitPos)) != 0)
324  return false;
325  }
326  }
327 
328  return true;
329  }
330 
331  for (uint16_t i = startOctet; i <= endOctet; i++)
332  {
333  if (i == startOctet)
334  {
335  for (uint8_t bitPos = startBitPosition; bitPos <= 7; bitPos++)
336  {
337  if (bitIsSet)
338  {
339  if ((data()[i] & (1 << bitPos)) == 0)
340  return false;
341  }
342  else
343  {
344  if ((data()[i] & (1 << bitPos)) != 0)
345  return false;
346  }
347  }
348  }
349  else if (i == endOctet)
350  {
351  for (uint8_t bitPos = 0; bitPos <= endBitPosition; bitPos++)
352  {
353  if (bitIsSet)
354  {
355  if ((data()[i] & (1 << bitPos)) == 0)
356  return false;
357  }
358  else
359  {
360  if ((data()[i] & (1 << bitPos)) != 0)
361  return false;
362  }
363  }
364  }
365  else
366  {
367  if (data()[i] != (bitIsSet ? 0xFF : 0x00))
368  return false;
369  }
370  }
371 
372  return true;
373 }
374 
375 void RouterObject::functionRouteTableControl(bool isCommand, uint8_t* data, uint8_t length, uint8_t* resultData, uint8_t& resultLength)
376 {
377 #ifdef KNX_LOG_COUPLER
378  print("RouterObject::functionRouteTableControl ");
379  print(isCommand);
380  print(" ");
381  printHex("", data, length);
382 #endif
383 
385 
386  if (isCommand)
387  {
388  if (loadState() != LS_LOADING)
389  {
390  println("access violation. filter table can only be modified in LS_LOADING");
391  resultData[0] = ReturnCodes::AccessReadOnly;
392  resultData[1] = srvId;
393  resultLength = 2;
394  return;
395  }
396 
397  switch (srvId)
398  {
399  case ClearRoutingTable:
400  commandClearSetRoutingTable(false);
401  resultData[0] = ReturnCodes::Success;
402  resultData[1] = srvId;
403  resultLength = 2;
404  return;
405 
406  case SetRoutingTable:
407  commandClearSetRoutingTable(true);
408  resultData[0] = ReturnCodes::Success;
409  resultData[1] = srvId;
410  resultLength = 2;
411  return;
412 
413  case ClearGroupAddress:
414  {
415  uint16_t startAddress;
416  uint16_t endAddress;
417  popWord(startAddress, &data[2]);
418  popWord(endAddress, &data[4]);
419  commandClearSetGroupAddress(startAddress, endAddress, false);
420  resultData[0] = ReturnCodes::Success;
421  resultData[1] = srvId;
422  pushWord(startAddress, &resultData[2]);
423  pushWord(endAddress, &resultData[4]);
424  resultLength = 6;
425  return;
426  }
427 
428  case SetGroupAddress:
429  {
430  uint16_t startAddress;
431  uint16_t endAddress;
432  popWord(startAddress, &data[2]);
433  popWord(endAddress, &data[4]);
434  commandClearSetGroupAddress(startAddress, endAddress, true);
435  resultData[0] = ReturnCodes::Success;
436  resultData[1] = srvId;
437  pushWord(startAddress, &resultData[2]);
438  pushWord(endAddress, &resultData[4]);
439  resultLength = 6;
440  return;
441  }
442  }
443  }
444  else
445  {
446  switch (srvId)
447  {
448  case ClearRoutingTable:
449  resultData[0] = statusClearSetRoutingTable(false) ? ReturnCodes::Success : ReturnCodes::GenericError;
450  resultData[1] = srvId;
451  resultLength = 2;
452  return;
453 
454  case SetRoutingTable:
455  resultData[0] = statusClearSetRoutingTable(true) ? ReturnCodes::Success : ReturnCodes::GenericError;
456  resultData[1] = srvId;
457  resultLength = 2;
458  return;
459 
460  case ClearGroupAddress:
461  {
462  uint16_t startAddress;
463  uint16_t endAddress;
464  popWord(startAddress, &data[2]);
465  popWord(endAddress, &data[4]);
466  resultData[0] = statusClearSetGroupAddress(startAddress, endAddress, false) ? ReturnCodes::Success : ReturnCodes::GenericError;
467  resultData[1] = srvId;
468  pushWord(startAddress, &resultData[2]);
469  pushWord(endAddress, &resultData[4]);
470  resultLength = 6;
471  return;
472  }
473 
474  case SetGroupAddress:
475  {
476  uint16_t startAddress;
477  uint16_t endAddress;
478  popWord(startAddress, &data[2]);
479  popWord(endAddress, &data[4]);
480  resultData[0] = statusClearSetGroupAddress(startAddress, endAddress, true) ? ReturnCodes::Success : ReturnCodes::GenericError;
481  resultData[1] = srvId;
482  pushWord(startAddress, &resultData[2]);
483  pushWord(endAddress, &resultData[4]);
484  resultLength = 6;
485  return;
486  }
487  }
488  }
489 
490  // We should not get here
491  resultData[0] = ReturnCodes::GenericError;
492  resultData[1] = srvId;
493  resultLength = 2;
494 }
495 
496 void RouterObject::functionRfEnableSbc(bool isCommand, uint8_t* data, uint8_t length, uint8_t* resultData, uint8_t& resultLength)
497 {
498  if (isCommand)
499  {
500  _rfSbcRoutingEnabled = (data[0] == 1) ? true : false;
501  }
502 
503  resultData[0] = ReturnCodes::Success;
504  resultData[1] = _rfSbcRoutingEnabled ? 1 : 0;
505  resultLength = 2;
506 }
507 
509 {
510 #ifdef KNX_LOG_COUPLER
511  print("RouterObject::isRfSbcRoutingEnabled ");
512  println(_rfSbcRoutingEnabled);
513 #endif
514  return _rfSbcRoutingEnabled;
515 }
516 
517 // TODO: check if IP SBC works the same way, just copied from RF
518 void RouterObject::functionIpEnableSbc(bool isCommand, uint8_t* data, uint8_t length, uint8_t* resultData, uint8_t& resultLength)
519 {
520 #ifdef KNX_LOG_COUPLER
521  print("RouterObject::functionIpEnableSbc ");
522  print(isCommand);
523  printHex(" ", data, length);
524 #endif
525 
526  if (isCommand)
527  {
528  _ipSbcRoutingEnabled = (data[0] == 1) ? true : false;
529  }
530 
531  resultData[0] = ReturnCodes::Success;
532  resultData[1] = _ipSbcRoutingEnabled ? 1 : 0;
533  resultLength = 2;
534 }
535 
536 // TODO: check if IP SBC works the same way, just copied from RF
538 {
539 #ifdef KNX_LOG_COUPLER
540  print("RouterObject::isIpSbcRoutingEnabled ");
541  println(_ipSbcRoutingEnabled);
542 #endif
543  return _ipSbcRoutingEnabled;
544 }
545 
547 {
548 #ifdef KNX_LOG_COUPLER
549  println("RouterObject::beforeStateChange");
550 #endif
551 
552  if (newState != LS_LOADED)
553  return;
554 }
555 
556 void RouterObject::masterReset(EraseCode eraseCode, uint8_t channel)
557 {
558 #ifdef KNX_LOG_COUPLER
559  print("RouterObject::masterReset ");
560  print(eraseCode);
561  print(" ");
562  println(channel);
563 #endif
564 
565  if (eraseCode == FactoryReset)
566  {
567  // TODO: handle different erase codes
568  println("Factory reset of router object with filter table requested.");
569  }
570 }
571 
572 bool RouterObject::isGroupAddressInFilterTable(uint16_t groupAddress)
573 {
574  if (loadState() != LS_LOADED)
575  return false;
576 
577  uint8_t filterTableUse = 0x01;
578  Property* propFilterTableUse = property(PID_FILTER_TABLE_USE);
579 
580  if (propFilterTableUse) // check if property PID_FILTER_TABLE_USE exists (only coupler 20), if not, ignore this
581  if (propFilterTableUse->read(filterTableUse) == 0) // check if property PID_FILTER_TABLE_USE is empty, if so, return false
582  return false;
583 
584  if ((filterTableUse & 0x01) == 1)
585  {
586  uint8_t* filterTable = data();
587  // octet_address = GA_value div 8
588  // bit_position = GA_value mod 8
589  uint16_t octetAddress = groupAddress / 8;
590  uint8_t bitPosition = groupAddress % 8;
591 
592 
593  if (filterTable)
594  return (filterTable[octetAddress] & (1 << bitPosition)) == (1 << bitPosition);
595  else
596  {
597  println("RouterObject::isGroupAddressInFilterTable filterTable is NULL");
598  return false;
599  }
600  }
601 
602  return false;
603 }
void print(const char *s)
void println(const char *s)
void printHex(const char *suffix, const uint8_t *data, size_t length, bool newline)
Definition: bits.cpp:12
uint8_t * pushWord(uint16_t w, uint8_t *data)
Definition: bits.cpp:64
const uint8_t * popWord(uint16_t &w, const uint8_t *data)
Definition: bits.cpp:34
virtual void initializeProperties(size_t propertiesSize, Property **properties)
Intializes the Property-array the the supplied values.
Property * property(PropertyID id)
Gets property with PropertyID id if it exists and nullptr otherwise.
Definition: memory.h:37
uint32_t toRelative(uint8_t *absoluteAddress)
Definition: memory.cpp:332
void readMemory()
Definition: memory.cpp:14
void writeMemory()
Definition: memory.cpp:137
virtual uint8_t read(uint16_t start, uint8_t count, uint8_t *data) const =0
void masterReset(EraseCode eraseCode, uint8_t channel) override
void beforeStateChange(LoadState &newState) override
This method is called before the interface object enters a new LoadState.
bool isGroupAddressInFilterTable(uint16_t groupAddress)
bool isRfSbcRoutingEnabled()
void initialize1x(DptMedium mediumType, uint16_t maxApduSize)
const uint8_t * restore(const uint8_t *buffer) override
This method is called when the object should restore its state from the buffer.
RouterObject(Memory &memory, uint32_t staticTableAdr=0, uint32_t staticTableSize=0)
bool isIpSbcRoutingEnabled()
void initialize20(uint8_t objIndex, DptMedium mediumType, RouterObjectType rtType, uint16_t maxApduSize)
void initialize(CouplerModel model, uint8_t objIndex, DptMedium mediumType, RouterObjectType rtType, uint16_t maxApduSize)
This class provides common functionality for interface objects that are configured by ETS with MemorW...
Definition: table_object.h:13
void initializeProperties(size_t propertiesSize, Property **properties) override
Intializes the Property-array the the supplied values.
LoadState loadState()
This method returns the LoadState of the interface object.
Memory & _memory
Definition: table_object.h:60
uint8_t * data()
returns the internal data of the interface object.
const uint8_t * restore(const uint8_t *buffer) override
This method is called when the object should restore its state from the buffer.
@ OT_ROUTER
Router Object.
@ GROUP_6FFFROUTE
Definition: knx_types.h:270
@ GROUP_REPEAT
Definition: knx_types.h:267
@ GROUP_7000UNLOCK
Definition: knx_types.h:271
EraseCode
Definition: knx_types.h:242
@ FactoryReset
Definition: knx_types.h:245
DptMedium
Definition: knx_types.h:254
@ KNX_IP
Definition: knx_types.h:260
@ KNX_RF
Definition: knx_types.h:259
@ PHYS_REPEAT
Definition: knx_types.h:282
@ GROUP_IACK_ROUT
Definition: knx_types.h:285
@ BROADCAST_REPEAT
Definition: knx_types.h:284
@ PHYS_IACK_NORMAL
Definition: knx_types.h:287
@ PHYS_FRAME_ROUT
Definition: knx_types.h:281
@ AccessReadOnly
Definition: knx_types.h:96
@ GenericError
Definition: knx_types.h:100
@ Success
Definition: knx_types.h:83
@ PID_MAIN_LCCONFIG
Definition: property.h:182
@ PID_SUB_LCGRPCONFIG
Definition: property.h:185
@ PID_SUB_LCCONFIG
Definition: property.h:183
@ PID_RF_ENABLE_SBC
Definition: property.h:193
@ PID_OBJECT_TYPE
Interface Object Type independent Properties.
Definition: property.h:72
@ PID_ROUTETABLE_CONTROL
Definition: property.h:186
@ PID_HOP_COUNT
Definition: property.h:190
@ PID_OBJECT_INDEX
Definition: property.h:89
@ PID_MEDIUM
Definition: property.h:191
@ PID_MAX_APDU_LENGTH_ROUTER
Definition: property.h:188
@ PID_IP_ENABLE_SBC
Definition: property.h:194
@ PID_MAIN_LCGRPCONFIG
Definition: property.h:184
@ PID_FILTER_TABLE_USE
Definition: property.h:192
@ PID_MEDIUM_STATUS
Router Object.
Definition: property.h:181
@ PID_COUPLER_SERVICES_CONTROL
Definition: property.h:187
@ PDT_BINARY_INFORMATION
length: 3
Definition: property.h:58
@ PDT_BITSET8
length: 3
Definition: property.h:59
@ PDT_ENUM8
length: 3
Definition: property.h:61
@ PDT_UNSIGNED_INT
length: 2
Definition: property.h:22
@ PDT_UNSIGNED_CHAR
length: 1
Definition: property.h:20
@ PDT_GENERIC_01
length: 1
Definition: property.h:35
@ WriteLv0
Definition: property.h:247
@ ReadLv3
Definition: property.h:246
LoadState
Definition: property.h:198
@ LS_LOADED
Definition: property.h:200
@ LS_LOADING
Definition: property.h:201
RouteTableServices
@ SetGroupAddress
@ ClearGroupAddress
@ ClearRoutingTable
@ SetRoutingTable
RouterObjectType
Definition: router_object.h:17
@ Primary
Definition: router_object.h:18
@ Single
Definition: router_object.h:20
@ Secondary
Definition: router_object.h:19
CouplerModel
Definition: router_object.h:11
@ Model_20
Definition: router_object.h:13
@ Model_1x
Definition: router_object.h:12