35#ifndef _EXECUTOR_POOLTOQUEUEFLOW_HXX_
36#define _EXECUTOR_POOLTOQUEUEFLOW_HXX_
#define STATE(_fn)
Turns a function name into an argument to be supplied to functions expecting a state.
Pool of fixed number of items which can be allocated up on request.
Abstract class for message recipients.
virtual void send(MessageType *message, unsigned priority=UINT_MAX)=0
Entry point to the flow.
This flow can be used to take all entries that show up in a FixedPool and send them (empty) to a stat...
Action got_entry()
Send the entry we got to the queue.
Action get_next_entry()
Allocates the next entry from the pool.
FixedPool * source_
The pool to read all entries from.
PoolToQueueFlow(Service *service, FixedPool *source, FlowInterface< T > *dest)
Constructor.
FlowInterface< T > * dest_
The queue to send all entries to.
Collection of related state machines that pend on incoming messages.
Return type for a state flow callback.
Base class for state machines.
Service * service()
Return a pointer to the service I am bound to.
Action allocate_and_call(FlowInterface< Buffer< T > > *target_flow, Callback c, Pool *pool=nullptr)
Allocates a buffer from a pool and proceed to the next state when allocation is successful.
Buffer< T > * get_allocation_result(FlowInterface< Buffer< T > > *target_flow)
Takes the result of the asynchronous allocation.