robo_fsm Struct Reference
[Finite State Machines]

Structure describing FSM. More...

#include <fsm.h>

List of all members.

Public Attributes

pthread_t threadid
 Thread running the FSM.
fsm_event sent_event
 Event sent to this FSM.
fsm_event event
 Event to be handled in state function.
struct timespec now
 Time when the event occurred.
struct timespec timeout
 Time of next timeout.
struct timespec timer
 Time of next timer expiration.
int(* state )(struct robo_fsm *fsm)
 Pointer to current state function.
int(* last_state )(struct robo_fsm *fsm)
 Pointer to previous state function.
int(* fnc_stack [10])(struct robo_fsm *fsm)
 Stack of sub-automaton states for use by FCALL() and SUBFSM_TRANSITION().
int(** fnc_sp )(struct robo_fsm *fsm)
 Pointer to the top of fnc_stack.
int debug_states
 Whether to print debug messages on state transitions.
char * debug_name
 The name of automaton (printed in debug messages).
Event sending synchronization
sem_t event_noticed
 This semaphore is "put" after a event is noticed by fsm and prepared for handling.
sem_t event_sent
 FSM wait on this semaphore while it waits for an event.


Detailed Description

Structure describing FSM.

Definition at line 172 of file fsm.h.


Member Data Documentation

pthread_t robo_fsm::threadid

Thread running the FSM.

Definition at line 173 of file fsm.h.

Referenced by fsm_start().

sem_t robo_fsm::event_noticed

This semaphore is "put" after a event is noticed by fsm and prepared for handling.

Take it to set new event in sent_event

Definition at line 179 of file fsm.h.

Referenced by __fsm_signal(), fsm_destroy(), fsm_init(), sem_timedwait_checked(), and sem_wait_checked().

sem_t robo_fsm::event_sent

FSM wait on this semaphore while it waits for an event.

Definition at line 181 of file fsm.h.

Referenced by __fsm_signal(), fsm_destroy(), fsm_init(), sem_wait_checked(), and wait_for_event().

fsm_event robo_fsm::event

Event to be handled in state function.

Definition at line 184 of file fsm.h.

Referenced by fsm_thread_routine(), and handle_event().

int(* robo_fsm::state)(struct robo_fsm *fsm)

Pointer to current state function.

This function is called when an event occurs.

Referenced by fsm_init(), and handle_event().

int(* robo_fsm::fnc_stack[10])(struct robo_fsm *fsm)

Stack of sub-automaton states for use by FCALL() and SUBFSM_TRANSITION().

Referenced by fsm_init().

int robo_fsm::debug_states

Whether to print debug messages on state transitions.

Definition at line 196 of file fsm.h.


The documentation for this struct was generated from the following file:
Generated on Thu Sep 13 11:28:29 2007 for DCE-Eurobot by  doxygen 1.5.3