F´ Flight Software - C/C++ Documentation NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
ActiveComponentBase.hpp
Go to the documentation of this file.
1/*
2 * ActiveComponentBase.hpp
3 *
4 * Created on: Aug 14, 2012
5 * Author: tcanham
6 */
7
8/*
9 * Description:
10 */
11#ifndef FW_ACTIVE_COMPONENT_BASE_HPP
12#define FW_ACTIVE_COMPONENT_BASE_HPP
13
15#include <Os/Task.hpp>
16#include <FpConfig.hpp>
17#include <Fw/Deprecate.hpp>
18
19namespace Fw {
21 public:
23
24 DEPRECATED(void start(NATIVE_INT_TYPE identifier, NATIVE_INT_TYPE priority, NATIVE_INT_TYPE stackSize, NATIVE_INT_TYPE cpuAffinity = -1),
25 "Please switch to start(NATIVE_UINT_TYPE priority, NATIVE_UINT_TYPE stackSize, NATIVE_UINT_TYPE cpuAffinity, NATIVE_UINT_TYPE identifier)");
26 void exit();
27 Os::Task::TaskStatus join(void **value_ptr);
28
29 enum {
31 };
32
33 PROTECTED:
34 ActiveComponentBase(const char* name);
35 virtual ~ActiveComponentBase();
36 void init(NATIVE_INT_TYPE instance);
37 virtual void preamble();
38 virtual void loop();
39 virtual void finalizer();
41#if FW_OBJECT_TO_STRING == 1
42 virtual void toString(char* str, NATIVE_INT_TYPE size);
43#endif
44 PRIVATE:
45 static void s_baseTask(void*);
46 static void s_baseBareTask(void*);
47 };
48
49}
50#endif
PlatformIntType NATIVE_INT_TYPE
Definition BasicTypes.h:51
PlatformUIntType NATIVE_UINT_TYPE
Definition BasicTypes.h:52
C++-compatible configuration header for fprime configuration.
@ ACTIVE_COMPONENT_EXIT
message to exit active component task
Os::Task m_task
task object for active component
void exit()
exit task in active component
virtual ~ActiveComponentBase()
Destructor.
void start(NATIVE_UINT_TYPE priority=Os::Task::TASK_DEFAULT, NATIVE_UINT_TYPE stackSize=Os::Task::TASK_DEFAULT, NATIVE_UINT_TYPE cpuAffinity=Os::Task::TASK_DEFAULT, NATIVE_UINT_TYPE identifier=Os::Task::TASK_DEFAULT)
called by instantiator when task is to be started
Os::Task::TaskStatus join(void **value_ptr)
provide return value of thread if value_ptr is not NULL
DEPRECATED(void start(NATIVE_INT_TYPE identifier, NATIVE_INT_TYPE priority, NATIVE_INT_TYPE stackSize, NATIVE_INT_TYPE cpuAffinity=-1), "Please switch to start(NATIVE_UINT_TYPE priority, NATIVE_UINT_TYPE stackSize, NATIVE_UINT_TYPE cpuAffinity, NATIVE_UINT_TYPE identifier)")
called by instantiator when task is to be started
virtual void loop()
The function that will loop dispatching messages.
virtual void finalizer()
A function that will be called after exiting the loop.
virtual void preamble()
A function that will be called before the event loop is entered.
void init()
Object initializer.
Definition ObjBase.cpp:27
forward declaration
Definition Task.hpp:15
static const NATIVE_UINT_TYPE TASK_DEFAULT
Definition Task.hpp:17
TaskStatus
Definition Task.hpp:18
Definition Buffer.cpp:21