This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Defines | |
#define | SM_STATE(machine, state) |
Declaration of a state machine function. | |
#define | SM_ENTRY(machine, state) |
State machine function entry point. | |
#define | SM_ENTRY_M(machine, _state, data) |
State machine function entry point for state machine group. | |
#define | SM_ENTRY_MA(machine, _state, data) |
State machine function entry point for state machine group. | |
#define | SM_ENTER(machine, state) sm_ ## machine ## _ ## state ## _Enter(sm, 0) |
Enter a new state machine state. | |
#define | SM_ENTER_GLOBAL(machine, state) sm_ ## machine ## _ ## state ## _Enter(sm, 1) |
Enter a new state machine state based on global rule. | |
#define | SM_STEP(machine) static void sm_ ## machine ## _Step(STATE_MACHINE_DATA *sm) |
Declaration of a state machine step function. | |
#define | SM_STEP_RUN(machine) sm_ ## machine ## _Step(sm) |
Call the state machine step function. |
Alternatively, this software may be distributed under the terms of BSD license.
See README and COPYING for more details.
This file includes a set of pre-processor macros that can be used to implement a state machine. In addition to including this header file, each file implementing a state machine must define STATE_MACHINE_DATA to be the data structure including state variables (enum <machine>_state, Boolean changed), and STATE_MACHINE_DEBUG_PREFIX to be a string that is used as a prefix for all debug messages. If SM_ENTRY_MA macro is used to define a group of state machines with shared data structure, STATE_MACHINE_ADDR needs to be defined to point to the MAC address used in debug output. SM_ENTRY_M macro can be used to define similar group of state machines without this additional debug info.
Definition in file state_machine.h.
|
Enter a new state machine state.
Definition at line 113 of file state_machine.h. |
|
Enter a new state machine state based on global rule.
Definition at line 127 of file state_machine.h. |
|
Value: if (!global || sm->machine ## _state != machine ## _ ## state) { \ sm->changed = TRUE; \ wpa_printf(MSG_DEBUG, STATE_MACHINE_DEBUG_PREFIX ": " #machine \ " entering state " #state); \ } \ sm->machine ## _state = machine ## _ ## state;
Definition at line 55 of file state_machine.h. |
|
Value: if (!global || sm->data ## _ ## state != machine ## _ ## _state) { \ sm->changed = TRUE; \ wpa_printf(MSG_DEBUG, STATE_MACHINE_DEBUG_PREFIX ": " \ #machine " entering state " #_state); \ } \ sm->data ## _ ## state = machine ## _ ## _state;
Definition at line 75 of file state_machine.h. |
|
Value: if (!global || sm->data ## _ ## state != machine ## _ ## _state) { \ sm->changed = TRUE; \ wpa_printf(MSG_DEBUG, STATE_MACHINE_DEBUG_PREFIX ": " MACSTR " " \ #machine " entering state " #_state, \ MAC2STR(STATE_MACHINE_ADDR)); \ } \ sm->data ## _ ## state = machine ## _ ## _state;
Definition at line 94 of file state_machine.h. |
|
Value: static void sm_ ## machine ## _ ## state ## _Enter(STATE_MACHINE_DATA *sm, \ int global)
Definition at line 40 of file state_machine.h. |
|
Declaration of a state machine step function.
Definition at line 140 of file state_machine.h. |
|
Call the state machine step function.
Definition at line 151 of file state_machine.h. |