F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
QueuedComponentBase.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_QUEUED_COMPONENT_BASE_HPP
12 #define FW_QUEUED_COMPONENT_BASE_HPP
13 
15 #include <Os/Queue.hpp>
16 #include <Os/Task.hpp>
17 #include <FpConfig.hpp>
18 
19 
20 namespace Fw {
22  public:
23 
24  // Note: Had to make MsgDispatchStatus public for LLVM.
25  typedef enum {
31 
32  PROTECTED:
33  QueuedComponentBase(const char* name);
34  virtual ~QueuedComponentBase();
35  void init(FwEnumStoreType instance);
38  virtual MsgDispatchStatus doDispatch()=0;
39 #if FW_OBJECT_TO_STRING == 1
40  virtual const char* getToStringFormatString();
41 #endif
43  void incNumMsgDropped();
44  PRIVATE:
45  FwSizeType m_msgsDropped;
46  };
47 
48 }
49 #endif
virtual ~QueuedComponentBase()
Destructor.
Status
status returned from the queue send function
Definition: Queue.hpp:30
QueuedComponentBase(const char *name)
Constructor.
PlatformSizeType FwSizeType
Definition: FpConfig.h:35
virtual MsgDispatchStatus doDispatch()=0
method to dispatch a single message in the queue.
I32 FwEnumStoreType
Definition: FpConfig.h:64
Os::Queue m_queue
queue object for active component
void init()
Object initializer.
Definition: ObjBase.cpp:26
FwSizeType getNumMsgsDropped()
return number of messages dropped
Os::Queue::Status createQueue(FwSizeType depth, FwSizeType msgSize)
C++-compatible configuration header for fprime configuration.
A message was sent requesting an exit of the loop.
void incNumMsgDropped()
increment the number of messages dropped