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 <Fw/FPrimeBasicTypes.hpp>
16 #include <Os/Queue.hpp>
17 #include <Os/Task.hpp>
18 
19 namespace Fw {
21  public:
22  // Note: Had to make MsgDispatchStatus public for LLVM.
23  typedef enum {
29 
30  protected:
31  QueuedComponentBase(const char* name);
32  virtual ~QueuedComponentBase();
33  void init(FwEnumStoreType instance);
36  virtual MsgDispatchStatus doDispatch() = 0;
37 #if FW_OBJECT_TO_STRING == 1
38  virtual const char* getToStringFormatString();
39 #endif
41  void incNumMsgDropped();
42  private:
43  FwSizeType m_msgsDropped;
44 };
45 
46 } // namespace Fw
47 #endif
virtual ~QueuedComponentBase()
Destructor.
PlatformSizeType FwSizeType
I32 FwEnumStoreType
Status
status returned from the queue send function
Definition: Queue.hpp:30
QueuedComponentBase(const char *name)
Constructor.
virtual MsgDispatchStatus doDispatch()=0
method to dispatch a single message in the queue.
Os::Queue m_queue
queue object for active component
void init()
Object initializer.
Definition: ObjBase.cpp:24
FwSizeType getNumMsgsDropped()
return number of messages dropped
Os::Queue::Status createQueue(FwSizeType depth, FwSizeType msgSize)
A message was sent requesting an exit of the loop.
void incNumMsgDropped()
increment the number of messages dropped