#include "fsm.h"
#include <stdio.h>
Go to the source code of this file.
Defines | |
#define | E(name) case EV_##name: return "EV_" #name; |
Functions | |
const char * | fsm_common_event_str (enum fsm_common_events ev) |
int | fsm_nop_state (struct robo_fsm *fsm) |
Non operative state, do nothing. | |
static void | gettimeofday_ts (struct timespec *ts) |
void | __fsm_timespec_add_ms (struct timespec *ts, struct timespec *now, long ms) |
Set timespec to some time from now. | |
void | __fsm_timespec_invalidate (struct timespec *ts) |
static int | timespec_valid (struct timespec *ts) |
static int | timespec_cmp (struct timespec *ts1, struct timespec *ts2) |
static fsm_event | sem_wait_checked (struct robo_fsm *fsm) |
static fsm_event | sem_timedwait_checked (sem_t *sem, struct timespec *abs_timeout, struct robo_fsm *fsm, enum fsm_common_events timeout_event) |
static fsm_event | wait_for_event (struct robo_fsm *fsm) |
static void | handle_event (struct robo_fsm *fsm, fsm_event event) |
static void * | fsm_thread_routine (void *arg) |
FSM thread function. | |
void | fsm_init (struct robo_fsm *fsm, char *debug_name) |
FSM initialization. | |
int | fsm_start (struct robo_fsm *fsm, pthread_attr_t *attr) |
Starts previously initialized FSM. | |
int | fsm_destroy (struct robo_fsm *fsm) |
Deallocates all resources allocated by fsm_init(). |
Definition in file fsm.c.
void __fsm_timespec_add_ms | ( | struct timespec * | ts, | |
struct timespec * | now, | |||
long | ms | |||
) |