feisty meow concerns codebase  2.140
state_machine.cpp File Reference
#include "state_machine.h"
#include <basis/array.h>
#include <basis/functions.h>
#include <basis/guards.h>
#include <basis/astring.h>
#include <loggers/program_wide_logger.h>
#include <timely/time_stamp.h>
Include dependency graph for state_machine.cpp:

Go to the source code of this file.

Namespaces

 processes
 

Macros

#define LOG(to_print)   CLASS_EMERGENCY_LOG(program_wide_logger::get(), to_print)
 
#define CHECK_VALID(m)
 
#define CHECK_STATES
 
#define MOVE_STATE(m, next, type, trigger)
 
#define FIND_STATE(state)
 

Macro Definition Documentation

◆ CHECK_STATES

#define CHECK_STATES
Value:
if (!current) return false; \
if (!next) return false; \
int indy = state_index(current); \
if (negative(indy)) return false; \
if (negative(state_index(next))) return false
bool negative(const type &a)
negative returns true if "a" is less than zero.
Definition: functions.h:43

Definition at line 51 of file state_machine.cpp.

◆ CHECK_VALID

#define CHECK_VALID (   m)
Value:
if (!m._current) return false; \
if (!m._last) return false

Definition at line 46 of file state_machine.cpp.

◆ FIND_STATE

#define FIND_STATE (   state)
Value:
int indy = state_index(state); \
if (negative(indy)) return

Definition at line 67 of file state_machine.cpp.

◆ LOG

#define LOG (   to_print)    CLASS_EMERGENCY_LOG(program_wide_logger::get(), to_print)

Definition at line 38 of file state_machine.cpp.

◆ MOVE_STATE

#define MOVE_STATE (   m,
  next,
  type,
  trigger 
)
Value:
m._last = m._current; \
m._current = next; \
m._type = type; \
m._trig = trigger; \
m._start->reset()

Definition at line 59 of file state_machine.cpp.