core/include/sm_types.h File Reference

State Machine. More...

Data Structures

struct  os_state_machine_s
 data type for state machine description More...

Typedefs

typedef struct os_state_machine_s os_state_machine_t
 type defined for state machine description
typedef int(* os_sm_handler_t )(os_state_machine_t *state_machine, os_event_t *event)
 Handler for processing events in each state.
typedef enum signals os_signals_t
 Global enumeration of signals.

Enumerations

enum  signals { system_sig_a = 0, system_sig_b, last_signal }
 

Global enumeration of signals.

More...

Detailed Description

State Machine.

Author:
Piotr Romaniuk, (c) ELESOFTROM
Version:
1.0 Jun 09, 2011

Data types for state machines.


Typedef Documentation

typedef enum signals os_signals_t

Global enumeration of signals.

User signals should be added in sm_signals_user.h

typedef int(* os_sm_handler_t)(os_state_machine_t *state_machine, os_event_t *event)

Handler for processing events in each state.

Each state has its own function (i.e. handler) that is responsible for processing events in this state.

Parameters:
[in]state_machinestate machine
[in]eventevent to be processed
Returns:
The handler should return next state if transition is required or 0 if state machine should remain in current state

Enumeration Type Documentation

enum signals

Global enumeration of signals.

User signals should be added in sm_signals_user.h

Enumerator:
system_sig_a 

Examplar common system signals.