knx
ETS configurable knx-stack
ApplicationProgramObject Class Reference

#include <application_program_object.h>

Inheritance diagram for ApplicationProgramObject:
[legend]
Collaboration diagram for ApplicationProgramObject:
[legend]

Public Member Functions

 ApplicationProgramObject (Memory &memory)
 
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
 
uint8_t * data (uint32_t addr)
 
uint8_t getByte (uint32_t addr)
 
uint16_t getWord (uint32_t addr)
 
uint32_t getInt (uint32_t addr)
 
double getFloat (uint32_t addr, ParameterFloatEncodings encoding)
 
- Public Member Functions inherited from TableObject
 TableObject (Memory &memory, uint32_t staticTableAdr=0, uint32_t staticTableSize=0)
 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 readPropertyLength (PropertyID id, uint16_t &length)
 Read length of a property of the interface object. 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)
 
Propertyproperty (PropertyID id)
 Gets property with PropertyID id if it exists and nullptr otherwise. More...
 
template<typename 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 Propertyproperty (PropertyID id) const
 Gets const property with PropertyID id if it exists and nullptr otherwise. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from TableObject
static void beforeTablesUnloadCallback (BeforeTablesUnloadCallback func)
 
static BeforeTablesUnloadCallback beforeTablesUnloadCallback ()
 
- Protected Member Functions inherited from TableObject
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...
 
- Protected Attributes inherited from TableObject
Memory_memory
 
- Protected Attributes inherited from InterfaceObject
Property ** _properties = nullptr
 
uint8_t _propertyCount = 0
 
- Static Protected Attributes inherited from TableObject
static BeforeTablesUnloadCallback _beforeTablesUnload = 0
 

Detailed Description

Definition at line 6 of file application_program_object.h.

Constructor & Destructor Documentation

◆ ApplicationProgramObject()

ApplicationProgramObject::ApplicationProgramObject ( Memory memory)

Definition at line 8 of file application_program_object.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ data()

uint8_t * ApplicationProgramObject::data ( uint32_t  addr)

Definition at line 59 of file application_program_object.cpp.

Here is the call graph for this function:

◆ getByte()

uint8_t ApplicationProgramObject::getByte ( uint32_t  addr)

Definition at line 64 of file application_program_object.cpp.

Here is the call graph for this function:

◆ getFloat()

double ApplicationProgramObject::getFloat ( uint32_t  addr,
ParameterFloatEncodings  encoding 
)

Definition at line 79 of file application_program_object.cpp.

Here is the call graph for this function:

◆ getInt()

uint32_t ApplicationProgramObject::getInt ( uint32_t  addr)

Definition at line 74 of file application_program_object.cpp.

Here is the call graph for this function:

◆ getWord()

uint16_t ApplicationProgramObject::getWord ( uint32_t  addr)

Definition at line 69 of file application_program_object.cpp.

Here is the call graph for this function:

◆ restore()

const uint8_t * ApplicationProgramObject::restore ( const uint8_t *  buffer)
overridevirtual

This method is called when the object should restore its state from the buffer.

Parameters
bufferThe buffer the object should restore its state from.
Returns
The buffer plus the size of the object state. The next object will use this value as the start of its buffer.

Reimplemented from SaveRestore.

Definition at line 45 of file application_program_object.cpp.

Here is the call graph for this function:

◆ save()

uint8_t* ApplicationProgramObject::save ( uint8_t *  buffer)
overridevirtual

This method is called when the object should save its state to the buffer.

Parameters
bufferThe buffer the object should save its state to.
Returns
The buffer plus the size of the object state. The next object will use this value as the start of its buffer.

Reimplemented from SaveRestore.

◆ saveSize()

uint16_t ApplicationProgramObject::saveSize ( )
overridevirtual
Returns
The maximum number of bytes the object needs to save its state.

Reimplemented from SaveRestore.

Definition at line 54 of file application_program_object.cpp.

Here is the call graph for this function:

The documentation for this class was generated from the following files: