knx
ETS configurable knx-stack
|
This class provides common functionality for interface objects that are configured by ETS with MemorWrite. More...
#include <table_object.h>
Public Member Functions | |
TableObject (Memory &memory) | |
The constuctor. More... | |
virtual | ~TableObject () |
The destructor. More... | |
LoadState | loadState () |
This method returns the LoadState of the interface object. More... | |
uint8_t * | save (uint8_t *buffer) override |
This method is called when the object should save its state to the buffer. More... | |
const uint8_t * | restore (const uint8_t *buffer) override |
This method is called when the object should restore its state from the buffer. More... | |
uint16_t | saveSize () override |
Public Member Functions inherited from InterfaceObject | |
virtual | ~InterfaceObject () |
Destructor. More... | |
virtual void | readProperty (PropertyID id, uint16_t start, uint8_t &count, uint8_t *data) |
Read a property of the interface object. More... | |
virtual void | writeProperty (PropertyID id, uint16_t start, uint8_t *data, uint8_t &count) |
Write property of the interface object. More... | |
virtual uint8_t | propertySize (PropertyID id) |
Gets the size of of property in bytes. More... | |
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. More... | |
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. More... | |
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. More... | |
virtual void | masterReset (EraseCode eraseCode, uint8_t channel) |
Property * | property (PropertyID id) |
Gets property with PropertyID id if it exists and nullptr otherwise. More... | |
template<typename T > | |
T | propertyValue (PropertyID id) |
template<typename T > | |
void | propertyValue (PropertyID id, T value) |
const uint8_t * | propertyData (PropertyID id) |
const uint8_t * | propertyData (PropertyID id, uint16_t elementIndex) |
const Property * | property (PropertyID id) const |
Gets const property with PropertyID id if it exists and nullptr otherwise. More... | |
Static Public Member Functions | |
static void | beforeTablesUnloadCallback (BeforeTablesUnloadCallback func) |
static BeforeTablesUnloadCallback | beforeTablesUnloadCallback () |
Protected Member Functions | |
virtual void | beforeStateChange (LoadState &newState) |
This method is called before the interface object enters a new LoadState. More... | |
uint8_t * | data () |
returns the internal data of the interface object. More... | |
void | errorCode (ErrorCode errorCode) |
Set the reason for a state change failure. More... | |
void | initializeProperties (size_t propertiesSize, Property **properties) override |
Intializes the Property-array the the supplied values. More... | |
Static Protected Attributes | |
static BeforeTablesUnloadCallback | _beforeTablesUnload = 0 |
Friends | |
class | Memory |
Additional Inherited Members | |
Protected Attributes inherited from InterfaceObject | |
Property ** | _properties = nullptr |
uint8_t | _propertyCount = 0 |
This class provides common functionality for interface objects that are configured by ETS with MemorWrite.
Definition at line 12 of file table_object.h.
TableObject::TableObject | ( | Memory & | memory | ) |
The constuctor.
memory | The instance of the memory management class to use. |
Definition at line 22 of file table_object.cpp.
|
virtual |
The destructor.
Definition at line 26 of file table_object.cpp.
|
protectedvirtual |
This method is called before the interface object enters a new LoadState.
If there is a error changing the state newState should be set to LS_ERROR and errorCode() to a reason for the failure.
Reimplemented in RouterObject, GroupObjectTableObject, AssociationTableObject, and AddressTableObject.
Definition at line 29 of file table_object.cpp.
|
static |
Definition at line 17 of file table_object.cpp.
|
static |
Definition at line 12 of file table_object.cpp.
|
protected |
returns the internal data of the interface object.
This pointer belongs to the TableObject class and must not be freed.
Definition at line 255 of file table_object.cpp.
|
protected |
Set the reason for a state change failure.
Definition at line 260 of file table_object.cpp.
|
overrideprotectedvirtual |
Intializes the Property-array the the supplied values.
Reimplemented from InterfaceObject.
Definition at line 272 of file table_object.cpp.
LoadState TableObject::loadState | ( | ) |
This method returns the LoadState of the interface object.
Definition at line 42 of file table_object.cpp.
|
overridevirtual |
This method is called when the object should restore its state from the buffer.
buffer | The buffer the object should restore its state from. |
Reimplemented from InterfaceObject.
Definition at line 71 of file table_object.cpp.
|
overridevirtual |
This method is called when the object should save its state to the buffer.
buffer | The buffer the object should save its state to. |
Reimplemented from InterfaceObject.
Definition at line 56 of file table_object.cpp.
|
overridevirtual |
Reimplemented from InterfaceObject.
Definition at line 267 of file table_object.cpp.
|
friend |
Definition at line 14 of file table_object.h.
|
staticprotected |
Definition at line 58 of file table_object.h.