44 , currentMessage_(nullptr)
45 , currentPriority_(MAX_PRIORITY_)
51StateFlowWithQueue::~StateFlowWithQueue()
102#if OPENMRN_FEATURE_RTOS_FROM_ISR
103void StateFlowBase::notify_from_isr()
114#if OPENMRN_FEATURE_RTOS_FROM_ISR
115void StateFlowWithQueue::notify_from_isr()
#define STATE(_fn)
Turns a function name into an argument to be supplied to functions expecting a state.
See OSMutexLock in os/OS.hxx.
Abstract base class for all Buffers.
virtual void add(Executable *action, unsigned priority=UINT_MAX)=0
Send a message to this Executor's queue.
Collection of related state machines that pend on incoming messages.
ExecutorBase * executor()
Return type for a state flow callback.
Callback next_state()
Get the next state for the StateFlowAction.
Base class for state machines.
Action yield_and_call(Callback c)
Place the current flow to the back of the executor, and transition to a new state after we get the CP...
Service * service()
Return a pointer to the service I am bound to.
void run() override
Callback from the executor.
void notify() override
Wakeup call arrived.
Callback state_
current active state in the flow
Action wait()
Wait for an asynchronous call.
void reset_flow(Callback c)
Resets the flow to the specified state.
Action terminated()
Terminates the current StateFlow activity.
virtual QMember * queue_next(unsigned *priority)=0
Takes the front entry in the queue.
unsigned isWaiting_
True if we are in the pending state, waiting for an entry to show up in the queue.
void notify() override
Wakeup call arrived. Schedules *this on the executor.
StateFlowWithQueue(Service *service)
Constructor.
BufferBase * currentMessage_
Message we are currently processing.
static const unsigned MAX_PRIORITY_
Largest acceptable priority value for a stateflow.
unsigned currentPriority_
Priority of the current message we are processing.
virtual Action entry()=0
Entry into the StateFlow activity.
unsigned queueSize_
For debugging: how many entries are currently waiting in the queue of this stateflow.
#define HASSERT(x)
Checks that the value of expression x is true, else terminates the current process.