Zigbee Protocol Controller 1.6.0
ota_mqtt.hpp File Reference

OTA status updates module. More...

#include <string>
#include "ota.hpp"
#include "uic_typedefs.h"
#include "sl_status.h"

Go to the source code of this file.

Functions

void publish_status_string (const dotdot_unid_t &unid, const dotdot_endpoint_id_t &endpoint, const ota_uiid_t &uiid, const std::string &val, const std::string &status, uint32_t cluster_revision)
 Publish OTA status update for string value. More...
 
void publish_status_unsigned_long (const dotdot_unid_t &unid, const dotdot_endpoint_id_t &endpoint, const ota_uiid_t &uiid, const unsigned long val, const std::string &status, uint32_t cluster_revision)
 Publish OTA status update for unsigned long value. More...
 
std::string convert_last_error_to_label (uic_ota::last_error_t last_error)
 Convert last error to label. More...
 
std::string convert_status_to_label (uic_ota::status_t status)
 Conver status to label. More...
 

Detailed Description

OTA status updates module.

This module implements the logic for publishing OTA subscriptions.

Function Documentation

◆ convert_last_error_to_label()

std::string convert_last_error_to_label ( uic_ota::last_error_t  last_error)

Convert last error to label.

Parameters
last_errorlast error enum value.
Returns
label of enum value.

◆ convert_status_to_label()

std::string convert_status_to_label ( uic_ota::status_t  status)

Conver status to label.

Parameters
statuslast error enum value.
Returns
label of enum value.

◆ publish_status_string()

void publish_status_string ( const dotdot_unid_t unid,
const dotdot_endpoint_id_t endpoint,
const ota_uiid_t uiid,
const std::string &  val,
const std::string &  status,
uint32_t  cluster_revision 
)

Publish OTA status update for string value.

Parameters
unidunique identifier id.
endpointendpoint id.
uiidunique image identifier id.
valstring value.
statusthe status topic to update to.
cluster_revisioncluster revision number.

◆ publish_status_unsigned_long()

void publish_status_unsigned_long ( const dotdot_unid_t unid,
const dotdot_endpoint_id_t endpoint,
const ota_uiid_t uiid,
const unsigned long  val,
const std::string &  status,
uint32_t  cluster_revision 
)

Publish OTA status update for unsigned long value.

Parameters
unidunique identifier id.
endpointendpoint id.
uiidunique image identifier id.
valunsgined long value.
statusthe status topic to update to.
cluster_revisioncluster revision number.