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

#include <Svc/DpCatalog/DpCatalog.hpp>

Inheritance diagram for Svc::DpCatalog:
Svc::DpCatalogComponentBase Fw::ActiveComponentBase Fw::QueuedComponentBase Fw::PassiveComponentBase Fw::ObjBase

Public Member Functions

 DpCatalog (const char *const compName)
 DpCatalog constructor. More...
 
 ~DpCatalog ()
 DpCatalog destructor. More...
 
void configure (Fw::FileNameString directories[DP_MAX_DIRECTORIES], FwSizeType numDirs, Fw::FileNameString &stateFile, NATIVE_UINT_TYPE memId, Fw::MemAllocator &allocator)
 Configure the DpCatalog. More...
 
void shutdown ()
 
- Public Member Functions inherited from Svc::DpCatalogComponentBase
void init (FwSizeType queueDepth, FwEnumStoreType instance=0)
 Initialize DpCatalogComponentBase object. More...
 
Fw::InputCmdPortget_CmdDisp_InputPort (FwIndexType portNum)
 
Svc::InputSendFileCompletePortget_fileDone_InputPort (FwIndexType portNum)
 
Svc::InputPingPortget_pingIn_InputPort (FwIndexType portNum)
 
void set_CmdReg_OutputPort (FwIndexType portNum, Fw::InputCmdRegPort *port)
 Connect port to CmdReg[portNum]. More...
 
void set_CmdStatus_OutputPort (FwIndexType portNum, Fw::InputCmdResponsePort *port)
 Connect port to CmdStatus[portNum]. More...
 
void set_Log_OutputPort (FwIndexType portNum, Fw::InputLogPort *port)
 Connect port to Log[portNum]. More...
 
void set_Time_OutputPort (FwIndexType portNum, Fw::InputTimePort *port)
 Connect port to Time[portNum]. More...
 
void set_Tlm_OutputPort (FwIndexType portNum, Fw::InputTlmPort *port)
 Connect port to Tlm[portNum]. More...
 
void set_fileOut_OutputPort (FwIndexType portNum, Svc::InputSendFileRequestPort *port)
 Connect port to fileOut[portNum]. More...
 
void set_pingOut_OutputPort (FwIndexType portNum, Svc::InputPingPort *port)
 Connect port to pingOut[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::DpCatalogComponentBase
enum  { NUM_CMDDISP_INPUT_PORTS = 1 }
 Enumerations for numbers of special input ports. More...
 
enum  { NUM_FILEDONE_INPUT_PORTS = 1, NUM_PINGIN_INPUT_PORTS = 1 }
 Enumerations for numbers of typed input ports. More...
 
enum  {
  NUM_CMDREG_OUTPUT_PORTS = 1, NUM_CMDSTATUS_OUTPUT_PORTS = 1, NUM_LOG_OUTPUT_PORTS = 1, NUM_LOGTEXT_OUTPUT_PORTS = 1,
  NUM_TIME_OUTPUT_PORTS = 1, NUM_TLM_OUTPUT_PORTS = 1
}
 Enumerations for numbers of special output ports. More...
 
enum  { NUM_FILEOUT_OUTPUT_PORTS = 1, NUM_PINGOUT_OUTPUT_PORTS = 1 }
 Enumerations for numbers of typed output ports. More...
 
enum  { OPCODE_BUILD_CATALOG = 0x0, OPCODE_START_XMIT_CATALOG = 0x1, OPCODE_STOP_XMIT_CATALOG = 0x2, OPCODE_CLEAR_CATALOG = 0x3 }
 Command opcodes. More...
 
enum  {
  EVENTID_DIRECTORYOPENERROR = 0x0, EVENTID_PROCESSINGDIRECTORY = 0x1, EVENTID_PROCESSINGFILE = 0x2, EVENTID_PROCESSINGDIRECTORYCOMPLETE = 0x3,
  EVENTID_CATALOGBUILDCOMPLETE = 0x4, EVENTID_CATALOGXMITSTARTED = 0xa, EVENTID_CATALOGXMITSTOPPED = 0xb, EVENTID_CATALOGXMITCOMPLETED = 0xc,
  EVENTID_SENDINGPRODUCT = 0xd, EVENTID_PRODUCTCOMPLETE = 0xe, EVENTID_COMPONENTNOTINITIALIZED = 0x14, EVENTID_COMPONENTNOMEMORY = 0x15,
  EVENTID_CATALOGFULL = 0x16, EVENTID_FILEOPENERROR = 0x17, EVENTID_FILEREADERROR = 0x18, EVENTID_FILEHDRERROR = 0x19,
  EVENTID_FILEHDRDESERROR = 0x1a, EVENTID_DPINSERTERROR = 0x1b, EVENTID_DPDUPLICATE = 0x1c, EVENTID_DPCATALOGFULL = 0x1d,
  EVENTID_DPXMITINPROGRESS = 0x1e, EVENTID_FILESIZEERROR = 0x1f, EVENTID_NODPMEMORY = 0x20, EVENTID_NOTINITIALIZED = 0x21,
  EVENTID_XMITNOTACTIVE = 0x22, EVENTID_STATEFILEOPENERROR = 0x23, EVENTID_STATEFILEREADERROR = 0x24, EVENTID_STATEFILETRUNCATED = 0x25,
  EVENTID_NOSTATEFILESPECIFIED = 0x26, EVENTID_STATEFILEWRITEERROR = 0x27, EVENTID_NOSTATEFILE = 0x28, EVENTID_DPFILEXMITERROR = 0x29,
  EVENTID_DPFILESENDERROR = 0x2a
}
 Event IDs. More...
 
enum  {
  EVENTID_COMPONENTNOTINITIALIZED_THROTTLE = 10, EVENTID_COMPONENTNOMEMORY_THROTTLE = 10, EVENTID_CATALOGFULL_THROTTLE = 10, EVENTID_FILEOPENERROR_THROTTLE = 10,
  EVENTID_FILEREADERROR_THROTTLE = 10, EVENTID_FILEHDRERROR_THROTTLE = 10, EVENTID_FILEHDRDESERROR_THROTTLE = 10, EVENTID_DPINSERTERROR_THROTTLE = 10,
  EVENTID_DPDUPLICATE_THROTTLE = 10, EVENTID_DPCATALOGFULL_THROTTLE = 10, EVENTID_DPXMITINPROGRESS_THROTTLE = 10, EVENTID_FILESIZEERROR_THROTTLE = 10,
  EVENTID_DPFILEXMITERROR_THROTTLE = 10, EVENTID_DPFILESENDERROR_THROTTLE = 10
}
 Event throttle values: sets initial value of countdown variables. More...
 
enum  { CHANNELID_CATALOGDPS = 0x0, CHANNELID_DPSSENT = 0x1 }
 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::DpCatalogComponentBase
 DpCatalogComponentBase (const char *compName="")
 Construct DpCatalogComponentBase object. More...
 
virtual ~DpCatalogComponentBase ()
 Destroy DpCatalogComponentBase object. More...
 
FwIndexType getNum_CmdDisp_InputPorts () const
 
FwIndexType getNum_fileDone_InputPorts () const
 
FwIndexType getNum_pingIn_InputPorts () const
 
FwIndexType getNum_CmdReg_OutputPorts () const
 
FwIndexType getNum_CmdStatus_OutputPorts () const
 
FwIndexType getNum_Log_OutputPorts () const
 
FwIndexType getNum_Time_OutputPorts () const
 
FwIndexType getNum_Tlm_OutputPorts () const
 
FwIndexType getNum_fileOut_OutputPorts () const
 
FwIndexType getNum_pingOut_OutputPorts () const
 
bool isConnected_CmdReg_OutputPort (FwIndexType portNum)
 
bool isConnected_CmdStatus_OutputPort (FwIndexType portNum)
 
bool isConnected_Log_OutputPort (FwIndexType portNum)
 
bool isConnected_Time_OutputPort (FwIndexType portNum)
 
bool isConnected_Tlm_OutputPort (FwIndexType portNum)
 
bool isConnected_fileOut_OutputPort (FwIndexType portNum)
 
bool isConnected_pingOut_OutputPort (FwIndexType portNum)
 
void fileDone_handlerBase (FwIndexType portNum, const Svc::SendFileResponse &resp)
 Handler base-class function for input port fileDone. More...
 
void pingIn_handlerBase (FwIndexType portNum, U32 key)
 Handler base-class function for input port pingIn. More...
 
virtual void fileDone_preMsgHook (FwIndexType portNum, const Svc::SendFileResponse &resp)
 Pre-message hook for async input port fileDone. More...
 
virtual void pingIn_preMsgHook (FwIndexType portNum, U32 key)
 Pre-message hook for async input port pingIn. More...
 
Svc::SendFileResponse fileOut_out (FwIndexType portNum, const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName, U32 offset, U32 length)
 Invoke output port fileOut. More...
 
void pingOut_out (FwIndexType portNum, U32 key)
 Invoke output port pingOut. More...
 
void cmdResponse_out (FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
 Emit command response. More...
 
void BUILD_CATALOG_cmdHandlerBase (FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
 
void START_XMIT_CATALOG_cmdHandlerBase (FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
 
void STOP_XMIT_CATALOG_cmdHandlerBase (FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
 
void CLEAR_CATALOG_cmdHandlerBase (FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
 
virtual void BUILD_CATALOG_preMsgHook (FwOpcodeType opCode, U32 cmdSeq)
 Pre-message hook for command BUILD_CATALOG. More...
 
virtual void START_XMIT_CATALOG_preMsgHook (FwOpcodeType opCode, U32 cmdSeq)
 Pre-message hook for command START_XMIT_CATALOG. More...
 
virtual void STOP_XMIT_CATALOG_preMsgHook (FwOpcodeType opCode, U32 cmdSeq)
 Pre-message hook for command STOP_XMIT_CATALOG. More...
 
virtual void CLEAR_CATALOG_preMsgHook (FwOpcodeType opCode, U32 cmdSeq)
 Pre-message hook for command CLEAR_CATALOG. More...
 
void log_WARNING_HI_DirectoryOpenError (const Fw::StringBase &loc, I32 stat) const
 
void log_ACTIVITY_LO_ProcessingDirectory (const Fw::StringBase &directory) const
 
void log_ACTIVITY_LO_ProcessingFile (const Fw::StringBase &file) const
 
void log_ACTIVITY_HI_ProcessingDirectoryComplete (const Fw::StringBase &loc, U32 total, U32 pending, U64 pending_bytes) const
 
void log_ACTIVITY_HI_CatalogBuildComplete () const
 
void log_ACTIVITY_HI_CatalogXmitStarted () const
 
void log_ACTIVITY_HI_CatalogXmitStopped (U32 bytes) const
 
void log_ACTIVITY_HI_CatalogXmitCompleted (U64 bytes) const
 
void log_ACTIVITY_LO_SendingProduct (const Fw::StringBase &file, U32 bytes, U32 prio) const
 
void log_ACTIVITY_LO_ProductComplete (const Fw::StringBase &file) const
 
void log_WARNING_HI_ComponentNotInitialized ()
 
void log_WARNING_HI_ComponentNoMemory ()
 
void log_WARNING_HI_CatalogFull (const Fw::StringBase &dir)
 
void log_WARNING_HI_FileOpenError (const Fw::StringBase &loc, I32 stat)
 
void log_WARNING_HI_FileReadError (const Fw::StringBase &file, I32 stat)
 
void log_WARNING_HI_FileHdrError (const Fw::StringBase &file, Svc::DpHdrField field, U32 exp, U32 act)
 
void log_WARNING_HI_FileHdrDesError (const Fw::StringBase &file, I32 stat)
 
void log_WARNING_HI_DpInsertError (Svc::DpRecord dp)
 
void log_DIAGNOSTIC_DpDuplicate (Svc::DpRecord dp)
 
void log_WARNING_HI_DpCatalogFull (Svc::DpRecord dp)
 
void log_WARNING_LO_DpXmitInProgress ()
 
void log_WARNING_HI_FileSizeError (const Fw::StringBase &file, I32 stat)
 
void log_WARNING_HI_NoDpMemory () const
 Log event NoDpMemory. More...
 
void log_WARNING_HI_NotInitialized () const
 Log event NotInitialized. More...
 
void log_WARNING_LO_XmitNotActive () const
 Log event XmitNotActive. More...
 
void log_WARNING_HI_StateFileOpenError (const Fw::StringBase &file, I32 stat) const
 Log event StateFileOpenError. More...
 
void log_WARNING_HI_StateFileReadError (const Fw::StringBase &file, I32 stat, I32 offset) const
 Log event StateFileReadError. More...
 
void log_WARNING_HI_StateFileTruncated (const Fw::StringBase &file, I32 offset, I32 size) const
 Log event StateFileTruncated. More...
 
void log_WARNING_LO_NoStateFileSpecified () const
 Log event NoStateFileSpecified. More...
 
void log_WARNING_HI_StateFileWriteError (const Fw::StringBase &file, I32 stat) const
 Log event StateFileWriteError. More...
 
void log_WARNING_LO_NoStateFile (const Fw::StringBase &file) const
 Log event NoStateFile. More...
 
void log_WARNING_HI_DpFileXmitError (const Fw::StringBase &file, Svc::SendFileStatus stat)
 Log event DpFileXmitError. More...
 
void log_WARNING_HI_DpFileSendError (const Fw::StringBase &file, Svc::SendFileStatus stat)
 Log event DpFileSendError. More...
 
void log_WARNING_HI_ComponentNotInitialized_ThrottleClear ()
 Reset throttle value for ComponentNotInitialized. More...
 
void log_WARNING_HI_ComponentNoMemory_ThrottleClear ()
 Reset throttle value for ComponentNoMemory. More...
 
void log_WARNING_HI_CatalogFull_ThrottleClear ()
 Reset throttle value for CatalogFull. More...
 
void log_WARNING_HI_FileOpenError_ThrottleClear ()
 Reset throttle value for FileOpenError. More...
 
void log_WARNING_HI_FileReadError_ThrottleClear ()
 Reset throttle value for FileReadError. More...
 
void log_WARNING_HI_FileHdrError_ThrottleClear ()
 Reset throttle value for FileHdrError. More...
 
void log_WARNING_HI_FileHdrDesError_ThrottleClear ()
 Reset throttle value for FileHdrDesError. More...
 
void log_WARNING_HI_DpInsertError_ThrottleClear ()
 Reset throttle value for DpInsertError. More...
 
void log_DIAGNOSTIC_DpDuplicate_ThrottleClear ()
 Reset throttle value for DpDuplicate. More...
 
void log_WARNING_HI_DpCatalogFull_ThrottleClear ()
 Reset throttle value for DpCatalogFull. More...
 
void log_WARNING_LO_DpXmitInProgress_ThrottleClear ()
 Reset throttle value for DpXmitInProgress. More...
 
void log_WARNING_HI_FileSizeError_ThrottleClear ()
 Reset throttle value for FileSizeError. More...
 
void log_WARNING_HI_DpFileXmitError_ThrottleClear ()
 Reset throttle value for DpFileXmitError. More...
 
void log_WARNING_HI_DpFileSendError_ThrottleClear ()
 Reset throttle value for DpFileSendError. More...
 
void tlmWrite_CatalogDps (U32 arg, Fw::Time _tlmTime=Fw::Time()) const
 
void tlmWrite_DpsSent (U32 arg, Fw::Time _tlmTime=Fw::Time()) const
 
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 21 of file DpCatalog.hpp.

Constructor & Destructor Documentation

◆ DpCatalog()

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

DpCatalog constructor.

Parameters
compNamecomponent name
Parameters
compNameThe component name

Definition at line 23 of file DpCatalog.cpp.

◆ ~DpCatalog()

Svc::DpCatalog::~DpCatalog ( )

DpCatalog destructor.

Definition at line 51 of file DpCatalog.cpp.

Member Function Documentation

◆ configure()

void Svc::DpCatalog::configure ( Fw::FileNameString  directories[DP_MAX_DIRECTORIES],
FwSizeType  numDirs,
Fw::FileNameString stateFile,
NATIVE_UINT_TYPE  memId,
Fw::MemAllocator allocator 
)

Configure the DpCatalog.

Parameters
maxDpFilesThe max number of data product files to track
directorieslist of directories to scan
numDirsnumber of supplied directories
stateFilefile to store transmit state. Provide a zero-length string if no state tracking
memIdmemory ID for allocator
allocatorAllocator to supply memory for catalog. Instance must survive for shutdown to use for reclaiming memory

Definition at line 54 of file DpCatalog.cpp.

◆ shutdown()

void Svc::DpCatalog::shutdown ( )

Definition at line 813 of file DpCatalog.cpp.


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