knx
ETS configurable knx-stack
knx_ip_device_information_dib.cpp
Go to the documentation of this file.
2 #include "bits.h"
3 
4 #ifdef USE_IP
6 {}
7 
9 {
10  return _data[2];
11 }
12 
13 
15 {
16  _data[2] = value;
17 }
18 
19 
21 {
22  return _data[3];
23 }
24 
25 
27 {
28  _data[3] = value;
29 }
30 
31 
33 {
34  return getWord(_data + 4);
35 }
36 
37 
39 {
40  pushWord(value, _data + 4);
41 }
42 
43 
45 {
46  return getWord(_data + 6);
47 }
48 
49 
51 {
52  pushWord(value, _data + 6);
53 }
54 
55 
57 {
58  return _data + 8;
59 }
60 
61 
62 void KnxIpDeviceInformationDIB::serialNumber(const uint8_t* value)
63 {
64  pushByteArray(value, LEN_SERIAL_NUMBER, _data + 8);
65 }
66 
67 
69 {
70  return getInt(_data + 14);
71 }
72 
73 
75 {
76  pushInt(value, _data + 14);
77 }
78 
79 
81 {
82  return _data + 18;
83 }
84 
85 
86 void KnxIpDeviceInformationDIB::macAddress(const uint8_t* value)
87 {
88  pushByteArray(value, LEN_MAC_ADDRESS, _data + 18);
89 }
90 
91 
93 {
94  return _data + 24;
95 }
96 
97 
98 void KnxIpDeviceInformationDIB::friendlyName(const uint8_t* value)
99 {
100  pushByteArray(value, LEN_FRIENDLY_NAME, _data + 24);
101 }
102 #endif
uint8_t * pushInt(uint32_t i, uint8_t *data)
Definition: bits.cpp:72
uint8_t * pushByteArray(const uint8_t *src, uint32_t size, uint8_t *data)
Definition: bits.cpp:82
uint8_t * pushWord(uint16_t w, uint8_t *data)
Definition: bits.cpp:64
uint16_t getWord(const uint8_t *data)
Definition: bits.cpp:91
uint32_t getInt(const uint8_t *data)
Definition: bits.cpp:96
uint8_t * _data
Definition: knx_ip_dib.h:32