Zigbee Protocol Controller 1.6.0
unid_state_handler Namespace Reference

Functions

void set_unid_poll (std::shared_ptr< TimeoutHandler > timeout_handler)
 Setting image status of a specific image key. More...
 
void pop_unid_poll (const std::string &unid)
 Pop key from image key poll. More...
 
bool get_unid_poll_state (const std::string &unid)
 Get image key poll state. More...
 
void set_unid_poll_state_true (const std::string &unid)
 Set UNID poll state. More...
 
bool is_unid_in_poll (const std::string &unid)
 Check if UNID in poll. More...
 
uic_ota::image_ready_funct_t get_unid_callback (const std::string &unid)
 Get the image callback for a specific image key. More...
 
bool is_poll_topic_subscribed (const std::string &topic)
 Check if the topic is already subscribed. More...
 
void set_unid_listening (const std::string &uiid, const std::string &unid)
 Set UNID to listening on UIID. More...
 
std::vector< std::string > get_unids_listening (const std::string &uiid)
 Get all UNIDs listening to a specific UIID. More...
 
std::size_t get_unids_listening_count (const std::string &uiid)
 Get count of listening UNIDs to a UIID. More...
 
void remove_unid_listening (const std::string &uiid, const std::string &unid)
 Remove UNID listening on UIID. More...
 
std::vector< std::string > get_uiids_unid_is_listening_to (const std::string &unid)
 Get all UIIDs which a single UNID is listening to. More...
 
std::map< std::string, std::vector< std::string >, std::less<> > get_uiids_and_unids_listening ()
 Get all UIIDs and UNIDs active. More...
 
void set_status_published_cached (const dotdot_unid_t &unid, const dotdot_endpoint_id_t &ep)
 Set UNID and endpoint as published to. More...
 
bool is_status_published (const dotdot_unid_t &unid, const dotdot_endpoint_id_t &ep)
 Check if UNID and ep has been published to. More...
 
std::map< std::string, std::vector< endpoint_cache_t >, std::less<> > get_map_status_published_cached_and_clear ()
 Get map of published UNID and endpoints. More...
 
std::vector< endpoint_cache_tget_endpoints_status_published_and_pop (const dotdot_unid_t &unid)
 Get published status updates on UNID and pop. More...
 

Function Documentation

◆ get_endpoints_status_published_and_pop()

std::vector< endpoint_cache_t > unid_state_handler::get_endpoints_status_published_and_pop ( const dotdot_unid_t unid)

Get published status updates on UNID and pop.

Returns
vector of endpoints belonging to specific UNID.

◆ get_map_status_published_cached_and_clear()

std::map< std::string, std::vector< endpoint_cache_t >, std::less<> > unid_state_handler::get_map_status_published_cached_and_clear ( )

Get map of published UNID and endpoints.

Returns
map of published UNID and endpoints.

◆ get_uiids_and_unids_listening()

std::map< std::string, std::vector< std::string >, std::less<> > unid_state_handler::get_uiids_and_unids_listening ( )

Get all UIIDs and UNIDs active.

Returns
map of UIIDs and listening UNIDs.

◆ get_uiids_unid_is_listening_to()

std::vector< std::string > unid_state_handler::get_uiids_unid_is_listening_to ( const std::string &  unid)

Get all UIIDs which a single UNID is listening to.

Parameters
unidend-note id.
Returns
vector of UIIDs.

◆ get_unid_callback()

uic_ota::image_ready_funct_t unid_state_handler::get_unid_callback ( const std::string &  unid)

Get the image callback for a specific image key.

Parameters
unidImage UNID for getting image ready callback.
Returns
image ready callback for image.

◆ get_unid_poll_state()

bool unid_state_handler::get_unid_poll_state ( const std::string &  unid)

Get image key poll state.

Parameters
unidend-note id.
Returns
boolean true if the image key has been activated.

◆ get_unids_listening()

std::vector< std::string > unid_state_handler::get_unids_listening ( const std::string &  uiid)

Get all UNIDs listening to a specific UIID.

Parameters
uiidunique image identifier ID.
Returns
vector of UNIDs listening to UIID.

◆ get_unids_listening_count()

std::size_t unid_state_handler::get_unids_listening_count ( const std::string &  uiid)

Get count of listening UNIDs to a UIID.

Parameters
uiidunique image identifier ID.
Returns
count of listening UNIDs to UIID.

◆ is_poll_topic_subscribed()

bool unid_state_handler::is_poll_topic_subscribed ( const std::string &  topic)

Check if the topic is already subscribed.

Parameters
topicMQTT topic.
Returns
true/false.

◆ is_status_published()

bool unid_state_handler::is_status_published ( const dotdot_unid_t unid,
const dotdot_endpoint_id_t ep 
)

Check if UNID and ep has been published to.

Parameters
unidend-note id to check.
ependpoint ID to check.

◆ is_unid_in_poll()

bool unid_state_handler::is_unid_in_poll ( const std::string &  unid)

Check if UNID in poll.

Parameters
unidend-note id.

◆ pop_unid_poll()

void unid_state_handler::pop_unid_poll ( const std::string &  unid)

Pop key from image key poll.

Parameters
unidUNID in que.

◆ remove_unid_listening()

void unid_state_handler::remove_unid_listening ( const std::string &  uiid,
const std::string &  unid 
)

Remove UNID listening on UIID.

Parameters
uiidunique image identifier ID.
unidend-note id.

◆ set_status_published_cached()

void unid_state_handler::set_status_published_cached ( const dotdot_unid_t unid,
const dotdot_endpoint_id_t ep 
)

Set UNID and endpoint as published to.

Parameters
unidend-note id set as published.
epEndpoint ID to set as published to.

◆ set_unid_listening()

void unid_state_handler::set_unid_listening ( const std::string &  uiid,
const std::string &  unid 
)

Set UNID to listening on UIID.

Parameters
uiidunique image identifier ID.
unidend-note id.

◆ set_unid_poll()

void unid_state_handler::set_unid_poll ( std::shared_ptr< TimeoutHandler timeout_handler)

Setting image status of a specific image key.

Parameters
timeout_handlerhandler

◆ set_unid_poll_state_true()

void unid_state_handler::set_unid_poll_state_true ( const std::string &  unid)

Set UNID poll state.

Parameters
unidend-note id.