knx
ETS configurable knx-stack
GroupObject Class Reference

This class represents a single group object. More...

#include <group_object.h>

Public Member Functions

 GroupObject ()
 The constructor. More...
 
 GroupObject (const GroupObject &other)
 The copy constructor. More...
 
virtual ~GroupObject ()
 The destructor. More...
 
bool responseUpdateEnable ()
 Check if the update flag (U) was set. More...
 
bool transmitEnable ()
 Check if the transmit flag (T) was set. More...
 
bool valueReadOnInit ()
 Check if the initialisation flag (I) was set. More...
 
bool writeEnable ()
 Check if the write flag (W) was set. More...
 
bool readEnable ()
 Check if the read flag (R) was set. More...
 
bool communicationEnable ()
 Check if the communication flag (C) was set. More...
 
Priority priority ()
 Get the priority of the group object. More...
 
ComFlag commFlag ()
 Return the current state of the group object. More...
 
void commFlag (ComFlag value)
 Set the current state of the group object. More...
 
void requestObjectRead ()
 Request the read of a communication object. More...
 
void objectWritten ()
 Mark a communication object as written. More...
 
size_t valueSize ()
 returns the size of the group object in Byte. More...
 
size_t sizeInTelegram ()
 returns the size of the group object in Byte as it is in a telegram. More...
 
uint8_t * valueRef ()
 returns the pointer to the value of the group object. More...
 
uint16_t asap ()
 returns the Application Service Access Point of the group object. More...
 
void callback (GroupObjectUpdatedHandler handler)
 register a callback for this group object. More...
 
GroupObjectUpdatedHandler callback ()
 returns the registered callback More...
 
KNXValue value (const Dpt &type)
 return the current value of the group object. More...
 
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. More...
 
void valueNoSend (const KNXValue &value, const Dpt &type)
 set the current value of the group object. More...
 
bool tryValue (KNXValue &value, const Dpt &type)
 set the current value of the group object. More...
 
KNXValue value ()
 return the current value of the group object. More...
 
void value (const KNXValue &value)
 set the current value of the group object and changes the state of the group object to WriteRequest. More...
 
void valueNoSend (const KNXValue &value)
 set the current value of the group object. More...
 
bool tryValue (KNXValue &value)
 set the current value of the group object. More...
 
Dpt dataPointType ()
 returns the currently configured datapoint type. More...
 
void dataPointType (Dpt value)
 sets the datapoint type of the group object. More...
 

Friends

class GroupObjectTableObject
 

Detailed Description

This class represents a single group object.

In german they are called "Kommunikationsobjekt" or "KO".

Definition at line 41 of file group_object.h.

Constructor & Destructor Documentation

◆ GroupObject() [1/2]

GroupObject::GroupObject ( )

The constructor.

Definition at line 12 of file group_object.cpp.

◆ GroupObject() [2/2]

GroupObject::GroupObject ( const GroupObject other)

The copy constructor.

Definition at line 22 of file group_object.cpp.

◆ ~GroupObject()

GroupObject::~GroupObject ( )
virtual

The destructor.

Definition at line 34 of file group_object.cpp.

Member Function Documentation

◆ asap()

uint16_t GroupObject::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")

Definition at line 106 of file group_object.cpp.

◆ callback() [1/2]

GroupObjectUpdatedHandler GroupObject::callback ( )

returns the registered callback

Definition at line 213 of file group_object.cpp.

◆ callback() [2/2]

void GroupObject::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.

Definition at line 207 of file group_object.cpp.

Here is the caller graph for this function:

◆ commFlag() [1/2]

ComFlag GroupObject::commFlag ( )

Return the current state of the group object.

See ComFlag

Definition at line 158 of file group_object.cpp.

Here is the caller graph for this function:

◆ commFlag() [2/2]

void GroupObject::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.

Definition at line 163 of file group_object.cpp.

Here is the call graph for this function:

◆ communicationEnable()

bool GroupObject::communicationEnable ( )

Check if the communication flag (C) was set.

(K-flag in german)

Definition at line 84 of file group_object.cpp.

Here is the caller graph for this function:

◆ dataPointType() [1/2]

Dpt GroupObject::dataPointType ( )

returns the currently configured datapoint type.

Definition at line 245 of file group_object.cpp.

◆ dataPointType() [2/2]

void GroupObject::dataPointType ( Dpt  value)

sets the datapoint type of the group object.

Definition at line 239 of file group_object.cpp.

Here is the call graph for this function:

◆ objectWritten()

void GroupObject::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

Definition at line 173 of file group_object.cpp.

Here is the caller graph for this function:

◆ priority()

Priority GroupObject::priority ( )

Get the priority of the group object.

Definition at line 93 of file group_object.cpp.

Here is the caller graph for this function:

◆ readEnable()

bool GroupObject::readEnable ( )

Check if the read flag (R) was set.

(L-flag in german)

Definition at line 72 of file group_object.cpp.

Here is the caller graph for this function:

◆ requestObjectRead()

void GroupObject::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

Definition at line 168 of file group_object.cpp.

◆ responseUpdateEnable()

bool GroupObject::responseUpdateEnable ( )

Check if the update flag (U) was set.

(A-flag in german)

Definition at line 40 of file group_object.cpp.

Here is the caller graph for this function:

◆ sizeInTelegram()

size_t GroupObject::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.

Definition at line 183 of file group_object.cpp.

Here is the caller graph for this function:

◆ transmitEnable()

bool GroupObject::transmitEnable ( )

Check if the transmit flag (T) was set.

(UE-flag in german)

Definition at line 48 of file group_object.cpp.

Here is the caller graph for this function:

◆ tryValue() [1/2]

bool GroupObject::tryValue ( KNXValue value)

set the current value of the group object.

Parameters
valuethe value the group object is set to

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

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

Definition at line 251 of file group_object.cpp.

Here is the call graph for this function:

◆ tryValue() [2/2]

bool GroupObject::tryValue ( KNXValue value,
const Dpt type 
)

set the current value of the group object.

Parameters
valuethe value the group object is set to
typethe datapoint type used for the conversion.

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

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

Definition at line 233 of file group_object.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ value() [1/4]

KNXValue GroupObject::value ( )

return the current value of the group object.

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

Definition at line 263 of file group_object.cpp.

Here is the caller graph for this function:

◆ value() [2/4]

KNXValue GroupObject::value ( const Dpt type)

return the current value of the group object.

Parameters
typethe datapoint type used for the conversion. If this doesn't fit to the group object the returned value is invalid.

Definition at line 226 of file group_object.cpp.

Here is the call graph for this function:

◆ value() [3/4]

void GroupObject::value ( const KNXValue value)

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

Parameters
valuethe value the group object is set to

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

Definition at line 257 of file group_object.cpp.

Here is the call graph for this function:

◆ value() [4/4]

void GroupObject::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.

Parameters
valuethe value the group object is set to
typethe datapoint type used for the conversion.

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

Definition at line 219 of file group_object.cpp.

Here is the call graph for this function:

◆ valueNoSend() [1/2]

void GroupObject::valueNoSend ( const KNXValue value)

set the current value of the group object.

Parameters
valuethe value the group object is set to

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

Definition at line 269 of file group_object.cpp.

Here is the call graph for this function:

◆ valueNoSend() [2/2]

void GroupObject::valueNoSend ( const KNXValue value,
const Dpt type 
)

set the current value of the group object.

Parameters
valuethe value the group object is set to
typethe datapoint type used for the conversion.

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

Definition at line 275 of file group_object.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ valueReadOnInit()

bool GroupObject::valueReadOnInit ( )

Check if the initialisation flag (I) was set.

Definition at line 56 of file group_object.cpp.

◆ valueRef()

uint8_t * GroupObject::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.

Definition at line 101 of file group_object.cpp.

Here is the caller graph for this function:

◆ valueSize()

size_t GroupObject::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.

Definition at line 178 of file group_object.cpp.

Here is the caller graph for this function:

◆ writeEnable()

bool GroupObject::writeEnable ( )

Check if the write flag (W) was set.

(S-flag in german)

Definition at line 64 of file group_object.cpp.

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ GroupObjectTableObject

friend class GroupObjectTableObject
friend

Definition at line 43 of file group_object.h.


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