F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
Fw::QueuedComponentBase Class Referenceabstract

#include <Fw/Comp/QueuedComponentBase.hpp>

Inheritance diagram for Fw::QueuedComponentBase:
Fw::PassiveComponentBase Fw::ObjBase Fw::ActiveComponentBase Svc::HealthComponentBase Svc::ActivePhaserComponentBase Svc::ActiveRateGroupComponentBase Svc::ActiveTextLoggerComponentBase Svc::BufferAccumulatorComponentBase Svc::BufferLoggerComponentBase Svc::CmdSequencerComponentBase Svc::ComAggregatorComponentBase Svc::ComLoggerComponentBase Svc::CommandDispatcherComponentBase Svc::ComQueueComponentBase Svc::DpCatalogComponentBase Svc::DpManagerComponentBase Svc::DpWriterComponentBase Svc::EventManagerComponentBase Svc::FileDispatcherComponentBase Svc::FileDownlinkComponentBase Svc::FileManagerComponentBase Svc::FileUplinkComponentBase Svc::FileWorkerComponentBase Svc::FpySequencerComponentBase Svc::PrmDbComponentBase Svc::SeqDispatcherComponentBase Svc::TlmChanComponentBase Svc::TlmPacketizerComponentBase Svc::HealthImpl

Public Types

enum  MsgDispatchStatus { MSG_DISPATCH_OK, MSG_DISPATCH_EMPTY, MSG_DISPATCH_ERROR, MSG_DISPATCH_EXIT }
 

Public Member Functions

void deinit () override
 Allows de-initialization on teardown. More...
 
- Public Member Functions inherited from Fw::PassiveComponentBase
void setIdBase (const FwIdType)
 Set the ID base. More...
 
FwIdType getIdBase () const
 

Protected Member Functions

 QueuedComponentBase (const char *name)
 Constructor. More...
 
virtual ~QueuedComponentBase ()
 Destructor. More...
 
void init (FwEnumStoreType instance)
 initialization function More...
 
Os::Queue::Status createQueue (FwSizeType depth, FwSizeType msgSize)
 
virtual MsgDispatchStatus doDispatch ()=0
 method to dispatch a single message in the queue. More...
 
MsgDispatchStatus dispatchAvailableMessages ()
 dispatches all messages currently in the queue, returning status of the dispatch More...
 
FwSizeType getNumMsgsDropped ()
 return number of messages dropped More...
 
void incNumMsgDropped ()
 increment the number of messages dropped More...
 
- Protected Member Functions inherited from Fw::PassiveComponentBase
 PassiveComponentBase (const char *name)
 Named constructor. More...
 
virtual ~PassiveComponentBase ()
 Destructor. More...
 
void init (FwEnumStoreType instance)
 Initialization function. More...
 
FwEnumStoreType getInstance () const
 
- Protected Member Functions inherited from Fw::ObjBase
 ObjBase (const char *name)
 ObjBase constructor. More...
 
virtual ~ObjBase ()
 Destructor. More...
 
void init ()
 Object initializer. More...
 

Protected Attributes

Os::Queue m_queue
 queue object for active component More...
 

Detailed Description

Definition at line 20 of file QueuedComponentBase.hpp.

Member Enumeration Documentation

◆ MsgDispatchStatus

Enumerator
MSG_DISPATCH_OK 

Dispatch was normal.

MSG_DISPATCH_EMPTY 

No more messages in the queue.

MSG_DISPATCH_ERROR 

Errors dispatching messages.

MSG_DISPATCH_EXIT 

A message was sent requesting an exit of the loop.

Definition at line 23 of file QueuedComponentBase.hpp.

Constructor & Destructor Documentation

◆ QueuedComponentBase()

Fw::QueuedComponentBase::QueuedComponentBase ( const char *  name)
protected

Constructor.

Definition at line 10 of file QueuedComponentBase.cpp.

◆ ~QueuedComponentBase()

Fw::QueuedComponentBase::~QueuedComponentBase ( )
protectedvirtual

Destructor.

Definition at line 12 of file QueuedComponentBase.cpp.

Member Function Documentation

◆ createQueue()

Os::Queue::Queue::Status Fw::QueuedComponentBase::createQueue ( FwSizeType  depth,
FwSizeType  msgSize 
)
protected

Definition at line 28 of file QueuedComponentBase.cpp.

◆ deinit()

void Fw::QueuedComponentBase::deinit ( )
overridevirtual

Allows de-initialization on teardown.

Reimplemented from Fw::PassiveComponentBase.

Reimplemented in Svc::FileDownlink.

Definition at line 18 of file QueuedComponentBase.cpp.

◆ dispatchAvailableMessages()

Fw::QueuedComponentBase::MsgDispatchStatus Fw::QueuedComponentBase::dispatchAvailableMessages ( )
protected

dispatches all messages currently in the queue, returning status of the dispatch

This method will dispatch once for each of the messages in the queue at the time of the call. It will continue to dispatch until all messages have been dispatched or a dispatch returns a status other than MSG_DISPATCH_OK.

Returns
status of the dispatch

Definition at line 46 of file QueuedComponentBase.cpp.

◆ doDispatch()

virtual MsgDispatchStatus Fw::QueuedComponentBase::doDispatch ( )
protectedpure virtual

method to dispatch a single message in the queue.

Implemented in Svc::HealthComponentBase.

◆ getNumMsgsDropped()

FwSizeType Fw::QueuedComponentBase::getNumMsgsDropped ( )
protected

return number of messages dropped

Definition at line 38 of file QueuedComponentBase.cpp.

◆ incNumMsgDropped()

void Fw::QueuedComponentBase::incNumMsgDropped ( )
protected

increment the number of messages dropped

Definition at line 42 of file QueuedComponentBase.cpp.

◆ init()

void Fw::QueuedComponentBase::init ( FwEnumStoreType  instance)
protected

initialization function

Definition at line 14 of file QueuedComponentBase.cpp.

Member Data Documentation

◆ m_queue

Os::Queue Fw::QueuedComponentBase::m_queue
protected

queue object for active component

Definition at line 35 of file QueuedComponentBase.hpp.


The documentation for this class was generated from the following files: