HAN-FUN API  1.5.3
This project provides the common implementation of ULE Alliance's HAN-FUN application protocol.

This module contains the classes that define and implement the SUOTA interface API. More...

+ Collaboration diagram for SUOTA:

Data Structures

struct  HF::Core::SUOTA::Version
 Helper class that represents the information of a particular version. More...
 
struct  HF::Core::SUOTA::CheckVersionResponse
 This class represents the message for the response of a SUOTA::CHECK_VERSION_CMD. More...
 
struct  HF::Core::SUOTA::UpgradeStatus
 This class contains the required parameters for a SUOTA::UPGRADE_COMPLETE_CMD command. More...
 
struct  HF::Core::SUOTA::Base
 SUOTA Interfaces::Interface : Parent. More...
 
class  HF::Core::SUOTA::Server
 SUOTA Interfaces::Interface : Server side implementation. More...
 
struct  HF::Core::SUOTA::Client
 SUOTA Interfaces::Interface : Client side implementation. More...
 

Enumerations

enum  HF::Core::SUOTA::CMD { HF::Core::SUOTA::NEW_VERSION_AVAILABLE_CMD = 1, HF::Core::SUOTA::CHECK_VERSION_CMD = 1, HF::Core::SUOTA::UPGRADE_COMPLETE_CMD = 2 }
 Command IDs. More...
 
enum  HF::Core::SUOTA::NewVersionResponse {
  HF::Core::SUOTA::UPGRADE_INITIATED = 0x00, HF::Core::SUOTA::INVALID_SOFTWARE = 0x11, HF::Core::SUOTA::UNSUPPORTED_HARDWARE = 0x12, HF::Core::SUOTA::BATTERY_TOO_LOW = 0x13,
  HF::Core::SUOTA::FAIL_UNKNOWN = Common::FAIL_UNKNOWN
}
 Result codes for a SUOTA::NEW_VERSION_AVAILABLE_CMD. More...
 

Functions

HF::Attributes::IAttributeHF::Core::create_attribute (SUOTA::Server *server, uint8_t uid)
 Create an attribute object that can hold the attribute with the given uid. More...
 
HF::Attributes::IAttributeHF::Core::SUOTA::create_attribute (uint8_t uid)
 Create an attribute object that can hold the attribute with the given uid. (HF::Interfaces::SUOTA::Server *,uint8_t) More...
 
std::ostream & operator<< (std::ostream &stream, const HF::Core::SUOTA::CMD command)
 Convert the given command into a string and write it to the given stream. More...
 

Detailed Description

This module contains the classes that define and implement the SUOTA interface API.

Enumeration Type Documentation

◆ CMD

Command IDs.

Enumerator
NEW_VERSION_AVAILABLE_CMD 

New Version Available command UID.

CHECK_VERSION_CMD 

Check Version command UID.

UPGRADE_COMPLETE_CMD 

Upgrade Complete command UID.

Definition at line 64 of file suota.h.

65  {
67  CHECK_VERSION_CMD = 1,
69  __LAST_CMD__ = UPGRADE_COMPLETE_CMD
70  } CMD;
New Version Available command UID.
Definition: suota.h:66
Check Version command UID.
Definition: suota.h:67
CMD
Command IDs.
Definition: suota.h:64
Upgrade Complete command UID.
Definition: suota.h:68

◆ NewVersionResponse

Result codes for a SUOTA::NEW_VERSION_AVAILABLE_CMD.

Enumerator
UPGRADE_INITIATED 

Upgrade initiated.

INVALID_SOFTWARE 

Invalid software.

UNSUPPORTED_HARDWARE 

Unsupported hardware.

BATTERY_TOO_LOW 

Battery too low.

FAIL_UNKNOWN 

FAIL_UNKNOWN.

Definition at line 79 of file suota.h.

80  {
81  UPGRADE_INITIATED = 0x00,
82  INVALID_SOFTWARE = 0x11,
83  UNSUPPORTED_HARDWARE = 0x12,
84  BATTERY_TOO_LOW = 0x13,
NewVersionResponse
Result codes for a SUOTA::NEW_VERSION_AVAILABLE_CMD.
Definition: suota.h:79
Upgrade initiated.
Definition: suota.h:81
Battery too low.
Definition: suota.h:84
Invalid software.
Definition: suota.h:82
FAIL_UNKNOWN.
Definition: suota.h:85
Unsupported hardware.
Definition: suota.h:83

Function Documentation

◆ create_attribute() [1/2]

HF::Attributes::IAttribute* HF::Core::create_attribute ( SUOTA::Server server,
uint8_t  uid 
)

Create an attribute object that can hold the attribute with the given uid.

If server is not equal to nullptr then initialize it with the current value.

Parameters
[in]serverpointer to the object to read the current value from.
[in]uidattribute's UID to create the attribute object for.
Returns
pointer to an attribute object or nullptr if the attribute UID does not exist.

◆ create_attribute() [2/2]

HF::Attributes::IAttribute* HF::Core::SUOTA::create_attribute ( uint8_t  uid)
inline

Create an attribute object that can hold the attribute with the given uid. (HF::Interfaces::SUOTA::Server *,uint8_t)

See also
HF::Core::create_attribute (HF::Core::SUOTA::Server *,uint8_t)
Parameters
[in]uidattribute UID to create the attribute object for.
Return values
pointerto an attribute object
<tt>nullptr</tt>if the attribute UID does not exist.

Create an attribute object that can hold the attribute with the given uid. (HF::Interfaces::SUOTA::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Interfaces::RSSI::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Core::GroupTable::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid.

Create an attribute object that can hold the attribute with the given uid. (HF::Core::Scheduling::Event::IServer *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Core::DeviceManagement::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Core::DeviceInformation::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Core::BindManagement::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Core::BatchProgramManagement::IServer *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Core::AttributeReporting::Server *,uint8_t)

See also
HF::Interfaces::create_attribute (HF::Interfaces::SimpleHumidity::Server *,uint8_t)
Parameters
[in]uidattribute UID to create the attribute object for.
Returns
pointer to an attribute object or nullptr if the attribute UID does not exist.

Create an attribute object that can hold the attribute with the given uid. (HF::Interfaces::SUOTA::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Interfaces::RSSI::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Core::GroupTable::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid.

Create an attribute object that can hold the attribute with the given uid. (HF::Core::Scheduling::Event::IServer *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Core::DeviceManagement::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Core::DeviceInformation::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Core::BindManagement::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Core::BatchProgramManagement::IServer *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Core::AttributeReporting::Server *,uint8_t)

See also
HF::Interfaces::create_attribute (HF::Interfaces::SimpleTemperature::Server *,uint8_t)
Parameters
[in]uidattribute UID to create the attribute object for.
Return values
pointerto an attribute object
<tt>nullptr</tt>if the attribute UID does not exist.

Definition at line 108 of file simple_humidity.h.

109  {
110  return Interfaces::create_attribute(static_cast<SimpleHumidity::Server *>(nullptr),
111  uid);
112  }
HF::Attributes::IAttribute * create_attribute(uint8_t uid)
Create an attribute object that can hold the attribute with the given uid. (HF::Interfaces::SimpleHum...

◆ operator<<()

std::ostream& operator<< ( std::ostream &  stream,
const HF::Core::SUOTA::CMD  command 
)

Convert the given command into a string and write it to the given stream.

Parameters
[in]streamout stream to write the string to.
[in]commandrole value to convert to a string.
Returns
stream