OS  v1.7.5
Documentation
Loading...
Searching...
No Matches
qOS::sm Namespace Reference

Finite State Machine interfaces. More...

Classes

class  handler_t
 The state callback argument to handle the state-machine dynamics and provide execution information. Some methods can be written to perform state-transitions. More...
 
struct  signal_t
 The type to be used as a container variable for a signal. More...
 
class  signalPublisher
 An object to subscribe FSM(Finite State Machine) objects to specific user-defined signals. More...
 
struct  signalQueue
 The type of a FSM signal-queue. More...
 
class  state
 A state object. More...
 
class  timeoutSpec
 A FSM Timeout-specification object. More...
 
struct  timeoutStateDefinition
 This type should be used to define an item for a timeout-specification table. More...
 
struct  transition
 This structure should be used to define an item for a state transition table. More...
 

Typedefs

using signalIDType
 
using stateCallback_t
 Pointer to a function that represents a state callback.
 
using surroundingCallback_t
 Pointer to a function that represents a surrounding callback.
 
using signalAction_t
 Pointer to a function that represents a signal guard/action.
 
using timeoutSpecOption_t
 A typedef to hold the timeout specification options.
 

Enumerations

enum  signalID : signalIDType {
  SIGNAL_START , SIGNAL_EXIT , SIGNAL_ENTRY , SIGNAL_NONE ,
  SIGNAL_TIMEOUT0 , SIGNAL_TIMEOUT1 , SIGNAL_TIMEOUT2
}
 The type for signal ID. More...
 
enum  status : int16_t {
  BEFORE_ANY , ABSENT , FAILURE , SUCCESS ,
  SIGNAL_HANDLED
}
 This enumeration defines the built-in state-execution status values that can be used as return value in a state callback. More...
 
enum  historyMode : uint8_t { NO_HISTORY , SHALLOW_HISTORY , DEEP_HISTORY }
 This enumeration defines the possible modes to perform a transition to history. More...
 

Functions

constexpr signalID SIGNAL_TIMEOUT (index_t iTm)
 Built-in signal to indicate that a timeout expiration event occurs.
 
constexpr signalID SIGNAL_USER (uint32_t s)
 Function to define a user-defined signal.
 
constexpr timeoutSpecOption_t TIMEOUT_INDEX (index_t i)
 Timeout-specification option. Should be used only to specify which timeout signal to use.
 
constexpr timeoutSpecOption_t TIMEOUT_USE_SIGNAL (index_t i)
 Timeout-specification option. Should be used only to specify which timeout signal to use.
 

Variables

const timeoutSpecOption_t TIMEOUT_SET_ENTRY
 This timeout-specification option its used to specify that the engine should set the timeout when the specified state its entering.
 
const timeoutSpecOption_t TIMEOUT_RST_ENTRY
 This timeout-specification option its used to specify that the engine should reset the timeout when the specified state its entering.
 
const timeoutSpecOption_t TIMEOUT_SET_EXIT
 This timeout-specification option its used to specify that the engine should set the timeout when the specified state its exiting*.
 
const timeoutSpecOption_t TIMEOUT_RST_EXIT
 This timeout-specification option its used to specify that the engine should reset the timeout when the specified state its exiting*.
 
const timeoutSpecOption_t TIMEOUT_KEEP_IF_SET
 This timeout-specification option its used to specify that the engine should set the timeout only if it is in reset state.
 
const timeoutSpecOption_t TIMEOUT_PERIODIC
 This timeout-specification option its used setup the timeout in periodic mode.
 

Detailed Description

Finite State Machine interfaces.