57 virtual uint8_t
id()
const = 0;
86 virtual std::vector<Common::Interface>
interfaces()
const = 0;
89 virtual void periodic(uint32_t time) = 0;
117 return std::vector<Common::Interface>();
153 template<
typename _Interface,
typename _Proxy,
typename =
void>
168 template<
typename _Interface,
typename _Proxy>
172 typedef _Interface base;
174 Proxy(_Proxy &_proxy): _Interface(_proxy)
181 template<
typename Base,
typename... ITF>
195 template<
class Profile,
typename... ITF>
226 return Profile::uid();
248 auto result = Profile::attributes(itf, pack_id, uids);
283 Profile::periodic(time);
284 Wrapper::periodic(time);
void periodic(uint32_t time)
Handle periodic processing.
This class represents a HAN-FUN Concentrator.
virtual void remove(Units::IUnit *unit)=0
Remove unit from device's unit list.
void send(const Protocol::Address &addr, Protocol::Message &message)
Send message msg to the network address given by addr.
This is the parent class for all HAN-FUN units.
virtual void send(const Protocol::Address &addr, Protocol::Message &message, Transport::Link *link=nullptr)=0
Create and send a new packet with the given message to the given address.
void notify(const HF::Attributes::IAttribute &old_value, const HF::Attributes::IAttribute &new_value) const
Notify the attribute reporting service that the given attribute has changed value.
Helper class to handle optional interfaces in units.
This file contains the common defines for the HAN-FUN library.
This interface represents a link on the transport layer, used to send data to the remote end-point...
Helper class to add optional interfaces to other classes.
This class has the same behavior has a list, however the list element access methods where overwritte...
AbstractUnit(IDevice &device)
Constructor.
virtual void add(Units::IUnit *unit)=0
Add unit to devices unit lists.
virtual uint8_t id() const =0
Get the id number of this unit on the device.
uint16_t uid() const
Return this profile HAN-FUN UID.
Helper template class to allow interfaces implementation to be added as fields to other classes...
std::vector< Common::Interface > interfaces() const
Return the list of interfaces present in the wrapper.
virtual Common::Result handle(Protocol::Packet &packet, Common::ByteArray &payload, uint16_t offset)=0
Handle incoming messages from the network.
Helper template class to implement units.
This class represents the interface common to all HAN-FUN devices.
std::vector< Common::Interface > interfaces() const
Return a vector containing a list of extra interfaces, other than the interfaces specified by the pro...
This file contains the declarations and definitions for the HAN-FUN Profiles.
This class represents a byte array.
Common::Result handle(Protocol::Packet &packet, Common::ByteArray &payload, uint16_t offset)
Handle incoming messages from the network.
virtual std::vector< Common::Interface > interfaces() const =0
Return a vector containing a list of extra interfaces, other than the interfaces specified by the pro...
virtual IDevice & device() const =0
Reference to the device this unit belongs to.
Common::Result handle(Protocol::Packet &packet, Common::ByteArray &payload, uint16_t offset)
Handle incoming messages from the network.
uint8_t id() const
Get the id number of this unit on the device.
Proxy class for interface objects.
IDevice & device() const
Reference to the device this unit belongs to.
virtual void periodic(uint32_t time)=0
Handle periodic processing.
Unit(uint8_t id, IDevice &device)
Constructor.
HF::Attributes::List attributes(Common::Interface itf, uint8_t pack_id, const HF::Attributes::UIDS &uids) const
Return a list of all the attributes for a given interface, pack id and list of attributes UID's...
Interface/Service Attribute API.
This is the interface common to all Services.
This class represents the interface implemented by all HAN-FUN units.
Top level class representing a HAN-FUN profile.
std::vector< Common::Interface > interfaces() const
Return the list of optional interfaces implemented by this unit.
#define UNUSED(x)
Helper macro to remove warning about unused function/method argument.
void send(const Protocol::Address &addr, Protocol::Message &message, Transport::Link *link)
Create and send a new packet with the given message to the given address.
This file contains the declaration of the API for a HAN-FUN device.
void periodic(uint32_t time)
Handle periodic processing.
void attributes(HF::Attributes::List &attr_list, Common::Interface itf, uint8_t pack_id, const HF::Attributes::UIDS &uids) const
Return a list of all the attributes for a given interface, pack id and list of attributes UID's...
Result
Commands result codes.
void notify(const HF::Attributes::IAttribute &old_value, const HF::Attributes::IAttribute &new_value) const
Notify the attribute reporting service that the given attribute has changed value.
uint8_t _id
Unit ID used to identify a given unit in a given HAN-FUN device.
Top-level namespace for the HAN-FUN library.