11 #ifndef FW_ACTIVE_COMPONENT_BASE_HPP 12 #define FW_ACTIVE_COMPONENT_BASE_HPP 53 #if FW_OBJECT_TO_STRING == 1 54 virtual const char* getToStringFormatString();
58 static void s_taskStateMachine(
void*);
59 static void s_taskLoop(
void*);
static constexpr FwSizeType TASK_DEFAULT
PlatformTaskIdType FwTaskIdType
The type of task priorities used.
Lifecycle
Tracks the lifecycle of the component.
Os::Task m_task
task object for active component
PlatformSizeType FwSizeType
message to exit active component task
void exit()
exit task in active component
Initial stage, call preamble.
void init()
Object initializer.
static constexpr FwTaskPriorityType TASK_PRIORITY_DEFAULT
virtual void finalizer()
A function that will be called after exiting the loop.
ActiveComponentBase(const char *name)
Constructor.
PlatformTaskPriorityType FwTaskPriorityType
The type of task priorities used.
virtual void preamble()
A function that will be called before the event loop is entered.
MsgDispatchStatus dispatch()
The function that will dispatching messages.
virtual ~ActiveComponentBase()
Destructor.
Os::Task::Status join()
Join the thread.
DEPRECATED(Os::Task::Status join(void **value_ptr), "Switch to .join()")
Join to thread with discarded value_ptr.
Component is dispatching messages.
void start(FwTaskPriorityType priority=Os::Task::TASK_PRIORITY_DEFAULT, FwSizeType stackSize=Os::Task::TASK_DEFAULT, FwSizeType cpuAffinity=Os::Task::TASK_DEFAULT, FwTaskIdType identifier=static_cast< FwTaskIdType >(Os::Task::TASK_DEFAULT))
called by instantiator when task is to be started
Implementation of malloc based allocator.
Penultimate stage, call finalizer.