Zigbee Protocol Controller 1.6.0

Functions

bool parse_topic_no_endpoint (const std::string &topic, std::string &unid)
 Helper function to extract unid from a topic string. More...
 
bool parse_topic (const std::string &topic, std::string &unid, dotdot_endpoint_id_t &endpoint)
 Helper function to extract unid and endpoint from a topic string. More...
 
bool parse_topic_group_id (const std::string &&topic, dotdot_group_id_t &group_id)
 Helper function to extract group ID from a topic string. More...
 
sl_status_t get_topic_last_item (const std::string &topic, std::string &last_item)
 Helper function to extract the last item of an MQTT topic. More...
 
std::map< std::string, bool > get_bitmap_value_names (uint32_t value, dotdot_bitmap bitmap_handler)
 Finds the list of fields that are set to true/false for a bitmap. More...
 
uint32_t get_bitmap_decimal_value (std::string key, nlohmann::json &jsn, dotdot_bitmap bitmap_handler)
 Get the bitmap decimal value object. More...
 
uint32_t get_bitmap_decimal_value_from_array (size_t index, nlohmann::json &jsn, dotdot_bitmap bitmap_handler)
 Get the bitmap decimal value from array object. More...
 

Function Documentation

◆ get_bitmap_decimal_value()

uint32_t uic_dotdot_mqtt::get_bitmap_decimal_value ( std::string  key,
nlohmann::json &  jsn,
dotdot_bitmap  bitmap_handler 
)

Get the bitmap decimal value object.

Parameters
key
jsn
bitmap_handler
Returns
uint32_t

◆ get_bitmap_decimal_value_from_array()

uint32_t uic_dotdot_mqtt::get_bitmap_decimal_value_from_array ( size_t  index,
nlohmann::json &  jsn,
dotdot_bitmap  bitmap_handler 
)

Get the bitmap decimal value from array object.

Parameters
index
jsn
bitmap_handler
Returns
uint32_t

◆ get_bitmap_value_names()

std::map< std::string, bool > uic_dotdot_mqtt::get_bitmap_value_names ( uint32_t  value,
dotdot_bitmap  bitmap_handler 
)

Finds the list of fields that are set to true/false for a bitmap.

Returns
a Map with keys and true/false values

◆ get_topic_last_item()

sl_status_t uic_dotdot_mqtt::get_topic_last_item ( const std::string &  topic,
std::string &  last_item 
)

Helper function to extract the last item of an MQTT topic.

For example, if the topic is ucl/2/ep3/example/test/23more/test the last item is "test"

Parameters
topicstd::string to parse.
last_item[out] String containing the last item
Returns
true if topic could be parsed

◆ parse_topic()

bool uic_dotdot_mqtt::parse_topic ( const std::string &  topic,
std::string &  unid,
dotdot_endpoint_id_t endpoint 
)

Helper function to extract unid and endpoint from a topic string.

Parameters
topicstd::string to parse.
unid[out] unid variable to write.
endpoint[out] Endpoint variable to write.
Returns
true if topic could be parsed

◆ parse_topic_group_id()

bool uic_dotdot_mqtt::parse_topic_group_id ( const std::string &&  topic,
dotdot_group_id_t group_id 
)

Helper function to extract group ID from a topic string.

Parameters
topicstd::string to parse.
group_id[out] group ID variable to populate.
Returns
true if topic could be parsed

◆ parse_topic_no_endpoint()

bool uic_dotdot_mqtt::parse_topic_no_endpoint ( const std::string &  topic,
std::string &  unid 
)

Helper function to extract unid from a topic string.

Parameters
topicstd::string to parse.
unid[out] unid variable to write.
Returns
true if topic could be parsed