mirror of
https://github.com/thelsing/knx.git
synced 2025-09-09 17:51:55 +02:00
Bugfixes
This commit is contained in:
parent
1955bbdf11
commit
7d348bd493
@ -27,18 +27,18 @@ Bau07B0::Bau07B0(Platform& platform)
|
||||
// This differs from BAU to BAU with different medium types.
|
||||
// See PID_IO_LIST
|
||||
Property* prop = _deviceObj.property(PID_IO_LIST);
|
||||
prop->write(1, OT_DEVICE);
|
||||
prop->write(2, OT_ADDR_TABLE);
|
||||
prop->write(3, OT_ASSOC_TABLE);
|
||||
prop->write(4, OT_GRP_OBJ_TABLE);
|
||||
prop->write(5, OT_APPLICATION_PROG);
|
||||
prop->write(1, (uint16_t) OT_DEVICE);
|
||||
prop->write(2, (uint16_t) OT_ADDR_TABLE);
|
||||
prop->write(3, (uint16_t) OT_ASSOC_TABLE);
|
||||
prop->write(4, (uint16_t) OT_GRP_OBJ_TABLE);
|
||||
prop->write(5, (uint16_t) OT_APPLICATION_PROG);
|
||||
#if defined(USE_DATASECURE) && defined(USE_CEMI_SERVER)
|
||||
prop->write(6, OT_SECURITY);
|
||||
prop->write(7, OT_CEMI_SERVER);
|
||||
prop->write(6, (uint16_t) OT_SECURITY);
|
||||
prop->write(7, (uint16_t) OT_CEMI_SERVER);
|
||||
#elif defined(USE_DATASECURE)
|
||||
prop->write(6, OT_SECURITY);
|
||||
prop->write(6, (uint16_t) OT_SECURITY);
|
||||
#elif defined(USE_CEMI_SERVER)
|
||||
prop->write(6, OT_CEMI_SERVER);
|
||||
prop->write(6, (uint16_t) OT_CEMI_SERVER);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -35,19 +35,19 @@ Bau27B0::Bau27B0(Platform& platform)
|
||||
// This differs from BAU to BAU with different medium types.
|
||||
// See PID_IO_LIST
|
||||
Property* prop = _deviceObj.property(PID_IO_LIST);
|
||||
prop->write(1, OT_DEVICE);
|
||||
prop->write(2, OT_ADDR_TABLE);
|
||||
prop->write(3, OT_ASSOC_TABLE);
|
||||
prop->write(4, OT_GRP_OBJ_TABLE);
|
||||
prop->write(5, OT_APPLICATION_PROG);
|
||||
prop->write(6, OT_RF_MEDIUM);
|
||||
prop->write(1, (uint16_t) OT_DEVICE);
|
||||
prop->write(2, (uint16_t) OT_ADDR_TABLE);
|
||||
prop->write(3, (uint16_t) OT_ASSOC_TABLE);
|
||||
prop->write(4, (uint16_t) OT_GRP_OBJ_TABLE);
|
||||
prop->write(5, (uint16_t) OT_APPLICATION_PROG);
|
||||
prop->write(6, (uint16_t) OT_RF_MEDIUM);
|
||||
#if defined(USE_DATASECURE) && defined(USE_CEMI_SERVER)
|
||||
prop->write(7, OT_SECURITY);
|
||||
prop->write(8, OT_CEMI_SERVER);
|
||||
prop->write(7, (uint16_t) OT_SECURITY);
|
||||
prop->write(8, (uint16_t) OT_CEMI_SERVER);
|
||||
#elif defined(USE_DATASECURE)
|
||||
prop->write(7, OT_SECURITY);
|
||||
prop->write(7, (uint16_t) OT_SECURITY);
|
||||
#elif defined(USE_CEMI_SERVER)
|
||||
prop->write(7, OT_CEMI_SERVER);
|
||||
prop->write(7, (uint16_t)OT_CEMI_SERVER);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -32,19 +32,19 @@ Bau57B0::Bau57B0(Platform& platform)
|
||||
// This differs from BAU to BAU with different medium types.
|
||||
// See PID_IO_LIST
|
||||
Property* prop = _deviceObj.property(PID_IO_LIST);
|
||||
prop->write(1, OT_DEVICE);
|
||||
prop->write(2, OT_ADDR_TABLE);
|
||||
prop->write(3, OT_ASSOC_TABLE);
|
||||
prop->write(4, OT_GRP_OBJ_TABLE);
|
||||
prop->write(5, OT_APPLICATION_PROG);
|
||||
prop->write(6, OT_IP_PARAMETER);
|
||||
prop->write(1, (uint16_t) OT_DEVICE);
|
||||
prop->write(2, (uint16_t) OT_ADDR_TABLE);
|
||||
prop->write(3, (uint16_t) OT_ASSOC_TABLE);
|
||||
prop->write(4, (uint16_t) OT_GRP_OBJ_TABLE);
|
||||
prop->write(5, (uint16_t) OT_APPLICATION_PROG);
|
||||
prop->write(6, (uint16_t) OT_IP_PARAMETER);
|
||||
#if defined(USE_DATASECURE) && defined(USE_CEMI_SERVER)
|
||||
prop->write(7, OT_SECURITY);
|
||||
prop->write(8, OT_CEMI_SERVER);
|
||||
prop->write(7, (uint16_t) OT_SECURITY);
|
||||
prop->write(8, (uint16_t) OT_CEMI_SERVER);
|
||||
#elif defined(USE_DATASECURE)
|
||||
prop->write(7, OT_SECURITY);
|
||||
prop->write(7, (uint16_t) OT_SECURITY);
|
||||
#elif defined(USE_CEMI_SERVER)
|
||||
prop->write(7, OT_CEMI_SERVER);
|
||||
prop->write(7, (uint16_t) OT_CEMI_SERVER);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -359,7 +359,10 @@ void BauSystemB::propertyValueReadIndication(Priority priority, HopCountType hop
|
||||
if (obj)
|
||||
{
|
||||
uint8_t elementSize = obj->propertySize((PropertyID)propertyId);
|
||||
size = elementSize * numberOfElements;
|
||||
if (startIndex > 0)
|
||||
size = elementSize * numberOfElements;
|
||||
else
|
||||
size = sizeof(uint16_t); // size of propert array entry 0 which is the size
|
||||
}
|
||||
else
|
||||
elementCount = 0;
|
||||
@ -384,7 +387,10 @@ void BauSystemB::propertyValueExtReadIndication(Priority priority, HopCountType
|
||||
if (obj)
|
||||
{
|
||||
uint8_t elementSize = obj->propertySize((PropertyID)propertyId);
|
||||
size = elementSize * numberOfElements;
|
||||
if (startIndex > 0)
|
||||
size = elementSize * numberOfElements;
|
||||
else
|
||||
size = sizeof(uint16_t); // size of propert array entry 0 which is the size
|
||||
}
|
||||
else
|
||||
elementCount = 0;
|
||||
|
@ -23,7 +23,11 @@ DeviceObject::DeviceObject()
|
||||
[](DeviceObject* io, uint16_t start, uint8_t count, uint8_t* data) -> uint8_t
|
||||
{
|
||||
if(start == 0)
|
||||
{
|
||||
uint16_t currentNoOfElements = 1;
|
||||
pushWord(currentNoOfElements, data);
|
||||
return 1;
|
||||
}
|
||||
|
||||
pushByteArray(io->propertyData(PID_SERIAL_NUMBER), 2, data);
|
||||
return 1;
|
||||
@ -36,8 +40,12 @@ DeviceObject::DeviceObject()
|
||||
[](DeviceObject* io, uint16_t start, uint8_t count, uint8_t* data) -> uint8_t
|
||||
{
|
||||
if(start == 0)
|
||||
{
|
||||
uint16_t currentNoOfElements = 1;
|
||||
pushWord(currentNoOfElements, data);
|
||||
return 1;
|
||||
|
||||
}
|
||||
|
||||
*data = io->_prgMode;
|
||||
return 1;
|
||||
},
|
||||
@ -54,7 +62,11 @@ DeviceObject::DeviceObject()
|
||||
[](DeviceObject* io, uint16_t start, uint8_t count, uint8_t* data) -> uint8_t
|
||||
{
|
||||
if(start == 0)
|
||||
{
|
||||
uint16_t currentNoOfElements = 1;
|
||||
pushWord(currentNoOfElements, data);
|
||||
return 1;
|
||||
}
|
||||
|
||||
*data = ((io->_ownAddress >> 8) & 0xff);
|
||||
|
||||
@ -64,12 +76,16 @@ DeviceObject::DeviceObject()
|
||||
[](DeviceObject* io, uint16_t start, uint8_t count, uint8_t* data) -> uint8_t
|
||||
{
|
||||
if(start == 0)
|
||||
{
|
||||
uint16_t currentNoOfElements = 1;
|
||||
pushWord(currentNoOfElements, data);
|
||||
return 1;
|
||||
}
|
||||
|
||||
*data = (io->_ownAddress & 0xff);
|
||||
return 1;
|
||||
}),
|
||||
new DataProperty(PID_IO_LIST, false, PDT_UNSIGNED_INT, 1, ReadLv3 | WriteLv0),
|
||||
new DataProperty(PID_IO_LIST, false, PDT_UNSIGNED_INT, 8, ReadLv3 | WriteLv0),
|
||||
new DataProperty(PID_HARDWARE_TYPE, true, PDT_GENERIC_06, 1, ReadLv3 | WriteLv3, hardwareType),
|
||||
new DataProperty(PID_DEVICE_DESCRIPTOR, false, PDT_GENERIC_02, 1, ReadLv3 | WriteLv0),
|
||||
#ifdef USE_RF
|
||||
|
@ -36,26 +36,25 @@ uint8_t Property::ElementSize() const
|
||||
case PDT_CONTROL: // is actually 10 if written, but this is always handled with a callback
|
||||
case PDT_GENERIC_01:
|
||||
case PDT_UNSIGNED_CHAR:
|
||||
case PDT_BITSET8:
|
||||
case PDT_BINARY_INFORMATION: // only 1 bit really
|
||||
case PDT_ENUM8:
|
||||
case PDT_SCALING:
|
||||
return 1;
|
||||
case PDT_GENERIC_02:
|
||||
case PDT_INT:
|
||||
case PDT_KNX_FLOAT:
|
||||
case PDT_UNSIGNED_INT:
|
||||
case PDT_VERSION:
|
||||
return 2;
|
||||
case PDT_ALARM_INFO:
|
||||
case PDT_BINARY_INFORMATION:
|
||||
case PDT_BITSET16:
|
||||
case PDT_BITSET8:
|
||||
return 2;
|
||||
case PDT_DATE:
|
||||
case PDT_ENUM8:
|
||||
case PDT_ESCAPE:
|
||||
case PDT_FUNCTION:
|
||||
case PDT_GENERIC_03:
|
||||
case PDT_NE_FL:
|
||||
case PDT_NE_VL:
|
||||
case PDT_POLL_GROUP_SETTING:
|
||||
case PDT_SCALING:
|
||||
case PDT_TIME:
|
||||
case PDT_UTF8:
|
||||
return 3;
|
||||
@ -68,6 +67,7 @@ uint8_t Property::ElementSize() const
|
||||
case PDT_SHORT_CHAR_BLOCK:
|
||||
return 5;
|
||||
case PDT_GENERIC_06:
|
||||
case PDT_ALARM_INFO:
|
||||
return 6;
|
||||
case PDT_GENERIC_07:
|
||||
return 7;
|
||||
|
Loading…
Reference in New Issue
Block a user