3 #if KNX_SERVICE_FAMILY_CORE >= 2
6 #define LEN_SERVICE_FAMILIES 2
7 #if MASK_VERSION == 0x091A
9 #define LEN_SERVICE_DIB (2 + 4 * LEN_SERVICE_FAMILIES)
11 #define LEN_SERVICE_DIB (2 + 3 * LEN_SERVICE_FAMILIES)
15 #define LEN_SERVICE_DIB (2 + 3 * LEN_SERVICE_FAMILIES)
17 #define LEN_SERVICE_DIB (2 + 2 * LEN_SERVICE_FAMILIES)
22 :
KnxIpFrame(LEN_KNXIP_HEADER + LEN_IPHPAI + dibLength),
23 _controlEndpoint(_data + LEN_KNXIP_HEADER)
27 _controlEndpoint.
length(LEN_IPHPAI);
32 currentPos = LEN_KNXIP_HEADER + LEN_IPHPAI;
39 _deviceInfo.
length(LEN_DEVICE_INFORMATION_DIB);
41 #if MASK_VERSION == 0x57B0
53 uint8_t mac_address[LEN_MAC_ADDRESS] = {0};
55 prop->
read(mac_address);
58 uint8_t friendlyName[LEN_FRIENDLY_NAME] = {0};
60 prop->
read(1, LEN_FRIENDLY_NAME, friendlyName);
63 currentPos += LEN_DEVICE_INFORMATION_DIB;
70 _supportedServices.
length(LEN_SERVICE_DIB);
77 #if MASK_VERSION == 0x091A
80 currentPos += LEN_SERVICE_DIB;
87 _ipConfig.
length(LEN_IP_CONFIG_DIB);
95 currentPos += LEN_IP_CONFIG_DIB;
102 _ipCurConfig.
length(LEN_IP_CURRENT_CONFIG_DIB);
107 _ipCurConfig.
dhcp(0);
109 _ipCurConfig.
info2(0x00);
111 currentPos += LEN_IP_CURRENT_CONFIG_DIB;
127 for (
int i = 0; i < length; i++)
129 uint16_t additional = 0;
130 popWord(additional, addresses + i * 2);
134 currentPos += _knxAddresses.
length();
148 const uint8_t* addresses;
150 if (length == KNX_TUNNELING)
156 uint8_t addrbuffer[KNX_TUNNELING * 2];
157 addresses = (uint8_t*)addrbuffer;
159 for (
int i = 0; i < KNX_TUNNELING; i++)
161 addrbuffer[i * 2 + 1] = i + 1;
166 for (
int i = 0; i < length; i++)
168 uint16_t additional = 0;
169 popWord(additional, addresses + i * 2);
172 uint8_t doubleCounter = 0;
175 for (
int i = 0; i < KNX_TUNNELING; i++)
181 if (tunnels[i].ChannelId != 0)
186 if (doubleCounter > 1 && used)
200 currentPos += _tunnelInfo.
length();
207 _extended.
length(LEN_EXTENDED_DEVICE_INFORMATION_DIB);
213 currentPos += LEN_EXTENDED_DEVICE_INFORMATION_DIB;
218 return _controlEndpoint;
224 return _data + LEN_KNXIP_HEADER + LEN_IPHPAI;
const uint8_t * popWord(uint16_t &w, const uint8_t *data)
uint16_t individualAddress()
const uint8_t * propertyData(PropertyID id)
virtual void readPropertyLength(PropertyID id, uint16_t &length)
Read length of a property of the interface object.
T propertyValue(PropertyID id)
Property * property(PropertyID id)
Gets property with PropertyID id if it exists and nullptr otherwise.
DescriptionTypeCode code() const
uint16_t serviceTypeIdentifier() const
uint16_t individualAddress()
void additional(uint16_t addr)
void setIpCurrentConfig(IpParameterObject ¶meters)
void setIpConfig(IpParameterObject ¶meters)
void setKnxAddresses(IpParameterObject ¶meters, DeviceObject &deviceObject)
void setTunnelingInfo(IpParameterObject ¶meters, DeviceObject &deviceObject, KnxIpTunnelConnection tunnels[])
void setExtendedDeviceInfo()
IpHostProtocolAddressInformation & controlEndpoint()
void setSupportedServices()
void setDeviceInfo(IpParameterObject ¶meters, DeviceObject &deviceObject)
KnxIpSearchResponseExtended(IpParameterObject ¶meters, DeviceObject &deviceObj, int dibLength)
uint8_t serviceVersion(ServiceFamily family)
void tunnelingSlot(uint16_t addr, uint16_t state)
virtual uint8_t read(uint16_t start, uint8_t count, uint8_t *data) const =0
@ PID_CURRENT_DEFAULT_GATEWAY
@ PID_PROJECT_INSTALLATION_ID
KNXnet/IP Parameter Object.
@ PID_ADDITIONAL_INDIVIDUAL_ADDRESSES
@ PID_CURRENT_IP_ASSIGNMENT_METHOD
@ PID_CURRENT_SUBNET_MASK
@ PID_KNX_INDIVIDUAL_ADDRESS
@ PID_ROUTING_MULTICAST_ADDRESS
@ PID_IP_ASSIGNMENT_METHOD