27 for (uint8_t i = 0; i < count; i++)
31 if (p->
Id() != propertyId)
43 if (propertyIndex < count)
51 propertyId = prop->
Id();
77 length = ntohs(propval);
90 count = prop->
read(start, count, data);
103 count = prop->
write(start, count, data);
128 prop->
command(data, length, resultData, resultLength);
141 prop->
state(data, length, resultData, resultLength);
171 buffer = prop->
save(buffer);
187 buffer = prop->
restore(buffer);
231 return prop->
data(elementIndex);
uint8_t * save(uint8_t *buffer) override
This method is called when the object should save its state to the buffer.
const uint8_t * propertyData(PropertyID id)
const uint8_t * restore(const uint8_t *buffer) override
This method is called when the object should restore its state from the buffer.
void readPropertyDescription(uint8_t &propertyId, uint8_t &propertyIndex, bool &writeEnable, uint8_t &type, uint16_t &numberOfElements, uint8_t &access)
Read the Description of a property of the interface object.
virtual void masterReset(EraseCode eraseCode, uint8_t channel)
virtual void command(PropertyID id, uint8_t *data, uint8_t length, uint8_t *resultData, uint8_t &resultLength)
Call command of a function property of the interface object.
virtual ~InterfaceObject()
Destructor.
virtual void writeProperty(PropertyID id, uint16_t start, uint8_t *data, uint8_t &count)
Write property of the interface object.
virtual uint8_t propertySize(PropertyID id)
Gets the size of of property in bytes.
virtual void readProperty(PropertyID id, uint16_t start, uint8_t &count, uint8_t *data)
Read a property of the interface object.
virtual void state(PropertyID id, uint8_t *data, uint8_t length, uint8_t *resultData, uint8_t &resultLength)
Get state of a function property of the interface object.
virtual void readPropertyLength(PropertyID id, uint16_t &length)
Read length of a property of the interface object.
virtual void initializeProperties(size_t propertiesSize, Property **properties)
Intializes the Property-array the the supplied values.
uint16_t saveSize() override
Property * property(PropertyID id)
Gets property with PropertyID id if it exists and nullptr otherwise.
virtual uint8_t read(uint16_t start, uint8_t count, uint8_t *data) const =0
uint8_t ElementSize() const
virtual void state(uint8_t *data, uint8_t length, uint8_t *resultData, uint8_t &resultLength)
virtual uint8_t write(uint16_t start, uint8_t count, const uint8_t *data)=0
uint16_t MaxElements() const
virtual void command(uint8_t *data, uint8_t length, uint8_t *resultData, uint8_t &resultLength)
PropertyDataType Type() const
virtual uint8_t * save(uint8_t *buffer)
This method is called when the object should save its state to the buffer.
virtual const uint8_t * restore(const uint8_t *buffer)
This method is called when the object should restore its state from the buffer.
virtual uint16_t saveSize()