|
|
State Machine Manager. More...
Functions | |
os_result_t | os_sm_manager_init (os_thread_prio_t prio, unsigned short stack_size) |
Initiates State Machine Manager. | |
os_result_t | os_sm_manager_sm_activate (os_state_machine_t *state_machine) |
Activates states machine. | |
os_result_t | os_sm_manager_sm_deactivate (os_state_machine_t *state_machine) |
Deactivates state machine, removes it from state machine list. | |
os_result_t | os_sm_manager_send_event (os_state_machine_t *sm, os_event_t ev) |
sends event to state machine (do not call this from interrupts) | |
os_result_t | os_sm_manager_send_event_intr (os_state_machine_t *sm, os_event_t ev) |
sends event to state machine (this version is only for calling from interrupt) |
State Machine Manager.
State machine manager has separated thread. If no events are in all queues the thread performs non-busy waiting on internat semaphore intended for this purpose. |
os_result_t os_sm_manager_init | ( | os_thread_prio_t | prio, |
unsigned short | stack_size | ||
) |
Initiates State Machine Manager.
creates and initiates state machine manager, starts common thread for event processing
os_result_t os_sm_manager_send_event | ( | os_state_machine_t * | sm, |
os_event_t | ev | ||
) |
sends event to state machine (do not call this from interrupts)
Must be done through state machine manager, because of common waiting semaphore
[in] | sm | state machine |
[in] | ev | event |
os_result_t os_sm_manager_send_event_intr | ( | os_state_machine_t * | sm, |
os_event_t | ev | ||
) |
sends event to state machine (this version is only for calling from interrupt)
Must be done through state machine manager, because of common waiting semaphore
[in] | sm | state machine |
[in] | ev | event |
os_result_t os_sm_manager_sm_activate | ( | os_state_machine_t * | state_machine | ) |
Activates states machine.
it is added to state machine manager list and is ready to be scheduled
[in] | state_machine | pointer to state machine structure |
os_result_t os_sm_manager_sm_deactivate | ( | os_state_machine_t * | state_machine | ) |
Deactivates state machine, removes it from state machine list.
[in] | state_machine | pointer to state machine structure |