Zigbee Protocol Controller 1.6.0
|
Modules | |
Internal Fixture Interfaces. | |
Typedefs | |
typedef sl_status_t(* | uic_fixt_setup_t) (void) |
typedef int(* | uic_fixt_shutdown_t) (void) |
A fixture is the environment a component runs in. So it must be set up before the component can work and maybe also cleaned up afterwards.
In the Unify Framework, most of what the components need are provided by other components or by the Contiki OS. However, there are key features that are needed by a few of the components and that are not provided by Unify itself. This may relate to external interfaces or dynamic memory.
If a component needs to set up and/or tear down such a resource, it can install an initializer (the set-up function). If the component is in the Unify library, this shall be done in uic_fixt_setup_steps_list array and a tear-down function in the uic_fixt_shutdown_steps_list array. If the component is outside the Unify library an array of uic_fixt_setup_step_t and uic_fixt_shutdown_step_t are added to Main Function for Contiki function call.
A tear-down function may also be useful for releasing allocated resources.
Order of Execution
The set-up functions are executed as the first thing after the configuration settings have been read and the logging system has been initialized.
Tear-down functions are run after the uic_main_loop() has terminated and after the Contiki OS is terminated, i.e., there are no processes and no Contiki timers.
typedef sl_status_t(* uic_fixt_setup_t) (void) |
Type of a component fixture set-up function.
The function should returns SL_STATUS_FAIL if the Unify GW cannot start due to an error. If the component whish to abort the boot sequence but not due to an error SL_STATUS_ABORT should be returned. If the component failed in a non-critical way or is optional, SL_STATUS_NOT_AVAILABLE should be returned. If boot should proceed normally SL_STATUS_OK should be returned
typedef int(* uic_fixt_shutdown_t) (void) |
Type of a component tear-down function.
uic_fixt_setup_step_t* uic_fixt_setup_steps = uic_fixt_setup_steps_list |
Reference to the set-up steps.
|
static |
Pre-contiki set-up steps.
The set-up steps are executed in order, before launching contiki and starting the contiki processes.
uic_fixt_shutdown_step_t* uic_fixt_shutdown_steps = uic_fixt_shutdown_steps_list |
Reference to the tear-down steps.