Class GroupObject

Class Documentation

class GroupObject

This class represents a single group object.

In german they are called “Kommunikationsobjekt” or “KO”.

Public Functions

GroupObject()

The constructor.

GroupObject(const GroupObject &other)

The copy constructor.

virtual ~GroupObject()

The destructor.

bool responseUpdateEnable()

Check if the update flag (U) was set.

(A-flag in german)

bool transmitEnable()

Check if the transmit flag (T) was set.

(UE-flag in german)

bool valueReadOnInit()

Check if the initialisation flag (I) was set.

bool writeEnable()

Check if the write flag (W) was set.

(S-flag in german)

bool readEnable()

Check if the read flag (R) was set.

(L-flag in german)

bool communicationEnable()

Check if the communication flag (C) was set.

(K-flag in german)

Priority priority()

Get the priority of the group object.

ComFlag commFlag()

Return the current state of the group object.

See ComFlag

void commFlag(ComFlag value)

Set the current state of the group object.

Application code should only use this to set the state to Ok after reading a Updated to mark the changed group object as processed. This is optional.

void requestObjectRead()

Request the read of a communication object.

Calling this function triggers the sending of a read-group-value telegram, to read the value of the communication object from the bus.

When the answer is received, the communication object’s value will be updated.

This sets the state of the group objecte to ReadRequest

void objectWritten()

Mark a communication object as written.

Calling this function triggers the sending of a write-group-value telegram.

This sets the state of the group object to WriteRequest

size_t valueSize()

returns the size of the group object in Byte.

For Group objects with size smaller than 1 byte (for example Dpt 1) this method will return 1.

size_t sizeInTelegram()

returns the size of the group object in Byte as it is in a telegram.

For Group objects with size smaller than 1 byte (for example Dpt 1) this method will return 0.

uint8_t *valueRef()

returns the pointer to the value of the group object.

This can be used if a datapoint type is not supported or if you want do your own conversion.

uint16_t asap()

returns the Application Service Access Point of the group object.

In reality this is just the number of the group object. (in german “KO-Nr”)

void callback(GroupObjectUpdatedHandler handler)

register a callback for this group object.

The registered callback will be called if the group object was changed from the bus.

GroupObjectUpdatedHandler callback()

returns the registered callback

KNXValue value(const Dpt &type)

return the current value of the group object.

Parameters

type – the datapoint type used for the conversion. If this doesn’t fit to the group object the returned value is invalid.

void value(const KNXValue &value, const Dpt &type)

set the current value of the group object and changes the state of the group object to WriteRequest.

The parameters must fit the group object. Otherwise it will stay unchanged.

Parameters
  • value – the value the group object is set to

  • type – the datapoint type used for the conversion.

void valueNoSend(const KNXValue &value, const Dpt &type)

set the current value of the group object.

The parameters must fit the group object. Otherwise it will stay unchanged.

Parameters
  • value – the value the group object is set to

  • type – the datapoint type used for the conversion.

bool tryValue(KNXValue &value, const Dpt &type)

set the current value of the group object.

The parameters must fit the group object. Otherwise it will stay unchanged.

Parameters
  • value – the value the group object is set to

  • type – the datapoint type used for the conversion.

Returns

true if the value of the group object was changed successfully.

KNXValue value()

return the current value of the group object.

The datapoint type must be set with dataPointType(). Otherwise the returned value is invalid.

void value(const KNXValue &value)

set the current value of the group object and changes the state of the group object to WriteRequest.

The parameters must fit the group object and dhe datapoint type must be set with dataPointType(). Otherwise it will stay unchanged.

Parameters

value – the value the group object is set to

void valueNoSend(const KNXValue &value)

set the current value of the group object.

The parameters must fit the group object and dhe datapoint type must be set with dataPointType(). Otherwise it will stay unchanged.

Parameters

value – the value the group object is set to

bool tryValue(KNXValue &value)

set the current value of the group object.

The parameters must fit the group object and dhe datapoint type must be set with dataPointType(). Otherwise it will stay unchanged.

Parameters

value – the value the group object is set to

Returns

true if the value of the group object was changed successfully.

Dpt dataPointType()

returns the currently configured datapoint type.

void dataPointType(Dpt value)

sets the datapoint type of the group object.