17 #ifndef HF_DEVICE_INFORMATION_H 18 #define HF_DEVICE_INFORMATION_H 30 #ifndef HF_DEVICE_MANUFACTURER_CODE 31 #warning "HF_DEVICE_MANUFACTURER_CODE not defined ! Using default value '0x0000'" 32 #define HF_DEVICE_MANUFACTURER_CODE 0x0000 36 #ifndef HF_APPLICATION_VERSION 37 #warning "HF_APPLICATION_VERSION not defined ! Using default empty value !" 38 #define HF_APPLICATION_VERSION "" 42 #ifndef HF_HARDWARE_VERSION 43 #warning "HF_HARDWARE_VERSION not defined ! Using default empty value !" 44 #define HF_HARDWARE_VERSION "" 48 #ifndef HF_MANUFACTURER_NAME 49 #warning "HF_MANUFACTURER_NAME not defined ! Using default empty value !" 50 #define HF_MANUFACTURER_NAME "" 62 namespace DeviceInformation
95 namespace DeviceInformation
111 #if HF_CORE_DEV_INFO_APP_VERSION_ATTR 114 #if HF_CORE_DEV_INFO_HW_VERSION_ATTR 117 #if HF_CORE_DEV_INFO_MANUFACTURER_NAME_ATTR 122 typedef enum _Attributes
174 uint16_t
size()
const;
187 static constexpr uint16_t
min_size =
sizeof(uint8_t);
190 uint16_t
size()
const;
295 #if HF_CORE_DEV_INFO_APP_VERSION_ATTR 301 const std::string application_version()
const 303 return std::string(APPLICATION_VERSION);
306 #if HF_CORE_DEV_INFO_HW_VERSION_ATTR 312 virtual const std::string hardware_version()
const 314 return std::string(HARDWARE_VERSION);
317 #if HF_CORE_DEV_INFO_MANUFACTURER_NAME_ATTR 323 const std::string manufacturer_name()
const 325 return std::string(MANUFACTURER_NAME);
330 uint8_t _capabilities;
347 Protocol::Message *
all();
366 Protocol::Message *
get(uint8_t uid);
393 std::ostream &
operator<<(std::ostream &stream,
Device friendly name attribute.
HF::Attributes::IAttribute * create_attribute(uint8_t uid)
Create an attribute object that can hold the attribute with the given uid. (HF::Core::DeviceInformati...
HF Core version attribute.
Minimum sleep time attribute.
constexpr uint8_t CORE_VERSION
Core Service & Interfaces major version supported.
This represent the special unit with ID/UID = 0.
constexpr uint8_t PROFILES_VERSION
Profiles major version supported.
Extra capabilities attribute.
Return all mandatory attributes for the interface.
This file contains the common defines for the HAN-FUN library.
Units::IUnit * unit(uint8_t id) const
Return pointer to the unit with the given id.
This file contains the forward declarations of the core services and interfaces implementing classes...
HF Profile version attribute.
Protocol::Message * all()
Create a message that can be used to retrieve all the attributes on a remote device.
Device enabled attribute.
This file contains the definitions common to all interfaces.
Electronic Manufacture Code attribute.
Unit0 & unit() const
The device this unit is associated with.
constexpr uint8_t INTERFACES_VERSION
Interfaces major version supported.
std::ostream & operator<<(std::ostream &stream, const HF::Core::DeviceInformation::Attributes attribute)
Convert the given attribute into a string and write it to the given stream.
Wrapper around UID_T pointer's.
This class represents a byte array.
HF Interface version attribute.
Wrapper for std::string implementing the Serializable API.
Interface/Service Attribute API.
Actual response time attribute.
Class template for all interfaces role implementations.
#define UNUSED(x)
Helper macro to remove warning about unused function/method argument.
Hardware version attribute.
Hardware version attribute.
Device information interface UID.
Common interface for all Interfaces.
static constexpr uint16_t min_size
Minimum pack/unpack required data size.
Class template for all core services implementations.
Protocol::Message * mandatory()
Create a message that can be used to retrieve the mandatory attributes on a remote device...
HF::Attributes::IAttribute * create_attribute(HF::Core::AttributeReporting::IServer *server, uint8_t uid)
Create an attribute object that can hold the attribute with the given uid.
Manufacture's name attribute.
Top-level namespace for the HAN-FUN library.