High Performance OPC UA Server SDK  1.2.0.193
util_fsm Struct Reference

Finite state machine context. More...

#include <fsm.h>

Data Fields

util_fsm_index_t current_state
 
util_fsm_index_t num_transitions
 
util_fsm_index_t table_size
 
struct util_fsm_transitiontransition_tbl
 
util_fsm_index_t num_states
 
util_fsm_index_t * state_offset_tbl
 offset of each state in transition table
 
fsm_transition_t transition_cb
 
fsm_no_transition_t no_transition_cb
 
struct util_ringqueue event_queue
 
void * queue_elements [FSM_QUEUE_SIZE]
 
void * object
 
bool valid
 Set to true when the FSM was validated successfully.
 
bool free
 Set to true when the tables are allocated dynamically.
 

Detailed Description

Finite state machine context.

This FSM implementation allows you to create FSMs dynamically at runtime using util_fsm_init() and util_fsm_add_transition(), or to use built-in transition tables using util_fsm_init_static(). With each transition you can associate an action (function pointer) which gets executed when the transitions is performed. Thus this FSM implements a "Mealy machine". An optional callback can be registered to get notified about each state change.


The documentation for this struct was generated from the following file: