Zigbee Protocol Controller 1.6.0
attribute_resolver_rule_internal.h File Reference

This module offers API for registering and executing rules. More...

#include "attribute_resolver.h"
#include "clock.h"

Go to the source code of this file.

typedef void(* attribute_rule_complete_t) (attribute_store_node_t, clock_time_t)
 
sl_status_t attribute_resolver_rule_execute (attribute_store_node_t node, bool set_rule)
 Execute a rule and send the frame. More...
 
void attribute_resolver_rule_register (attribute_store_type_t node_type, attribute_resolver_function_t set_func, attribute_resolver_function_t get_func)
 
void attribute_resolver_rule_init (attribute_rule_complete_t compl_func)
 Initialize the rule book. More...
 
bool attribute_resolver_rule_busy ()
 Check if the resolver is currently executing a rule. More...
 
void attribute_resolver_rule_abort (attribute_store_node_t node)
 Stop waiting for a send data callback for a given node. More...
 

Detailed Description

This module offers API for registering and executing rules.

Typedef Documentation

◆ attribute_rule_complete_t

typedef void(* attribute_rule_complete_t) (attribute_store_node_t, clock_time_t)

Function Documentation

◆ attribute_resolver_rule_abort()

void attribute_resolver_rule_abort ( attribute_store_node_t  node)

Stop waiting for a send data callback for a given node.

◆ attribute_resolver_rule_busy()

bool attribute_resolver_rule_busy ( )

Check if the resolver is currently executing a rule.

Returns
true Resolver is executing
false Resolver is not executing.

◆ attribute_resolver_rule_execute()

sl_status_t attribute_resolver_rule_execute ( attribute_store_node_t  node,
bool  set_rule 
)

Execute a rule and send the frame.

This function performs a lookup in the rule book and executes either a get rule or a set rule.

Parameters
nodeAttribute for which we should execute
set_ruletrue if the set rule needs to be executed false if the get_rule needs to be executed.
Returns
sl_status_t
  • SL_STATUS_OK rule is executed the attribute_rule_complete_t callback will be called when we are done executing
  • SL_STATUS_ALREADY_EXISTS refer to attribute_resolver_function_t
  • SL_STATUS_NOT_FOUND the requested rule is not in the the book
  • SL_STATUS_BUSY The Attribute Resolver is already executing a rule.
  • SL_STATUS_WOULD_OVERFLOW The Attribute Resolver buffer cannot handle the frame.
  • SL_STATUS_NOT_READY The send function cannot service our frame.
  • SL_STATUS_FAIL (or other codes) refer to attribute_resolver_function_t

◆ attribute_resolver_rule_init()

void attribute_resolver_rule_init ( attribute_rule_complete_t  compl_func)

Initialize the rule book.

Parameters
compl_funcCallback function which is called when we are done executing a rule.

◆ attribute_resolver_rule_register()

void attribute_resolver_rule_register ( attribute_store_type_t  node_type,
attribute_resolver_function_t  set_func,
attribute_resolver_function_t  get_func 
)