|
| typedef Base::Action | Action |
| | Allows using Action without having StateFlowBase:: prefix in front of it.
|
| |
| typedef MessageType | message_type |
| | Stores the message template type for external reference.
|
| |
| template<class T , typename... Args> |
| static void | invoke_subflow_and_ignore_result (FlowInterface< Buffer< T > > *target_flow, Args &&... args) |
| | Calls a helper flow to perform some actions.
|
| |
| static StateFlowWithQueue * | link_head () |
| |
| static Atomic * | head_mu () |
| | Locks the list for modification (at any entry!).
|
| |
| static MessageType * | cast_alloc (QMember *entry) |
| | Down casts and initializes an asynchronous allocation result to the appropriate flow's buffer type.
|
| |
| typedef Action(StateFlowBase::* | Callback) () |
| | State Flow callback prototype.
|
| |
| typedef Action(StateFlowBase::* | Callback) () |
| | State Flow callback prototype.
|
| |
| void | release () OVERRIDE |
| | Unrefs the current buffer.
|
| |
| void | return_buffer () |
| | For state flows that are operated using invoke_subflow_and_wait this is a way to hand back the buffer to the caller.
|
| |
| MessageType * | message () |
| |
| MessageType * | transfer_message () |
| | Releases ownership of the current message.
|
| |
| void | send (BufferBase *msg, unsigned priority=UINT_MAX) |
| | Sends a message to the state flow for processing.
|
| |
| QMember * | queue_next (unsigned *priority) OVERRIDE |
| | Takes the front entry in the queue.
|
| |
| bool | queue_empty () OVERRIDE |
| |
| Action | call_immediately (Callback c) |
| | Imediately call the next state upon return.
|
| |
| | StateFlowWithQueue (Service *service) |
| | Constructor.
|
| |
| Action | exit () |
| | Terminates the processing of this flow.
|
| |
| Action | release_and_exit () |
| | Terminates the processing of the current message.
|
| |
| BufferBase * | message () |
| |
| BufferBase * | transfer_message () |
| | Releases ownership of the current message.
|
| |
| void | reset_message (BufferBase *message, unsigned priority) |
| | Sets the current message being processed.
|
| |
| unsigned | priority () |
| |
| void | set_priority (unsigned priority) |
| | Overrides the current priority.
|
| |
| void | start_flow_at_init (Callback c) |
| | Call this from the constructor of the child class to do some work before the main queue processing loop begins.
|
| |
| | StateFlowBase (Service *service) |
| | Constructor.
|
| |
| | ~StateFlowBase () |
| | Destructor.
|
| |
| void | reset_flow (Callback c) |
| | Resets the flow to the specified state.
|
| |
| bool | is_state (Callback c) |
| |
| bool | is_terminated () |
| |
| void | start_flow (Callback c) |
| | Resets the flow to the specified state and starts it.
|
| |
| Action | again () |
| | Call the current state again via call_immediately.
|
| |
| Action | exit () |
| | Terminate current StateFlow activity.
|
| |
| Action | delete_this () |
| | Terminates the flow and deletes *this.
|
| |
| Action | set_terminated () |
| | Sets the flow to terminated state.
|
| |
| Action | call_immediately (Callback c) |
| | Imediately call the next state upon return.
|
| |
| Action | wait () |
| | Wait for an asynchronous call.
|
| |
| Action | wait_and_call (Callback c) |
| | Wait for resource to become available before proceeding to next state.
|
| |
| template<class T > |
| 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.
|
| |
| Action | allocate_and_call (Callback c, QAsync *queue) |
| | Allocates an entry from an asynchronous queue, and transitions to a state once the allocation is complete.
|
| |
| template<class T > |
| Buffer< T > * | full_allocation_result (FlowInterface< Buffer< T > > *target_flow) |
| | Takes the result of the asynchronous allocation without resetting the object.
|
| |
| template<class T > |
| T * | full_allocation_result (TypedQAsync< T > *queue) |
| | Takes the result of the asynchronous allocation without resetting the object.
|
| |
| template<class T > |
| void | cast_allocation_result (T **member) |
| | Takes the result of the asynchronous allocation without resetting the object.
|
| |
| template<class T > |
| Buffer< T > * | get_allocation_result (FlowInterface< Buffer< T > > *target_flow) |
| | Takes the result of the asynchronous allocation.
|
| |
| 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 CPU again.
|
| |
| Action | yield () |
| | Place the current flow to the back of the executor, and re-try the current state after we get the CPU again.
|
| |
| Action | sleep_and_call (::Timer *timer, long long timeout_nsec, Callback c) |
| | Suspends execution of this control flow for a specified time.
|
| |
| template<class T , typename... Args> |
| Action | invoke_subflow_and_wait (FlowInterface< Buffer< T > > *target_flow, Callback c, Args &&... args) |
| | Calls a helper flow to perform some actions.
|
| |
| Action | read_repeated (StateFlowSelectHelper *helper, int fd, void *buf, size_t size, Callback c, unsigned priority=Selectable::MAX_PRIO) |
| | Blocks until size bytes are read and then invokes the next state.
|
| |
| Action | read_single (StateFlowSelectHelper *helper, int fd, void *buf, size_t size, Callback c, unsigned priority=Selectable::MAX_PRIO) |
| | Attempts to read at most size_t bytes, and blocks the caller until at least one byte is read.
|
| |
| Action | read_nonblocking (StateFlowSelectHelper *helper, int fd, void *buf, size_t size, Callback c, unsigned priority=Selectable::MAX_PRIO) |
| | Attempts to read at most size bytes, and then invokes the next state, even if only zero bytes are available right now.
|
| |
| Action | read_repeated_with_timeout (StateFlowTimedSelectHelper *helper, long long timeout_nsec, int fd, void *buf, size_t size, Callback c, unsigned priority=Selectable::MAX_PRIO) |
| | Blocks until size bytes are read, or a timeout expires.
|
| |
| Action | internal_try_read () |
| | Implementation state that gets repeatedly called upon every wakeup and tries to make progress on reading.
|
| |
| Action | write_repeated (StateFlowSelectHelper *helper, int fd, const void *buf, size_t size, Callback c, unsigned priority=Selectable::MAX_PRIO) |
| | Writes some data into a file descriptor, repeating the operation as necessary until all bytes are written.
|
| |
| Action | internal_try_write () |
| | Implementation state that gets repeatedly called upon every wakeup and tries to make progress on writing.
|
| |
| | QMember () |
| | Constructor.
|
| |
| | ~QMember () |
| | Destructor.
|
| |
| void | lock () |
| |
| void | unlock () |
| |
| StateFlowWithQueue * | link_this () |
| |
| | LinkedObject () |
| | Constructor. Puts *this on the linked list.
|
| |
| | ~LinkedObject () |
| | Constructor. Removes *this from the linked list.
|
| |
| StateFlowWithQueue * | link_next () |
| |
| static StateFlowWithQueue * | link_head () |
| |
| static Atomic * | head_mu () |
| | Locks the list for modification (at any entry!).
|
| |
| QMember * | next |
| | pointer to the next member in the queue
|
| |
| StateFlowWithQueue * | link_ |
| | Linked list pointer.
|
| |
| static StateFlowWithQueue * | head_ |
| | Beginning of the list.
|
| |
Proxy class for sending canbus traffic to the Bootloader HAL.
Definition at line 44 of file BootloaderPort.hxx.