diff --git a/knx-linux/knx-linux-Debug.vgdbsettings b/knx-linux/knx-linux-Debug.vgdbsettings
index 8e4ab7c..59c1756 100644
--- a/knx-linux/knx-linux-Debug.vgdbsettings
+++ b/knx-linux/knx-linux-Debug.vgdbsettings
@@ -111,7 +111,7 @@
True
- -DMEDIUM_TYPE=5
+ -DMEDIUM_TYPE=5 -DUSE_CEMI_SERVER
true
true
diff --git a/knx-linux/knx-linux.vcxproj b/knx-linux/knx-linux.vcxproj
index 0d59f71..b2cdfb6 100644
--- a/knx-linux/knx-linux.vcxproj
+++ b/knx-linux/knx-linux.vcxproj
@@ -83,6 +83,9 @@
+
+
+
@@ -99,7 +102,7 @@
-
+
@@ -108,6 +111,7 @@
+
@@ -131,6 +135,9 @@
+
+
+
@@ -153,6 +160,7 @@
+
diff --git a/knx-linux/knx-linux.vcxproj.filters b/knx-linux/knx-linux.vcxproj.filters
index 52f7e53..5cd6a8b 100644
--- a/knx-linux/knx-linux.vcxproj.filters
+++ b/knx-linux/knx-linux.vcxproj.filters
@@ -104,9 +104,6 @@
Header files\knx
-
- Header files\knx
-
Header files\knx
@@ -152,6 +149,21 @@
Header files\knx
+
+ Header files\knx
+
+
+ Header files\knx
+
+
+ Header files\knx
+
+
+ Header files\knx
+
+
+ Header files\knx
+
@@ -265,5 +277,17 @@
Source files\knx
+
+ Source files\knx
+
+
+ Source files\knx
+
+
+ Source files\knx
+
+
+ Source files\knx
+
\ No newline at end of file
diff --git a/src/knx/address_table_object.cpp b/src/knx/address_table_object.cpp
index 0902aac..409521b 100644
--- a/src/knx/address_table_object.cpp
+++ b/src/knx/address_table_object.cpp
@@ -11,7 +11,7 @@ AddressTableObject::AddressTableObject(Memory& memory)
}
-void AddressTableObject::readProperty(PropertyID id, uint32_t start, uint32_t& count, uint8_t* data)
+void AddressTableObject::readProperty(PropertyID id, uint16_t start, uint8_t& count, uint8_t* data)
{
switch (id)
{
diff --git a/src/knx/address_table_object.h b/src/knx/address_table_object.h
index f876aea..d43dc88 100644
--- a/src/knx/address_table_object.h
+++ b/src/knx/address_table_object.h
@@ -18,9 +18,9 @@ class AddressTableObject : public TableObject
* @param memory This parameter is only passed to the custructor of TableObject an not used by this class.
*/
AddressTableObject(Memory& memory);
- void readProperty(PropertyID id, uint32_t start, uint32_t& count, uint8_t* data);
- uint8_t* restore(uint8_t* buffer);
- ObjectType objectType() { return OT_ADDR_TABLE; }
+ void readProperty(PropertyID id, uint16_t start, uint8_t& count, uint8_t* data) override;
+ uint8_t* restore(uint8_t* buffer) override;
+ ObjectType objectType() override { return OT_ADDR_TABLE; }
/**
* returns the number of group addresses of the object.
diff --git a/src/knx/application_program_object.cpp b/src/knx/application_program_object.cpp
index 5de0996..6362754 100644
--- a/src/knx/application_program_object.cpp
+++ b/src/knx/application_program_object.cpp
@@ -7,7 +7,7 @@ ApplicationProgramObject::ApplicationProgramObject(Memory& memory)
}
-void ApplicationProgramObject::readProperty(PropertyID id, uint32_t start, uint32_t& count, uint8_t* data)
+void ApplicationProgramObject::readProperty(PropertyID id, uint16_t start, uint8_t& count, uint8_t* data)
{
switch (id)
{
@@ -25,7 +25,7 @@ void ApplicationProgramObject::readProperty(PropertyID id, uint32_t start, uint3
}
}
-void ApplicationProgramObject::writeProperty(PropertyID id, uint32_t start, uint8_t* data, uint32_t& count)
+void ApplicationProgramObject::writeProperty(PropertyID id, uint16_t start, uint8_t* data, uint8_t& count)
{
switch (id)
{
diff --git a/src/knx/application_program_object.h b/src/knx/application_program_object.h
index adb715f..97a5aca 100644
--- a/src/knx/application_program_object.h
+++ b/src/knx/application_program_object.h
@@ -6,8 +6,8 @@ class ApplicationProgramObject : public TableObject
{
public:
ApplicationProgramObject(Memory& memory);
- void readProperty(PropertyID id, uint32_t start, uint32_t& count, uint8_t* data);
- void writeProperty(PropertyID id, uint32_t start, uint8_t* data, uint32_t& count);
+ void readProperty(PropertyID id, uint16_t start, uint8_t& count, uint8_t* data);
+ void writeProperty(PropertyID id, uint16_t start, uint8_t* data, uint8_t& count);
uint8_t propertySize(PropertyID id);
ObjectType objectType() { return OT_APPLICATION_PROG; }
uint8_t* data(uint32_t addr);
diff --git a/src/knx/association_table_object.cpp b/src/knx/association_table_object.cpp
index b5ae024..ceaf9a6 100644
--- a/src/knx/association_table_object.cpp
+++ b/src/knx/association_table_object.cpp
@@ -11,7 +11,7 @@ AssociationTableObject::AssociationTableObject(Memory& memory)
}
-void AssociationTableObject::readProperty(PropertyID id, uint32_t start, uint32_t& count, uint8_t* data)
+void AssociationTableObject::readProperty(PropertyID id, uint16_t start, uint8_t& count, uint8_t* data)
{
switch (id)
{
diff --git a/src/knx/association_table_object.h b/src/knx/association_table_object.h
index f9c28ab..d6b6ba8 100644
--- a/src/knx/association_table_object.h
+++ b/src/knx/association_table_object.h
@@ -6,7 +6,7 @@ class AssociationTableObject : public TableObject
{
public:
AssociationTableObject(Memory& memory);
- void readProperty(PropertyID id, uint32_t start, uint32_t& count, uint8_t* data);
+ void readProperty(PropertyID id, uint16_t start, uint8_t& count, uint8_t* data);
ObjectType objectType() { return OT_ASSOC_TABLE; }
uint8_t* restore(uint8_t* buffer);
diff --git a/src/knx/bau.cpp b/src/knx/bau.cpp
index f3db808..6057ed5 100644
--- a/src/knx/bau.cpp
+++ b/src/knx/bau.cpp
@@ -8,19 +8,19 @@ void BusAccessUnit::groupValueReadIndication(uint16_t asap, Priority priority, H
{
}
-void BusAccessUnit::groupValueReadResponseConfirm(AckType ack, uint16_t asap, Priority priority, HopCountType hopTtype, uint8_t * data, uint8_t dataLength, bool status)
+void BusAccessUnit::groupValueReadResponseConfirm(AckType ack, uint16_t asap, Priority priority, HopCountType hopTtype, uint8_t* data, uint8_t dataLength, bool status)
{
}
-void BusAccessUnit::groupValueReadAppLayerConfirm(uint16_t asap, Priority priority, HopCountType hopType, uint8_t * data, uint8_t dataLength)
+void BusAccessUnit::groupValueReadAppLayerConfirm(uint16_t asap, Priority priority, HopCountType hopType, uint8_t* data, uint8_t dataLength)
{
}
-void BusAccessUnit::groupValueWriteLocalConfirm(AckType ack, uint16_t asap, Priority priority, HopCountType hopType, uint8_t * data, uint8_t dataLength, bool status)
+void BusAccessUnit::groupValueWriteLocalConfirm(AckType ack, uint16_t asap, Priority priority, HopCountType hopType, uint8_t* data, uint8_t dataLength, bool status)
{
}
-void BusAccessUnit::groupValueWriteIndication(uint16_t asap, Priority priority, HopCountType hopType, uint8_t * data, uint8_t dataLength)
+void BusAccessUnit::groupValueWriteIndication(uint16_t asap, Priority priority, HopCountType hopType, uint8_t* data, uint8_t dataLength)
{
}
@@ -48,7 +48,7 @@ void BusAccessUnit::individualAddressReadAppLayerConfirm(HopCountType hopType, u
{
}
-void BusAccessUnit::individualAddressSerialNumberReadLocalConfirm(AckType ack, HopCountType hopType, uint8_t * serialNumber, bool status)
+void BusAccessUnit::individualAddressSerialNumberReadLocalConfirm(AckType ack, HopCountType hopType, uint8_t* serialNumber, bool status)
{
}
@@ -56,11 +56,11 @@ void BusAccessUnit::individualAddressSerialNumberReadIndication(Priority priorit
{
}
-void BusAccessUnit::individualAddressSerialNumberReadResponseConfirm(AckType ack, HopCountType hopType, uint8_t * serialNumber, uint16_t domainAddress, bool status)
+void BusAccessUnit::individualAddressSerialNumberReadResponseConfirm(AckType ack, HopCountType hopType, uint8_t* serialNumber, uint16_t domainAddress, bool status)
{
}
-void BusAccessUnit::individualAddressSerialNumberReadAppLayerConfirm(HopCountType hopType, uint8_t * serialNumber, uint16_t individualAddress, uint16_t domainAddress)
+void BusAccessUnit::individualAddressSerialNumberReadAppLayerConfirm(HopCountType hopType, uint8_t* serialNumber, uint16_t individualAddress, uint16_t domainAddress)
{
}
@@ -81,12 +81,12 @@ void BusAccessUnit::deviceDescriptorReadIndication(Priority priority, HopCountTy
{
}
-void BusAccessUnit::deviceDescriptorReadResponseConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t descriptor_type,
- uint8_t * device_descriptor, bool status)
+void BusAccessUnit::deviceDescriptorReadResponseConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t descriptor_type,
+ uint8_t* device_descriptor, bool status)
{
}
-void BusAccessUnit::deviceDescriptorReadAppLayerConfirm(Priority priority, HopCountType hopType, uint16_t asap, uint8_t descriptortype, uint8_t * deviceDescriptor)
+void BusAccessUnit::deviceDescriptorReadAppLayerConfirm(Priority priority, HopCountType hopType, uint16_t asap, uint8_t descriptortype, uint8_t* deviceDescriptor)
{
}
@@ -106,19 +106,19 @@ void BusAccessUnit::propertyValueReadIndication(Priority priority, HopCountType
{
}
-void BusAccessUnit::propertyValueReadResponseConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t objectIndex, uint8_t propertyId, uint8_t numberOfElements, uint16_t startIndex, uint8_t * data, uint8_t length, bool status)
+void BusAccessUnit::propertyValueReadResponseConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t objectIndex, uint8_t propertyId, uint8_t numberOfElements, uint16_t startIndex, uint8_t* data, uint8_t length, bool status)
{
}
-void BusAccessUnit::propertyValueReadAppLayerConfirm(Priority priority, HopCountType hopType, uint16_t asap, uint8_t objectIndex, uint8_t propertyId, uint8_t numberOfElements, uint16_t startIndex, uint8_t * data, uint8_t length)
+void BusAccessUnit::propertyValueReadAppLayerConfirm(Priority priority, HopCountType hopType, uint16_t asap, uint8_t objectIndex, uint8_t propertyId, uint8_t numberOfElements, uint16_t startIndex, uint8_t* data, uint8_t length)
{
}
-void BusAccessUnit::propertyValueWriteLocalConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t objectIndex, uint8_t propertyId, uint8_t numberOfElements, uint16_t startIndex, uint8_t * data, uint8_t length, bool status)
+void BusAccessUnit::propertyValueWriteLocalConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t objectIndex, uint8_t propertyId, uint8_t numberOfElements, uint16_t startIndex, uint8_t* data, uint8_t length, bool status)
{
}
-void BusAccessUnit::propertyValueWriteIndication(Priority priority, HopCountType hopType, uint16_t asap, uint8_t objectIndex, uint8_t propertyId, uint8_t numberOfElements, uint16_t startIndex, uint8_t * data, uint8_t length)
+void BusAccessUnit::propertyValueWriteIndication(Priority priority, HopCountType hopType, uint16_t asap, uint8_t objectIndex, uint8_t propertyId, uint8_t numberOfElements, uint16_t startIndex, uint8_t* data, uint8_t length)
{
}
@@ -150,19 +150,19 @@ void BusAccessUnit::memoryReadIndication(Priority priority, HopCountType hopType
{
}
-void BusAccessUnit::memoryReadResponseConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t number, uint16_t memoryAddress, uint8_t * data, bool status)
+void BusAccessUnit::memoryReadResponseConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t number, uint16_t memoryAddress, uint8_t* data, bool status)
{
}
-void BusAccessUnit::memoryReadAppLayerConfirm(Priority priority, HopCountType hopType, uint16_t asap, uint8_t number, uint16_t memoryAddress, uint8_t * data)
+void BusAccessUnit::memoryReadAppLayerConfirm(Priority priority, HopCountType hopType, uint16_t asap, uint8_t number, uint16_t memoryAddress, uint8_t* data)
{
}
-void BusAccessUnit::memoryWriteLocalConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t number, uint16_t memoryAddress, uint8_t * data, bool status)
+void BusAccessUnit::memoryWriteLocalConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t number, uint16_t memoryAddress, uint8_t* data, bool status)
{
}
-void BusAccessUnit::memoryWriteIndication(Priority priority, HopCountType hopType, uint16_t asap, uint8_t number, uint16_t memoryAddress, uint8_t * data)
+void BusAccessUnit::memoryWriteIndication(Priority priority, HopCountType hopType, uint16_t asap, uint8_t number, uint16_t memoryAddress, uint8_t* data)
{
}
@@ -174,19 +174,19 @@ void BusAccessUnit::userMemoryReadIndication(Priority priority, HopCountType hop
{
}
-void BusAccessUnit::userMemoryReadResponseConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t number, uint32_t memoryAddress, uint8_t * memoryData, bool status)
+void BusAccessUnit::userMemoryReadResponseConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t number, uint32_t memoryAddress, uint8_t* memoryData, bool status)
{
}
-void BusAccessUnit::userMemoryReadAppLayerConfirm(Priority priority, HopCountType hopType, uint16_t asap, uint8_t number, uint32_t memoryAddress, uint8_t * memoryData)
+void BusAccessUnit::userMemoryReadAppLayerConfirm(Priority priority, HopCountType hopType, uint16_t asap, uint8_t number, uint32_t memoryAddress, uint8_t* memoryData)
{
}
-void BusAccessUnit::userMemoryWriteLocalConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t number, uint32_t memoryAddress, uint8_t * memoryData, bool status)
+void BusAccessUnit::userMemoryWriteLocalConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t number, uint32_t memoryAddress, uint8_t* memoryData, bool status)
{
}
-void BusAccessUnit::userMemoryWriteIndication(Priority priority, HopCountType hopType, uint16_t asap, uint8_t number, uint32_t memoryAddress, uint8_t * memoryData)
+void BusAccessUnit::userMemoryWriteIndication(Priority priority, HopCountType hopType, uint16_t asap, uint8_t number, uint32_t memoryAddress, uint8_t* memoryData)
{
}
@@ -198,11 +198,11 @@ void BusAccessUnit::userManufacturerInfoIndication(Priority priority, HopCountTy
{
}
-void BusAccessUnit::userManufacturerInfoResponseConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t * info, bool status)
+void BusAccessUnit::userManufacturerInfoResponseConfirm(AckType ack, Priority priority, HopCountType hopType, uint16_t asap, uint8_t* info, bool status)
{
}
-void BusAccessUnit::userManufacturerInfoAppLayerConfirm(Priority priority, HopCountType hopType, uint16_t asap, uint8_t * info)
+void BusAccessUnit::userManufacturerInfoAppLayerConfirm(Priority priority, HopCountType hopType, uint16_t asap, uint8_t* info)
{
}
@@ -243,12 +243,12 @@ void BusAccessUnit::connectConfirm(uint16_t destination)
}
void BusAccessUnit::systemNetworkParameterReadIndication(Priority priority, HopCountType hopType, uint16_t objectType,
- uint16_t propertyId, uint8_t* testInfo, uint16_t testInfoLength)
+ uint16_t propertyId, uint8_t* testInfo, uint16_t testInfoLength)
{
}
void BusAccessUnit::domainAddressSerialNumberWriteIndication(Priority priority, HopCountType hopType, uint8_t* rfDoA,
- uint8_t* knxSerialNumber)
+ uint8_t* knxSerialNumber)
{
}
@@ -257,15 +257,13 @@ void BusAccessUnit::domainAddressSerialNumberReadIndication(Priority priority, H
}
void BusAccessUnit::propertyValueRead(ObjectType objectType, uint8_t objectInstance, uint8_t propertyId,
- uint32_t &numberOfElements, uint16_t startIndex,
- uint8_t **data, uint32_t &length)
+ uint8_t& numberOfElements, uint16_t startIndex,
+ uint8_t** data, uint32_t& length)
{
}
void BusAccessUnit::propertyValueWrite(ObjectType objectType, uint8_t objectInstance, uint8_t propertyId,
- uint32_t &numberOfElements, uint16_t startIndex,
- uint8_t* data, uint32_t length)
+ uint8_t& numberOfElements, uint16_t startIndex,
+ uint8_t* data, uint32_t length)
{
}
-
-
diff --git a/src/knx/bau.h b/src/knx/bau.h
index 8d31879..d3d82a0 100644
--- a/src/knx/bau.h
+++ b/src/knx/bau.h
@@ -120,10 +120,10 @@ class BusAccessUnit
virtual void domainAddressSerialNumberReadIndication(Priority priority, HopCountType hopType, uint8_t* knxSerialNumber);
virtual void propertyValueRead(ObjectType objectType, uint8_t objectInstance, uint8_t propertyId,
- uint32_t &numberOfElements, uint16_t startIndex,
- uint8_t **data, uint32_t &length);
-
+ uint8_t& numberOfElements, uint16_t startIndex,
+ uint8_t** data, uint32_t& length);
+
virtual void propertyValueWrite(ObjectType objectType, uint8_t objectInstance, uint8_t propertyId,
- uint32_t &numberOfElements, uint16_t startIndex,
+ uint8_t& numberOfElements, uint16_t startIndex,
uint8_t* data, uint32_t length);
};
diff --git a/src/knx/bau_systemB.cpp b/src/knx/bau_systemB.cpp
index 3402c27..321529d 100644
--- a/src/knx/bau_systemB.cpp
+++ b/src/knx/bau_systemB.cpp
@@ -207,18 +207,17 @@ void BauSystemB::propertyDescriptionReadIndication(Priority priority, HopCountTy
void BauSystemB::propertyValueWriteIndication(Priority priority, HopCountType hopType, uint16_t asap, uint8_t objectIndex,
uint8_t propertyId, uint8_t numberOfElements, uint16_t startIndex, uint8_t* data, uint8_t length)
{
- uint32_t elementCount = numberOfElements;
InterfaceObject* obj = getInterfaceObject(objectIndex);
if(obj)
- obj->writeProperty((PropertyID)propertyId, startIndex, data, elementCount);
- propertyValueReadIndication(priority, hopType, asap, objectIndex, propertyId, elementCount, startIndex);
+ obj->writeProperty((PropertyID)propertyId, startIndex, data, numberOfElements);
+ propertyValueReadIndication(priority, hopType, asap, objectIndex, propertyId, numberOfElements, startIndex);
}
void BauSystemB::propertyValueReadIndication(Priority priority, HopCountType hopType, uint16_t asap, uint8_t objectIndex,
uint8_t propertyId, uint8_t numberOfElements, uint16_t startIndex)
{
uint8_t size = 0;
- uint32_t elementCount = numberOfElements;
+ uint8_t elementCount = numberOfElements;
InterfaceObject* obj = getInterfaceObject(objectIndex);
if (obj)
{
@@ -389,11 +388,11 @@ void BauSystemB::systemNetworkParameterReadIndication(Priority priority, HopCoun
}
void BauSystemB::propertyValueRead(ObjectType objectType, uint8_t objectInstance, uint8_t propertyId,
- uint32_t &numberOfElements, uint16_t startIndex,
+ uint8_t &numberOfElements, uint16_t startIndex,
uint8_t **data, uint32_t &length)
{
uint32_t size = 0;
- uint32_t elementCount = numberOfElements;
+ uint8_t elementCount = numberOfElements;
InterfaceObject* obj = getInterfaceObject(objectType, objectInstance);
@@ -415,7 +414,7 @@ void BauSystemB::propertyValueRead(ObjectType objectType, uint8_t objectInstance
}
void BauSystemB::propertyValueWrite(ObjectType objectType, uint8_t objectInstance, uint8_t propertyId,
- uint32_t &numberOfElements, uint16_t startIndex,
+ uint8_t &numberOfElements, uint16_t startIndex,
uint8_t* data, uint32_t length)
{
InterfaceObject* obj = getInterfaceObject(objectType, objectInstance);
diff --git a/src/knx/bau_systemB.h b/src/knx/bau_systemB.h
index 986e883..25fe80a 100644
--- a/src/knx/bau_systemB.h
+++ b/src/knx/bau_systemB.h
@@ -29,12 +29,12 @@ class BauSystemB : protected BusAccessUnit
void writeMemory();
void addSaveRestore(SaveRestore* obj);
bool restartRequest(uint16_t asap);
-
+
void propertyValueRead(ObjectType objectType, uint8_t objectInstance, uint8_t propertyId,
- uint32_t &numberOfElements, uint16_t startIndex,
+ uint8_t& numberOfElements, uint16_t startIndex,
uint8_t **data, uint32_t &length) override;
void propertyValueWrite(ObjectType objectType, uint8_t objectInstance, uint8_t propertyId,
- uint32_t &numberOfElements, uint16_t startIndex,
+ uint8_t& numberOfElements, uint16_t startIndex,
uint8_t* data, uint32_t length) override;
protected:
diff --git a/src/knx/cemi_server_object.cpp b/src/knx/cemi_server_object.cpp
index 5652820..430b4a0 100644
--- a/src/knx/cemi_server_object.cpp
+++ b/src/knx/cemi_server_object.cpp
@@ -4,7 +4,7 @@
#include "cemi_server_object.h"
#include "bits.h"
-void CemiServerObject::readProperty(PropertyID propertyId, uint32_t start, uint32_t& count, uint8_t* data)
+void CemiServerObject::readProperty(PropertyID propertyId, uint16_t start, uint8_t& count, uint8_t* data)
{
switch (propertyId)
{
@@ -47,7 +47,7 @@ void CemiServerObject::readProperty(PropertyID propertyId, uint32_t start, uint3
}
}
-void CemiServerObject::writeProperty(PropertyID id, uint32_t start, uint8_t* data, uint32_t& count)
+void CemiServerObject::writeProperty(PropertyID id, uint16_t start, uint8_t* data, uint8_t& count)
{
switch (id)
{
diff --git a/src/knx/cemi_server_object.h b/src/knx/cemi_server_object.h
index 971a740..77e25f8 100644
--- a/src/knx/cemi_server_object.h
+++ b/src/knx/cemi_server_object.h
@@ -5,8 +5,8 @@
class CemiServerObject: public InterfaceObject
{
public:
- void readProperty(PropertyID id, uint32_t start, uint32_t& count, uint8_t* data) override;
- void writeProperty(PropertyID id, uint32_t start, uint8_t* data, uint32_t& count) override;
+ void readProperty(PropertyID id, uint16_t start, uint8_t& count, uint8_t* data) override;
+ void writeProperty(PropertyID id, uint16_t start, uint8_t* data, uint8_t& count) override;
uint8_t propertySize(PropertyID id) override;
uint8_t* save(uint8_t* buffer);
uint8_t* restore(uint8_t* buffer);
diff --git a/src/knx/device_object.cpp b/src/knx/device_object.cpp
index 2186043..6912863 100644
--- a/src/knx/device_object.cpp
+++ b/src/knx/device_object.cpp
@@ -2,7 +2,7 @@
#include "device_object.h"
#include "bits.h"
-void DeviceObject::readProperty(PropertyID propertyId, uint32_t start, uint32_t& count, uint8_t* data)
+void DeviceObject::readProperty(PropertyID propertyId, uint16_t start, uint8_t& count, uint8_t* data)
{
switch (propertyId)
{
@@ -59,7 +59,7 @@ void DeviceObject::readProperty(PropertyID propertyId, uint32_t start, uint32_t&
}
}
-void DeviceObject::writeProperty(PropertyID id, uint32_t start, uint8_t* data, uint32_t& count)
+void DeviceObject::writeProperty(PropertyID id, uint16_t start, uint8_t* data, uint8_t& count)
{
switch (id)
{
diff --git a/src/knx/device_object.h b/src/knx/device_object.h
index a814772..23d1252 100644
--- a/src/knx/device_object.h
+++ b/src/knx/device_object.h
@@ -7,8 +7,8 @@
class DeviceObject: public InterfaceObject
{
public:
- void readProperty(PropertyID id, uint32_t start, uint32_t& count, uint8_t* data);
- void writeProperty(PropertyID id, uint32_t start, uint8_t* data, uint32_t& count);
+ void readProperty(PropertyID id, uint16_t start, uint8_t& count, uint8_t* data);
+ void writeProperty(PropertyID id, uint16_t start, uint8_t* data, uint8_t& count);
uint8_t propertySize(PropertyID id);
uint8_t* save(uint8_t* buffer);
uint8_t* restore(uint8_t* buffer);
diff --git a/src/knx/group_object_table_object.cpp b/src/knx/group_object_table_object.cpp
index 0ab929a..45e367b 100644
--- a/src/knx/group_object_table_object.cpp
+++ b/src/knx/group_object_table_object.cpp
@@ -14,7 +14,7 @@ GroupObjectTableObject::~GroupObjectTableObject()
freeGroupObjects();
}
-void GroupObjectTableObject::readProperty(PropertyID id, uint32_t start, uint32_t& count, uint8_t* data)
+void GroupObjectTableObject::readProperty(PropertyID id, uint16_t start, uint8_t& count, uint8_t* data)
{
switch (id)
{
diff --git a/src/knx/group_object_table_object.h b/src/knx/group_object_table_object.h
index 1bdc8e0..0127727 100644
--- a/src/knx/group_object_table_object.h
+++ b/src/knx/group_object_table_object.h
@@ -10,7 +10,7 @@ class GroupObjectTableObject : public TableObject
public:
GroupObjectTableObject(Memory& memory);
virtual ~GroupObjectTableObject();
- void readProperty(PropertyID id, uint32_t start, uint32_t& count, uint8_t* data);
+ void readProperty(PropertyID id, uint16_t start, uint8_t& count, uint8_t* data);
ObjectType objectType() { return OT_GRP_OBJ_TABLE; }
uint16_t entryCount();
GroupObject& get(uint16_t asap);
diff --git a/src/knx/interface_object.cpp b/src/knx/interface_object.cpp
index d51ace4..007d369 100644
--- a/src/knx/interface_object.cpp
+++ b/src/knx/interface_object.cpp
@@ -46,14 +46,14 @@ void InterfaceObject::readPropertyDescription(uint8_t& propertyId, uint8_t& prop
}
}
-void InterfaceObject::readProperty(PropertyID id, uint32_t start, uint32_t &count, uint8_t *data)
+void InterfaceObject::readProperty(PropertyID id, uint16_t start, uint8_t& count, uint8_t* data)
{
// Set number of elements to zero as we are in the end of the call chain
// Nobody processed the property before.
count = 0;
}
-void InterfaceObject::writeProperty(PropertyID id, uint32_t start, uint8_t *data, uint32_t &count)
+void InterfaceObject::writeProperty(PropertyID id, uint16_t start, uint8_t* data, uint8_t& count)
{
// Set number of elements to zero as we are in the end of the call chain
// Nobody processed the property before.
diff --git a/src/knx/interface_object.h b/src/knx/interface_object.h
index cc70121..3c3832d 100644
--- a/src/knx/interface_object.h
+++ b/src/knx/interface_object.h
@@ -1,7 +1,7 @@
#pragma once
#include
-#include "property_types.h"
+#include "property.h"
#include "save_restore.h"
/** Enum for the type of an interface object. See Section 2.2 of knx:3/7/3 */
@@ -75,7 +75,7 @@ class InterfaceObject : public SaveRestore
*
* @param[out] data The requested data of the property.
*/
- virtual void readProperty(PropertyID id, uint32_t start, uint32_t& count, uint8_t* data);
+ virtual void readProperty(PropertyID id, uint16_t start, uint8_t& count, uint8_t* data);
/**
* Write property of the interface object. If the interface object does not have the property this
* method does nothing. See section 4.8.4.4 of @cite knx:3/4/1.
@@ -89,7 +89,7 @@ class InterfaceObject : public SaveRestore
*
* @param[in] data The data that should be written.
*/
- virtual void writeProperty(PropertyID id, uint32_t start, uint8_t *data, uint32_t &count);
+ virtual void writeProperty(PropertyID id, uint16_t start, uint8_t* data, uint8_t& count);
/**
* Gets the size of of property in bytes.
*
diff --git a/src/knx/ip_parameter_object.cpp b/src/knx/ip_parameter_object.cpp
index 6aaf343..b060e64 100644
--- a/src/knx/ip_parameter_object.cpp
+++ b/src/knx/ip_parameter_object.cpp
@@ -10,7 +10,7 @@ IpParameterObject::IpParameterObject(DeviceObject& deviceObject, Platform& platf
_platform(platform)
{}
-void IpParameterObject::readProperty(PropertyID propertyId, uint32_t start, uint32_t& count, uint8_t* data)
+void IpParameterObject::readProperty(PropertyID propertyId, uint16_t start, uint8_t& count, uint8_t* data)
{
switch (propertyId)
{
@@ -79,7 +79,7 @@ void IpParameterObject::readProperty(PropertyID propertyId, uint32_t start, uint
}
}
-void IpParameterObject::writeProperty(PropertyID id, uint32_t start, uint8_t* data, uint32_t& count)
+void IpParameterObject::writeProperty(PropertyID id, uint16_t start, uint8_t* data, uint8_t& count)
{
switch (id)
{
diff --git a/src/knx/ip_parameter_object.h b/src/knx/ip_parameter_object.h
index 3eaaa91..835743e 100644
--- a/src/knx/ip_parameter_object.h
+++ b/src/knx/ip_parameter_object.h
@@ -8,8 +8,8 @@ class IpParameterObject : public InterfaceObject
{
public:
IpParameterObject(DeviceObject& deviceObject, Platform& platform);
- void readProperty(PropertyID id, uint32_t start, uint32_t& count, uint8_t* data);
- void writeProperty(PropertyID id, uint32_t start, uint8_t* data, uint32_t& count);
+ void readProperty(PropertyID id, uint16_t start, uint8_t& count, uint8_t* data);
+ void writeProperty(PropertyID id, uint16_t start, uint8_t* data, uint8_t& count);
uint8_t propertySize(PropertyID id);
ObjectType objectType() { return OT_IP_PARAMETER; }
diff --git a/src/knx/property_types.h b/src/knx/property.h
similarity index 95%
rename from src/knx/property_types.h
rename to src/knx/property.h
index 5df562f..402ae66 100644
--- a/src/knx/property_types.h
+++ b/src/knx/property.h
@@ -215,12 +215,24 @@ enum AccessLevel
WriteLv3 = 0x03,
};
-class PropertyDescription
+struct PropertyDescription
{
-public:
PropertyID Id;
bool WriteEnable;
PropertyDataType Type;
uint16_t MaxElements;
uint8_t Access;
+};
+
+class Property
+{
+ public:
+ PropertyID Id();
+ bool WriteEnable();
+ PropertyDataType Type();
+ uint16_t MaxElements();
+ uint8_t Access();
+ uint16_t CurrentElements();
+ uint8_t ElementSize();
+ void read(uint32_t start, uint32_t& count, uint8_t* data);
};
\ No newline at end of file
diff --git a/src/knx/rf_medium_object.cpp b/src/knx/rf_medium_object.cpp
index 3ace460..c48d00c 100644
--- a/src/knx/rf_medium_object.cpp
+++ b/src/knx/rf_medium_object.cpp
@@ -2,7 +2,7 @@
#include "rf_medium_object.h"
#include "bits.h"
-void RfMediumObject::readProperty(PropertyID propertyId, uint32_t start, uint32_t& count, uint8_t* data)
+void RfMediumObject::readProperty(PropertyID propertyId, uint16_t start, uint8_t& count, uint8_t* data)
{
switch (propertyId)
{
@@ -37,7 +37,7 @@ void RfMediumObject::readProperty(PropertyID propertyId, uint32_t start, uint32_
}
}
-void RfMediumObject::writeProperty(PropertyID id, uint32_t start, uint8_t* data, uint32_t& count)
+void RfMediumObject::writeProperty(PropertyID id, uint16_t start, uint8_t* data, uint8_t& count)
{
switch (id)
{
diff --git a/src/knx/rf_medium_object.h b/src/knx/rf_medium_object.h
index d681931..919e474 100644
--- a/src/knx/rf_medium_object.h
+++ b/src/knx/rf_medium_object.h
@@ -5,8 +5,8 @@
class RfMediumObject: public InterfaceObject
{
public:
- void readProperty(PropertyID id, uint32_t start, uint32_t& count, uint8_t* data);
- void writeProperty(PropertyID id, uint32_t start, uint8_t* data, uint32_t& count);
+ void readProperty(PropertyID id, uint16_t start, uint8_t& count, uint8_t* data);
+ void writeProperty(PropertyID id, uint16_t start, uint8_t* data, uint8_t& count);
uint8_t propertySize(PropertyID id);
uint8_t* save(uint8_t* buffer);
uint8_t* restore(uint8_t* buffer);
diff --git a/src/knx/table_object.cpp b/src/knx/table_object.cpp
index 7709f9f..522da6f 100644
--- a/src/knx/table_object.cpp
+++ b/src/knx/table_object.cpp
@@ -9,7 +9,7 @@ TableObject::TableObject(Memory& memory): _memory(memory)
}
-void TableObject::readProperty(PropertyID id, uint32_t start, uint32_t& count, uint8_t* data)
+void TableObject::readProperty(PropertyID id, uint16_t start, uint8_t& count, uint8_t* data)
{
switch (id)
{
@@ -30,7 +30,7 @@ void TableObject::readProperty(PropertyID id, uint32_t start, uint32_t& count, u
}
}
-void TableObject::writeProperty(PropertyID id, uint32_t start, uint8_t* data, uint32_t &count)
+void TableObject::writeProperty(PropertyID id, uint16_t start, uint8_t* data, uint8_t& count)
{
switch (id)
{
diff --git a/src/knx/table_object.h b/src/knx/table_object.h
index 3d99bec..08415bd 100644
--- a/src/knx/table_object.h
+++ b/src/knx/table_object.h
@@ -16,8 +16,8 @@ class TableObject: public InterfaceObject
* @param memory The instance of the memory management class to use.
*/
TableObject(Memory& memory);
- virtual void readProperty(PropertyID id, uint32_t start, uint32_t& count, uint8_t* data);
- virtual void writeProperty(PropertyID id, uint32_t start, uint8_t* data, uint32_t& count);
+ virtual void readProperty(PropertyID id, uint16_t start, uint8_t& count, uint8_t* data);
+ virtual void writeProperty(PropertyID id, uint16_t start, uint8_t* data, uint8_t& count);
virtual uint8_t propertySize(PropertyID id);
/**
* The destructor.