![]() |
HAN-FUN API
1.5.3
This project provides the common implementation of ULE Alliance's HAN-FUN application protocol.
|
Parent class for Attribute API implementation. More...
#include <attributes.h>
Public Member Functions | |
uint8_t | uid () const |
Attribute's UID. More... | |
bool | isWritable () const |
Indicate if the attribute is writable. More... | |
uint16_t | interface () const |
Return the UID of the interface the attribute belongs to. More... | |
int | compare (const IAttribute &other) const |
Compare this attribute with the given attribute in other . More... | |
![]() | |
virtual HF::Interface const * | owner () const =0 |
Pointer to the interface that owns this attribute. More... | |
virtual uint16_t | size (bool with_uid) const =0 |
Number bytes needed to serialize the message. More... | |
virtual uint16_t | pack (Common::ByteArray &array, uint16_t offset, bool with_uid) const =0 |
Write the object on to a ByteArray so it can be sent over the network. More... | |
virtual uint16_t | unpack (const Common::ByteArray &array, uint16_t offset, bool with_uid)=0 |
Read a message from a ByteArray. More... | |
virtual float | changed (const IAttribute &other) const =0 |
This method is used to get the percentage of change that the attribute has in relation to the value present in other . More... | |
![]() | |
virtual | ~Serializable () |
Destructor. | |
virtual uint16_t | size () const =0 |
Number bytes needed to serialize the message. More... | |
virtual uint16_t | pack (ByteArray &array, uint16_t offset=0) const =0 |
Write the object on to a ByteArray so it can be sent over the network. More... | |
virtual uint16_t | unpack (const ByteArray &array, uint16_t offset=0)=0 |
Read a message from a ByteArray. More... | |
![]() | |
virtual IAttribute * | clone () const=0 |
Create a clone object of the object where this method is being called. More... | |
Protected Attributes | |
const uint16_t | _itf_uid |
Interface this attribute belongs to. More... | |
const uint8_t | _uid |
Attribute unique identifier. More... | |
const bool | _writable |
Attribute access mode. More... | |
Parent class for Attribute API implementation.
Definition at line 270 of file attributes.h.
|
inlinevirtual |
Compare this attribute with the given attribute in other
.
This method should return < 0 if this attribute is less that, 0 if it is equal and > 0 if greater that the other
attribute.
[in] | other | attribute to compare to. |
<0 | if attribute less than other ; |
0 | if attribute equal to other ; |
>0 | if attribute greater than other . |
Implements HF::Attributes::IAttribute.
Reimplemented in HF::Attributes::Attribute< T, _Owner, EnableIf(IsParent(HF::Interface, _Owner))>, HF::Attributes::Attribute< T, _Owner, typename >, HF::Attributes::Attribute< int8_t >, HF::Attributes::Attribute< uint32_t >, HF::Attributes::Attribute< int16_t >, HF::Attributes::Attribute< HS_Colour >, HF::Attributes::Attribute< XY_Colour >, HF::Attributes::Attribute< uint8_t >, HF::Attributes::Attribute< uint16_t >, and HF::Attributes::Attribute< bool >.
Definition at line 329 of file attributes.h.
References HF::Attributes::IAttribute::interface(), interface(), HF::Attributes::IAttribute::uid(), and uid().
Referenced by HF::Attributes::Attribute< bool >::changed(), HF::Attributes::Attribute< T, _Owner, EnableIf(IsParent(HF::Interface, _Owner))>::changed(), HF::Attributes::Attribute< bool >::compare(), and HF::Attributes::Attribute< T, _Owner, EnableIf(IsParent(HF::Interface, _Owner))>::compare().
|
inlinevirtual |
Return the UID of the interface the attribute belongs to.
Implements HF::Attributes::IAttribute.
Definition at line 294 of file attributes.h.
References _itf_uid.
Referenced by compare().
|
inlinevirtual |
Indicate if the attribute is writable.
true | if the attribute is writable, |
false | otherwise. |
Implements HF::Attributes::IAttribute.
Definition at line 289 of file attributes.h.
References _writable.
Referenced by HF::Attributes::Attribute< T, _Owner, EnableIf(IsParent(HF::Interface, _Owner))>::clone().
|
inlinevirtual |
Implements HF::Attributes::IAttribute.
Definition at line 284 of file attributes.h.
References _uid.
Referenced by HF::Attributes::Attribute< T, _Owner, EnableIf(IsParent(HF::Interface, _Owner))>::clone(), compare(), HF::Attributes::Attribute< bool >::pack(), HF::Attributes::Attribute< T, _Owner, EnableIf(IsParent(HF::Interface, _Owner))>::pack(), HF::Attributes::Attribute< bool >::unpack(), and HF::Attributes::Attribute< T, _Owner, EnableIf(IsParent(HF::Interface, _Owner))>::unpack().
|
protected |
Interface this attribute belongs to.
Definition at line 274 of file attributes.h.
Referenced by HF::Attributes::Attribute< bool >::clone(), and interface().
|
protected |
Attribute unique identifier.
Definition at line 275 of file attributes.h.
Referenced by HF::Attributes::Attribute< bool >::clone(), and uid().
|
protected |
Attribute access mode.
Definition at line 276 of file attributes.h.
Referenced by HF::Attributes::Attribute< bool >::clone(), and isWritable().