Zigbee Protocol Controller 1.6.0
zigpc_net_mgmt_notify.c File Reference
#include <string.h>
#include "sl_log.h"
#include "sl_status.h"
#include "zigpc_net_mgmt.h"
#include "zigpc_net_mgmt_notify.h"
#include "zigpc_net_mgmt_notify_int.h"

Functions

sl_status_t zigpc_net_mgmt_register_observer (enum zigpc_net_mgmt_notify_event event, zigpc_observer_callback_t callback)
 Register observer to be informed of Net Mgmt updates If the observer is already registered, nothing will be done. More...
 
sl_status_t zigpc_net_mgmt_unregister_observer (enum zigpc_net_mgmt_notify_event event, zigpc_observer_callback_t callback)
 Unregister observer from Net Mgmt updates If the observer is not found, nothing will be done. More...
 
sl_status_t zigpc_net_mgmt_reset_observable (void)
 Clear and reinitialize ZigPC Net Mgmt observable instance. More...
 
void zigpc_net_mgmt_notify_network_init (const zigbee_eui64_t pc_eui64)
 Notify network init to observers. More...
 
void zigpc_net_mgmt_notify_clear_requested_parameter_list (void)
 Clear the list of RequestedStateParameters that will be needed from Unify as a response to Networkmanagement/Write action. See. More...
 
sl_status_t zigpc_net_mgmt_notify_add_requested_parameter (const char *parameter_str)
 Add a parameter to the list of RequestedStateParameters that will be sent from ZigPC as a response to Networkmanagement/Write action. More...
 
sl_status_t zigpc_net_mgmt_notify_state_update (const enum zigpc_net_mgmt_fsm_state new_state, const enum zigpc_net_mgmt_fsm_state *const next_supported_states)
 Notify FSM state updates to observers. More...
 
void zigpc_net_mgmt_notify_node_added (const zigbee_eui64_t eui64)
 Notify node added events to observer. More...
 
void zigpc_net_mgmt_notify_node_interview_status (const zigbee_eui64_t eui64, bool success)
 Notify node interview state (success/fail) to observers. More...
 
void zigpc_net_mgmt_notify_node_removed (const zigbee_eui64_t eui64)
 Notify node removed events to observer. More...
 

Variables

static const char LOG_TAG [] = "zigpc_net_mgmt_notify"
 
static struct zigpc_net_mgmt_on_network_state_update zigpc_net_mgmt_notify_state_update_data
 
static struct zigpc_observable zigpc_net_mgmt_observable
 Network Management observable instance. More...
 

Function Documentation

◆ zigpc_net_mgmt_notify_add_requested_parameter()

sl_status_t zigpc_net_mgmt_notify_add_requested_parameter ( const char *  parameter_str)

Add a parameter to the list of RequestedStateParameters that will be sent from ZigPC as a response to Networkmanagement/Write action.

Parameters
parameter_strRequesting State Parameter as a character array
Returns
sl_status_t SL_STATUS_OK on successfully adding to the list, SL_STATUS_NULL_POINTER on invalid parameter_str passed, SL_STATUS_EMPTY on empty parameter string passed, or SL_STATUS_FULL if there is not enough room to fit the passed parameter in the requested state parameters list.

◆ zigpc_net_mgmt_notify_clear_requested_parameter_list()

void zigpc_net_mgmt_notify_clear_requested_parameter_list ( void  )

Clear the list of RequestedStateParameters that will be needed from Unify as a response to Networkmanagement/Write action. See.

◆ zigpc_net_mgmt_notify_network_init()

void zigpc_net_mgmt_notify_network_init ( const zigbee_eui64_t  pc_eui64)

Notify network init to observers.

Parameters
pc_eui64EUI64 of PC Gateway

◆ zigpc_net_mgmt_notify_node_added()

void zigpc_net_mgmt_notify_node_added ( const zigbee_eui64_t  eui64)

Notify node added events to observer.

Parameters
eui64Added EUI64

◆ zigpc_net_mgmt_notify_node_interview_status()

void zigpc_net_mgmt_notify_node_interview_status ( const zigbee_eui64_t  eui64,
bool  success 
)

Notify node interview state (success/fail) to observers.

Parameters
eui64Node EUI64
successStatus if the interview process has succeeded

◆ zigpc_net_mgmt_notify_node_removed()

void zigpc_net_mgmt_notify_node_removed ( const zigbee_eui64_t  eui64)

Notify node removed events to observer.

Parameters
eui64Removed device identifier

◆ zigpc_net_mgmt_notify_state_update()

sl_status_t zigpc_net_mgmt_notify_state_update ( const enum zigpc_net_mgmt_fsm_state  new_state,
const enum zigpc_net_mgmt_fsm_state *const  next_supported_states 
)

Notify FSM state updates to observers.

Parameters
new_stateThe new state transitioned to
next_supported_statesList of next stated that can be transitioned into
Returns
sl_status_t SL_STATUS_OK on success, SL_STATUS_NULL_POINTER on invalid next_supported_states passed in.

◆ zigpc_net_mgmt_reset_observable()

sl_status_t zigpc_net_mgmt_reset_observable ( void  )

Clear and reinitialize ZigPC Net Mgmt observable instance.

Returns
sl_status_t SL_STATUS_OK on success, if not there is an error in initializing observable

Variable Documentation

◆ LOG_TAG

const char LOG_TAG[] = "zigpc_net_mgmt_notify"
static

◆ zigpc_net_mgmt_notify_state_update_data

struct zigpc_net_mgmt_on_network_state_update zigpc_net_mgmt_notify_state_update_data
static

◆ zigpc_net_mgmt_observable

struct zigpc_observable zigpc_net_mgmt_observable
static

Network Management observable instance.