Class AddressTableObject¶
Defined in File address_table_object.h
Inheritance Relationships¶
Base Type¶
public TableObject
(Class TableObject)
Class Documentation¶
-
class AddressTableObject : public TableObject¶
This class represents the group address table.
It provides a mapping between transport layer service access points (TSAP) and group addresses. The TSAP can be imagined as an index to the array of group addresses.
See section 4.10 of [4] for further details. It implements realisation type 7 (see section 4.10.7 of [4]).
Public Functions
-
AddressTableObject(Memory &memory)¶
The constructor.
- Parameters
memory – This parameter is only passed to the constructor of TableObject and is not used by this class.
-
virtual const uint8_t *restore(const uint8_t *buffer) override¶
This method is called when the object should restore its state from the buffer.
- Parameters
buffer – The 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.
-
uint16_t entryCount()¶
returns the number of group addresses of the object.
-
uint16_t getGroupAddress(uint16_t tsap)¶
Get the group address mapped to a TSAP.
- Parameters
tsap – The TSAP of which to get the group address for.
- Returns
the groupAddress if found or zero if no group address was found.
-
uint16_t getTsap(uint16_t groupAddress)¶
Get the TSAP mapped to a group address.
- Parameters
groupAddress – the group address of which to get the TSAP for.
- Returns
the TSAP if found or zero if no tsap was found.
-
bool contains(uint16_t groupAddress)¶
Check if the address table contains a group address.
- Parameters
groupAddress – the group address to check
- Returns
true if the address table contains the group address, false otherwise
Protected Functions
-
virtual void beforeStateChange(LoadState &newState) override¶
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.
-
AddressTableObject(Memory &memory)¶