16 #ifndef HF_ITF_SIMPLE_TEMPERATURE_H 17 #define HF_ITF_SIMPLE_TEMPERATURE_H 27 namespace SimpleTemperature
51 namespace SimpleTemperature
62 typedef enum _Attributes
79 static constexpr
bool WRITABBLE =
false;
93 static constexpr
bool WRITABBLE =
false;
107 static constexpr
bool WRITABBLE =
false;
120 static constexpr
bool WRITABBLE =
false;
180 Server(int16_t minimum = std::numeric_limits<int16_t>::min(),
181 int16_t maximum = std::numeric_limits<int16_t>::max(),
270 template<Attributes _Attribute>
const uint16_t _tolerance
Tolerance.
int16_t maximum_temperature()
Getter for the maximum measurable temperature.
int16_t minimum_temperature()
Getter for the minimum measurable temperature.
virtual void send(const Protocol::Address &addr, Protocol::Message &message)=0
Send message msg to the network address given by addr.
const int16_t _maximum
Maximum measurable temperature.
Helper class to handle the Minimum Measured Temperature attribute for the Simple Temperature interfac...
void read(Protocol::Address &addr)
Send a GET_ATTR_REQ to the given address to get the current temperature.
Return all mandatory attributes for the interface.
This file contains the common defines for the HAN-FUN library.
Simple Temperature interface UID.
Helper class template for parent class implementation of the interfaces.
Level Control Interface : Client side implementation.
uint16_t id
Identifier of the interface.
int16_t temperature()
Getter for the current measured temperature.
HF::Attributes::UIDS attributes(uint8_t pack_id=HF::Attributes::Pack::MANDATORY) const
Return a vector containing the attribute UIDs, for the given pack ID.
HF::Attributes::IAttribute * attribute(uint8_t uid)
Return a pointer to the interface attribute with the given uid.
Simple Temperature Interface : Server side interface.
This file contains the definitions common to all interfaces.
Server(int16_t minimum=std::numeric_limits< int16_t >::min(), int16_t maximum=std::numeric_limits< int16_t >::max(), int16_t tolerance=0)
Constructor.
Helper class to handle the Tolerance attribute for the Simple Temperature interface.
void read_all(Protocol::Address &addr)
Send a GET_ATTR_PACK_REQ to the given address to get the values for all the attributes in the server...
Helper class to handle the Measured Temperature attribute for the Simple Temperature interface...
uint16_t role
Interface role : Server or Client.
HF::Interface const * owner() const
int16_t _value
Current measured temperature.
This class represents a byte array.
uint16_t tolerance()
Getter for the tolerance attribute.
uint8_t member
Interface destination member.
uint16_t uid() const
This method returns the interface UID.
Interface itf
Interface Address.
HF::Attributes::IAttribute * create_attribute(HF::Interfaces::Alert::Server *server, uint8_t uid)
Create an attribute object that can hold the attribute with the given uid.
Interface/Service Attribute API.
const int16_t _minimum
Minimum measurable temperature.
HF::Attributes::IAttribute * create_attribute(uint8_t uid)
Create an attribute object that can hold the attribute with the given uid. (HF::Interfaces::SimpleTem...
Measured temperature attribute UID.
Maximum measured temperature attribute UID.
Helper class template for implementing a given interface role.
#define UNUSED(x)
Helper macro to remove warning about unused function/method argument.
Common::Result handle_attribute(Protocol::Packet &packet, Common::ByteArray &payload, uint16_t offset)
Handle incoming messages from the network.
Helper template class to declare an attribute with the given T type.
Common interface for all Interfaces.
Helper class to handle the Maximum Measured Temperature attribute for the Simple Temperature interfac...
Minimum measured temperature attribute UID.
Simple Temperature Interface : Parent.
Result
Commands result codes.
Top-level namespace for the HAN-FUN library.