28 return ntohs(_tableData[0]);
33 return _groupObjects[asap - 1];
40 _tableData = (uint16_t*)
data();
48 static uint16_t startIdx = 1;
52 for (uint16_t asap = startIdx; asap <= objCount; asap++)
74 _groupObjectCount = size;
84 _tableData = (uint16_t*)
data();
86 if (!initGroupObjects())
93 bool GroupObjectTableObject::initGroupObjects()
100 uint16_t goCount = ntohs(_tableData[0]);
103 _groupObjectCount = goCount;
105 for (uint16_t asap = 1; asap <= goCount; asap++)
111 go._dataLength = go.goSize();
112 go._data =
new uint8_t[go._dataLength];
113 memset(go._data, 0, go._dataLength);
122 void GroupObjectTableObject::freeGroupObjects()
125 delete[] _groupObjects;
127 _groupObjectCount = 0;
This class represents a single group object.
ComFlag commFlag()
Return the current state of the group object.
void requestObjectRead()
Request the read of a communication object.
bool valueReadOnInit()
Check if the initialisation flag (I) was set.
void groupObjects(GroupObject *objs, uint16_t size)
void beforeStateChange(LoadState &newState) override
This method is called before the interface object enters a new LoadState.
virtual ~GroupObjectTableObject()
GroupObjectTableObject(Memory &memory)
GroupObject & nextUpdatedObject(bool &valid)
const uint8_t * restore(const uint8_t *buffer) override
This method is called when the object should restore its state from the buffer.
GroupObject & get(uint16_t asap)
This class provides common functionality for interface objects that are configured by ETS with MemorW...
void initializeProperties(size_t propertiesSize, Property **properties) override
Intializes the Property-array the the supplied values.
LoadState loadState()
This method returns the LoadState of the interface object.
uint8_t * data()
returns the internal data of the interface object.
virtual void beforeStateChange(LoadState &newState)
This method is called before the interface object enters a new LoadState.
void errorCode(ErrorCode errorCode)
Set the reason for a state change failure.
const uint8_t * restore(const uint8_t *buffer) override
This method is called when the object should restore its state from the buffer.
@ Ok
read or write request were send successfully
@ Updated
Group object was updated.
@ OT_GRP_OBJ_TABLE
Group Object Table Object.
@ PID_OBJECT_TYPE
Interface Object Type independent Properties.
@ PDT_UNSIGNED_INT
length: 2