F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
Svc::DpWriter Class Reference

#include <Svc/DpWriter/DpWriter.hpp>

Inheritance diagram for Svc::DpWriter:
Svc::DpWriterComponentBase Fw::ActiveComponentBase Fw::QueuedComponentBase Fw::PassiveComponentBase Fw::ObjBase

Public Member Functions

 DpWriter (const char *const compName)
 
 ~DpWriter ()
 
void configure (const Fw::StringBase &dpFileNamePrefix)
 Configure writer. More...
 
- Public Member Functions inherited from Svc::DpWriterComponentBase
void init (FwSizeType queueDepth, FwEnumStoreType instance=0)
 Initialize DpWriterComponentBase object. More...
 
Fw::InputCmdPortget_cmdIn_InputPort (FwIndexType portNum)
 
Fw::InputBufferSendPortget_bufferSendIn_InputPort (FwIndexType portNum)
 
Svc::InputSchedPortget_schedIn_InputPort (FwIndexType portNum)
 
void set_cmdRegIn_OutputPort (FwIndexType portNum, Fw::InputCmdRegPort *port)
 Connect port to cmdRegIn[portNum]. More...
 
void set_cmdResponseOut_OutputPort (FwIndexType portNum, Fw::InputCmdResponsePort *port)
 Connect port to cmdResponseOut[portNum]. More...
 
void set_eventOut_OutputPort (FwIndexType portNum, Fw::InputLogPort *port)
 Connect port to eventOut[portNum]. More...
 
void set_timeGetOut_OutputPort (FwIndexType portNum, Fw::InputTimePort *port)
 Connect port to timeGetOut[portNum]. More...
 
void set_tlmOut_OutputPort (FwIndexType portNum, Fw::InputTlmPort *port)
 Connect port to tlmOut[portNum]. More...
 
void set_deallocBufferSendOut_OutputPort (FwIndexType portNum, Fw::InputBufferSendPort *port)
 Connect port to deallocBufferSendOut[portNum]. More...
 
void set_dpWrittenOut_OutputPort (FwIndexType portNum, Svc::InputDpWrittenPort *port)
 Connect port to dpWrittenOut[portNum]. More...
 
void set_procBufferSendOut_OutputPort (FwIndexType portNum, Fw::InputBufferSendPort *port)
 Connect port to procBufferSendOut[portNum]. More...
 
void regCommands ()
 Register commands with the Command Dispatcher. More...
 
- Public Member Functions inherited from Fw::ActiveComponentBase
void start (Os::Task::ParamType priority=Os::Task::TASK_DEFAULT, Os::Task::ParamType stackSize=Os::Task::TASK_DEFAULT, Os::Task::ParamType cpuAffinity=Os::Task::TASK_DEFAULT, Os::Task::ParamType identifier=Os::Task::TASK_DEFAULT)
 called by instantiator when task is to be started More...
 
void exit ()
 exit task in active component More...
 
Os::Task::Status join ()
 Join the thread. More...
 
 DEPRECATED (Os::Task::Status join(void **value_ptr), "Switch to .join()")
 Join to thread with discarded value_ptr. More...
 
- Public Member Functions inherited from Fw::PassiveComponentBase
void setIdBase (const U32)
 Set the ID base. More...
 
U32 getIdBase () const
 

Additional Inherited Members

- Public Types inherited from Fw::ActiveComponentBase
enum  { ACTIVE_COMPONENT_EXIT }
 
- Public Types inherited from Fw::QueuedComponentBase
enum  MsgDispatchStatus { MSG_DISPATCH_OK , MSG_DISPATCH_EMPTY , MSG_DISPATCH_ERROR , MSG_DISPATCH_EXIT }
 
- Protected Types inherited from Svc::DpWriterComponentBase
enum  { NUM_CMDIN_INPUT_PORTS = 1 }
 Enumerations for numbers of special input ports. More...
 
enum  { NUM_BUFFERSENDIN_INPUT_PORTS = 1 , NUM_SCHEDIN_INPUT_PORTS = 1 }
 Enumerations for numbers of typed input ports. More...
 
enum  {
  NUM_CMDREGIN_OUTPUT_PORTS = 1 , NUM_CMDRESPONSEOUT_OUTPUT_PORTS = 1 , NUM_EVENTOUT_OUTPUT_PORTS = 1 , NUM_TEXTEVENTOUT_OUTPUT_PORTS = 1 ,
  NUM_TIMEGETOUT_OUTPUT_PORTS = 1 , NUM_TLMOUT_OUTPUT_PORTS = 1
}
 Enumerations for numbers of special output ports. More...
 
enum  { NUM_DEALLOCBUFFERSENDOUT_OUTPUT_PORTS = 1 , NUM_DPWRITTENOUT_OUTPUT_PORTS = 1 , NUM_PROCBUFFERSENDOUT_OUTPUT_PORTS = 5 }
 Enumerations for numbers of typed output ports. More...
 
enum  { OPCODE_CLEAR_EVENT_THROTTLE = 0x0 }
 Command opcodes. More...
 
enum  {
  EVENTID_INVALIDBUFFER = 0x0 , EVENTID_BUFFERTOOSMALLFORPACKET = 0x1 , EVENTID_INVALIDHEADERHASH = 0x2 , EVENTID_INVALIDHEADER = 0x3 ,
  EVENTID_BUFFERTOOSMALLFORDATA = 0x4 , EVENTID_FILEOPENERROR = 0x5 , EVENTID_FILEWRITEERROR = 0x6 , EVENTID_FILEWRITTEN = 0x7
}
 Event IDs. More...
 
enum  {
  EVENTID_INVALIDBUFFER_THROTTLE = 10 , EVENTID_BUFFERTOOSMALLFORPACKET_THROTTLE = 10 , EVENTID_INVALIDHEADERHASH_THROTTLE = 10 , EVENTID_INVALIDHEADER_THROTTLE = 10 ,
  EVENTID_BUFFERTOOSMALLFORDATA_THROTTLE = 10 , EVENTID_FILEOPENERROR_THROTTLE = 10 , EVENTID_FILEWRITEERROR_THROTTLE = 10
}
 Event throttle values: sets initial value of countdown variables. More...
 
enum  {
  CHANNELID_NUMBUFFERSRECEIVED = 0x0 , CHANNELID_NUMBYTESWRITTEN = 0x1 , CHANNELID_NUMSUCCESSFULWRITES = 0x2 , CHANNELID_NUMFAILEDWRITES = 0x3 ,
  CHANNELID_NUMERRORS = 0x4
}
 Channel IDs. More...
 
- Protected Types inherited from Fw::ActiveComponentBase
enum  Lifecycle { CREATED , DISPATCHING , FINALIZING , DONE }
 Tracks the lifecycle of the component. More...
 
- Protected Member Functions inherited from Svc::DpWriterComponentBase
 DpWriterComponentBase (const char *compName="")
 Construct DpWriterComponentBase object. More...
 
virtual ~DpWriterComponentBase ()
 Destroy DpWriterComponentBase object. More...
 
FwIndexType getNum_cmdIn_InputPorts () const
 
FwIndexType getNum_bufferSendIn_InputPorts () const
 
FwIndexType getNum_schedIn_InputPorts () const
 
FwIndexType getNum_cmdRegIn_OutputPorts () const
 
FwIndexType getNum_cmdResponseOut_OutputPorts () const
 
FwIndexType getNum_eventOut_OutputPorts () const
 
FwIndexType getNum_timeGetOut_OutputPorts () const
 
FwIndexType getNum_tlmOut_OutputPorts () const
 
FwIndexType getNum_deallocBufferSendOut_OutputPorts () const
 
FwIndexType getNum_dpWrittenOut_OutputPorts () const
 
FwIndexType getNum_procBufferSendOut_OutputPorts () const
 
bool isConnected_cmdRegIn_OutputPort (FwIndexType portNum)
 
bool isConnected_cmdResponseOut_OutputPort (FwIndexType portNum)
 
bool isConnected_eventOut_OutputPort (FwIndexType portNum)
 
bool isConnected_timeGetOut_OutputPort (FwIndexType portNum)
 
bool isConnected_tlmOut_OutputPort (FwIndexType portNum)
 
bool isConnected_deallocBufferSendOut_OutputPort (FwIndexType portNum)
 
bool isConnected_dpWrittenOut_OutputPort (FwIndexType portNum)
 
bool isConnected_procBufferSendOut_OutputPort (FwIndexType portNum)
 
void bufferSendIn_handlerBase (FwIndexType portNum, Fw::Buffer &fwBuffer)
 Handler base-class function for input port bufferSendIn. More...
 
void schedIn_handlerBase (FwIndexType portNum, U32 context)
 Handler base-class function for input port schedIn. More...
 
virtual void bufferSendIn_preMsgHook (FwIndexType portNum, Fw::Buffer &fwBuffer)
 Pre-message hook for async input port bufferSendIn. More...
 
virtual void schedIn_preMsgHook (FwIndexType portNum, U32 context)
 Pre-message hook for async input port schedIn. More...
 
void deallocBufferSendOut_out (FwIndexType portNum, Fw::Buffer &fwBuffer)
 Invoke output port deallocBufferSendOut. More...
 
void dpWrittenOut_out (FwIndexType portNum, const Fw::StringBase &fileName, FwDpPriorityType priority, FwSizeType size)
 Invoke output port dpWrittenOut. More...
 
void procBufferSendOut_out (FwIndexType portNum, Fw::Buffer &fwBuffer)
 Invoke output port procBufferSendOut. More...
 
void cmdResponse_out (FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
 Emit command response. More...
 
void CLEAR_EVENT_THROTTLE_cmdHandlerBase (FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
 
virtual void CLEAR_EVENT_THROTTLE_preMsgHook (FwOpcodeType opCode, U32 cmdSeq)
 Pre-message hook for command CLEAR_EVENT_THROTTLE. More...
 
void log_WARNING_HI_InvalidBuffer ()
 
void log_WARNING_HI_BufferTooSmallForPacket (U32 bufferSize, U32 minSize)
 
void log_WARNING_HI_InvalidHeaderHash (U32 bufferSize, U32 storedHash, U32 computedHash)
 
void log_WARNING_HI_InvalidHeader (U32 bufferSize, U32 errorCode)
 
void log_WARNING_HI_BufferTooSmallForData (U32 bufferSize, U32 minSize)
 
void log_WARNING_HI_FileOpenError (U32 status, const Fw::StringBase &file)
 
void log_WARNING_HI_FileWriteError (U32 status, U32 bytesWritten, U32 bytesToWrite, const Fw::StringBase &file)
 
void log_ACTIVITY_LO_FileWritten (U32 bytes, const Fw::StringBase &file)
 
void log_WARNING_HI_InvalidBuffer_ThrottleClear ()
 Reset throttle value for InvalidBuffer. More...
 
void log_WARNING_HI_BufferTooSmallForPacket_ThrottleClear ()
 Reset throttle value for BufferTooSmallForPacket. More...
 
void log_WARNING_HI_InvalidHeaderHash_ThrottleClear ()
 Reset throttle value for InvalidHeaderHash. More...
 
void log_WARNING_HI_InvalidHeader_ThrottleClear ()
 Reset throttle value for InvalidHeader. More...
 
void log_WARNING_HI_BufferTooSmallForData_ThrottleClear ()
 Reset throttle value for BufferTooSmallForData. More...
 
void log_WARNING_HI_FileOpenError_ThrottleClear ()
 Reset throttle value for FileOpenError. More...
 
void log_WARNING_HI_FileWriteError_ThrottleClear ()
 Reset throttle value for FileWriteError. More...
 
void tlmWrite_NumBuffersReceived (U32 arg, Fw::Time _tlmTime=Fw::Time())
 
void tlmWrite_NumBytesWritten (U64 arg, Fw::Time _tlmTime=Fw::Time())
 
void tlmWrite_NumSuccessfulWrites (U32 arg, Fw::Time _tlmTime=Fw::Time())
 
void tlmWrite_NumFailedWrites (U32 arg, Fw::Time _tlmTime=Fw::Time())
 
void tlmWrite_NumErrors (U32 arg, Fw::Time _tlmTime=Fw::Time())
 
Fw::Time getTime ()
 
- Protected Member Functions inherited from Fw::ActiveComponentBase
 ActiveComponentBase (const char *name)
 Constructor. More...
 
virtual ~ActiveComponentBase ()
 Destructor. More...
 
void init (NATIVE_INT_TYPE instance)
 initialization code More...
 
virtual void preamble ()
 A function that will be called before the event loop is entered. More...
 
MsgDispatchStatus dispatch ()
 The function that will dispatching messages. More...
 
virtual void finalizer ()
 A function that will be called after exiting the loop. More...
 
- Protected Member Functions inherited from Fw::QueuedComponentBase
 QueuedComponentBase (const char *name)
 Constructor. More...
 
virtual ~QueuedComponentBase ()
 Destructor. More...
 
void init (NATIVE_INT_TYPE instance)
 initialization function More...
 
Os::Queue::Status createQueue (FwSizeType depth, FwSizeType msgSize)
 
NATIVE_INT_TYPE 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 (NATIVE_INT_TYPE instance)
 Initialization function. More...
 
NATIVE_INT_TYPE 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 inherited from Fw::ActiveComponentBase
Os::Task m_task
 task object for active component More...
 
- Protected Attributes inherited from Fw::QueuedComponentBase
Os::Queue m_queue
 queue object for active component More...
 

Detailed Description

Definition at line 20 of file DpWriter.hpp.

Constructor & Destructor Documentation

◆ DpWriter()

Svc::DpWriter::DpWriter ( const char *const  compName)

Construct object DpWriter

Parameters
compNameThe component name

Definition at line 22 of file DpWriter.cpp.

◆ ~DpWriter()

Svc::DpWriter::~DpWriter ( )

Destroy object DpWriter

Definition at line 24 of file DpWriter.cpp.

Member Function Documentation

◆ configure()

void Svc::DpWriter::configure ( const Fw::StringBase dpFileNamePrefix)

Configure writer.

Parameters
dpFileNamePrefixThe file name prefix for writing DP files

Definition at line 26 of file DpWriter.cpp.


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