knx
ETS configurable knx-stack
knx_ip_tunneling_info_dib.cpp
Go to the documentation of this file.
2 #include "service_families.h"
3 #if KNX_SERVICE_FAMILY_CORE >= 2
4 
5 #ifdef USE_IP
7 {
8  currentPos = data + 4;
9 }
10 
12 {
13  uint16_t addr = 0;
14  popWord(addr, _data + 2);
15  return addr;
16 }
17 
19 {
20  pushWord(addr, _data + 2);
21 }
22 
23 void KnxIpTunnelingInfoDIB::tunnelingSlot(uint16_t addr, uint16_t state)
24 {
25  pushWord(addr, currentPos);
26  pushWord(state, currentPos + 2);
27  currentPos += 4;
28  length(currentPos - _data);
29 }
30 #endif
31 #endif
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
uint8_t length() const
Definition: knx_ip_dib.cpp:9
uint8_t * _data
Definition: knx_ip_dib.h:32
void tunnelingSlot(uint16_t addr, uint16_t state)