7 #ifndef Svc_FileManagerComponentAc_HPP 8 #define Svc_FileManagerComponentAc_HPP 24 #if !FW_DIRECT_PORT_CALLS 27 #if !FW_DIRECT_PORT_CALLS 244 #if !FW_DIRECT_PORT_CALLS 261 #if !FW_DIRECT_PORT_CALLS 285 #if !FW_DIRECT_PORT_CALLS 293 #if FW_ENABLE_TEXT_LOGGING == 1 296 void set_LogText_OutputPort(
347 #if !FW_DIRECT_PORT_CALLS 363 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 371 #if FW_ENABLE_TEXT_LOGGING == 1 374 void set_LogText_OutputPort(
376 Fw::InputSerializePort* port
384 Fw::InputSerializePort* port
390 Fw::InputSerializePort* port
396 Fw::InputSerializePort* port
402 Fw::InputSerializePort* port
408 Fw::InputSerializePort* port
414 Fw::InputSerializePort* port
419 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 430 Fw::InputSerializePort* port
454 const char* compName =
"" 499 #if FW_ENABLE_TEXT_LOGGING == 1 504 static constexpr
FwIndexType getNum_LogText_OutputPorts() {
578 #if FW_ENABLE_TEXT_LOGGING == 1 583 bool isConnected_LogText_OutputPort(
651 #if FW_DIRECT_PORT_CALLS 689 #if FW_DIRECT_PORT_CALLS 1344 DpContainer& container,
1375 static void m_p_cmdIn_in(
1390 static void m_p_pingIn_in(
1397 static void m_p_schedIn_in(
1409 #if FW_ENABLE_TEXT_LOGGING 1429 void cmdResponseOut_out(
1454 void productSendOut_out(
1461 void timeCaller_out(
1486 DpContainer& container
1489 #if !FW_DIRECT_PORT_CALLS 1502 #if !FW_DIRECT_PORT_CALLS 1518 #if !FW_DIRECT_PORT_CALLS 1526 #if FW_ENABLE_TEXT_LOGGING == 1 1556 #if !FW_DIRECT_PORT_CALLS bool isConnected_productSendOut_OutputPort(FwIndexType portNum) const
void set_eventOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to eventOut[portNum].
A data product Container.
virtual void run_internalInterfaceHandler()=0
Internal interface handler for run.
Append 1 file's contents to the end of another.
void log_WARNING_HI_ListDirectoryError(const Fw::StringBase &dirName, U32 status) const
The File System component deleted and existing directory without error.
void AppendFile_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void log_ACTIVITY_HI_DirectoryListingSubdir(const Fw::StringBase &dirName, const Fw::StringBase &subdirName) const
void log_ACTIVITY_HI_CreateDirectoryStarted(const Fw::StringBase &dirName) const
static constexpr FwSizeType SIZE_OF_FileChunkDataRecord_RECORD(FwSizeType arraySize)
Record sizes.
FwIdType FwOpcodeType
The type of a command opcode.
Fw::Success::T dpGet_FileDpContainer(FwSizeType dataSize, DpContainer &container)
virtual void ListDirectory_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command ListDirectory.
void log_ACTIVITY_HI_RemoveDirectorySucceeded(const Fw::StringBase &dirName) const
void log_ACTIVITY_HI_DirectoryListing(const Fw::StringBase &dirName, const Fw::StringBase &fileName, FwSizeType fileSize) const
virtual void MoveFile_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &sourceFileName, const Fw::CmdStringArg &destFileName)=0
PlatformSizeType FwSizeType
virtual void MoveFile_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command MoveFile.
U32 FwDpPriorityType
The type of a data product priority.
void log_ACTIVITY_HI_CalculateCrcStarted(const Fw::StringBase &fileName) const
The File System component moved a file to a new location without error.
virtual void CalculateCrc_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &filename)=0
void log_WARNING_HI_FileSizeError(const Fw::StringBase &fileName, U32 status) const
void run_internalInterfaceInvoke()
Internal interface base-class function for run.
Channel ID for CommandsExecuted.
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
void log_ACTIVITY_HI_GenerateDpStarted(const Fw::StringBase &fileName, U64 bytesToWrite) const
The File System component began deleting a directory.
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
void FileSize_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
static constexpr FwIndexType getNum_productGetOut_OutputPorts()
void log_ACTIVITY_HI_FileSizeSucceeded(const Fw::StringBase &fileName, FwSizeType size) const
File data product generation failed.
virtual void RemoveFile_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, bool ignoreErrors)=0
void log_ACTIVITY_HI_ListDirectorySucceeded(const Fw::StringBase &dirName, U32 fileCount) const
void cmdIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Handler base-class function for input port cmdIn.
Auto-generated base for FileManager component.
List the contents of a directory.
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
bool isConnected_productGetOut_OutputPort(FwIndexType portNum) const
Starting directory listing.
void log_ACTIVITY_HI_CalculateCrcSucceeded(const Fw::StringBase &fileName, U32 crc) const
The container default priorities.
void CalculateCrc_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void log_ACTIVITY_HI_ListDirectoryStarted(const Fw::StringBase &dirName) const
bool isConnected_tlmOut_OutputPort(FwIndexType portNum) const
static constexpr FwIndexType getNum_pingOut_OutputPorts()
static constexpr FwIndexType getNum_productSendOut_OutputPorts()
Calculate the CRC of a file.
Enum representing a command response.
File data product generation started.
virtual void RemoveFile_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command RemoveFile.
virtual void schedIn_handler(FwIndexType portNum, U32 context)=0
Handler for input port schedIn.
void log_ACTIVITY_HI_MoveFileStarted(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName) const
void log_WARNING_HI_GenerateDpInvalidRange(const Fw::StringBase &fileName, U64 beginOffset, U64 endOffset, U64 fileSize) const
bool isConnected_pingOut_OutputPort(FwIndexType portNum) const
The File System component began moving a file to a new location.
DpContainer()
Constructor with default initialization.
static constexpr FwIndexType getNum_eventOut_OutputPorts()
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
void pingOut_out(FwIndexType portNum, U32 key) const
Invoke output port pingOut.
void log_ACTIVITY_HI_AppendFileSucceeded(const Fw::StringBase &source, const Fw::StringBase &target) const
FileManagerComponentBase(const char *compName="")
Construct FileManagerComponentBase object.
void ListDirectory_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void init()
Object initializer.
SerializeStatus
forward declaration for string
Data product container allocation failed.
void log_WARNING_HI_GenerateDpBufferFailed(const Fw::StringBase &fileName) const
void log_ACTIVITY_HI_CreateDirectorySucceeded(const Fw::StringBase &dirName) const
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
The File System component returned status non-zero when trying to append 2 files together.
U16 FwSizeStoreType
The type used to serialize a size value.
FwIdType FwEventIdType
The type of an event identifier.
An error occurred while attempting to remove a directory.
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum) const
Directory listing completed successfully.
void log_WARNING_HI_GenerateDpFailed(const Fw::StringBase &fileName, const Svc::FileManager_GenerateDpStage &stage, U32 status) const
virtual void CreateDirectory_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &dirName)=0
virtual void ListDirectory_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &dirName)=0
void RemoveFile_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
friend class FileManagerTester
Friend class tester implementation to support white-box testing.
File data product generation completed.
void log_ACTIVITY_HI_RemoveDirectoryStarted(const Fw::StringBase &dirName) const
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
void RemoveDirectory_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
A data product container.
static constexpr FwIndexType getNum_schedIn_InputPorts()
An error occurred while attempting to create a directory.
virtual void FileSize_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command FileSize.
FwIdType FwChanIdType
The type of a telemetry channel identifier.
An error occurred while attempting to move a file.
An error occurred while attempting to remove a file.
virtual void CreateDirectory_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CreateDirectory.
Svc::InputSchedPort * get_schedIn_InputPort(FwIndexType portNum)
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
void log_ACTIVITY_HI_FileSizeStarted(const Fw::StringBase &fileName) const
void log_WARNING_HI_FileNameFormatError(const Fw::StringBase &fileName, const Fw::StringFormatStatus &status) const
Enum representing event severity.
virtual ~FileManagerComponentBase()
Destroy FileManagerComponentBase object.
The File System component appended 2 files without error.
void tlmWrite(FwChanIdType id, Fw::TlmBuffer &_tlmBuff, Fw::Time _tlmTime=Fw::Time()) const
void setBaseId(FwDpIdType baseId)
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
void MoveFile_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Fw::SerializeStatus serializeRecord_FileChunkHeaderRecord(const Svc::FileManager_FileChunkHeader &elt)
void log_ACTIVITY_HI_GenerateDpComplete(const Fw::StringBase &fileName, U32 chunks) const
uint8_t U8
8-bit unsigned integer
void schedIn_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port schedIn.
virtual void FileSize_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName)=0
void log_ACTIVITY_HI_MoveFileSucceeded(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName) const
static constexpr FwSizeType SIZE_OF_FileChunkHeaderRecord_RECORD
void log_WARNING_HI_DirectoryRemoveError(const Fw::StringBase &dirName, U32 status) const
FwIdType FwDpIdType
The type of a data product identifier.
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
Error formatting a file path.
void GenerateDp_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void log_ACTIVITY_HI_AppendFileStarted(const Fw::StringBase &source, const Fw::StringBase &target) const
bool isConnected_eventOut_OutputPort(FwIndexType portNum) const
void tlmWrite_Errors(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
void log_ACTIVITY_HI_RemoveFileStarted(const Fw::StringBase &fileName) const
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
virtual void GenerateDp_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, U32 chunkSize, U64 beginOffset, U64 endOffset, U32 priority, const Svc::FileManager_GenerateDpMode &mode)=0
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
How the chunks of a file are emitted.
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum) const
PlatformIndexType FwIndexType
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
The File System component began deleting an existing file.
Where a data product generation failure occurred.
static constexpr FwIndexType getNum_pingIn_InputPorts()
The File System component began creating a new directory.
Directory listing subdirectory entry.
Invalid offset range requested for data product generation.
void log_WARNING_HI_AppendFileFailed(const Fw::StringBase &source, const Fw::StringBase &target, U32 status) const
void regCommands()
Register commands with the Command Dispatcher.
void set_productSendOut_OutputPort(FwIndexType portNum, Fw::InputDpSendPort *port)
Connect port to productSendOut[portNum].
static constexpr FwIndexType getNum_cmdIn_InputPorts()
RateGroupDivider component implementation.
Failed to list directory.
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
The File System component created a new directory without error.
void log_WARNING_HI_CalculateCrcFailed(const Fw::StringBase &fileName, U32 status) const
virtual void AppendFile_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command AppendFile.
Remove a directory, which must be empty.
Fw::SerializeStatus serializeRecord_FileChunkDataRecord(const U8 *array, FwSizeType size)
virtual void GenerateDp_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command GenerateDp.
The File System component deleted an existing file without error.
The File System component appended 2 files without error.
virtual void RemoveDirectory_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command RemoveDirectory.
void log_WARNING_HI_DirectoryCreateError(const Fw::StringBase &dirName, U32 status) const
void set_productGetOut_OutputPort(FwIndexType portNum, Fw::InputDpGetPort *port)
Connect port to productGetOut[portNum].
void log_ACTIVITY_HI_RemoveFileSucceeded(const Fw::StringBase &fileName) const
void log_WARNING_HI_FileMoveError(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName, U32 status) const
void tlmWrite_CommandsExecuted(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
void CreateDirectory_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual void RemoveDirectory_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &dirName)=0
void log_WARNING_HI_FileRemoveError(const Fw::StringBase &fileName, U32 status) const
friend class FileManagerTesterBase
Friend class tester to support autocoded test harness.
void dpSend(DpContainer &container, Fw::Time timeTag=Fw::ZERO_TIME)
Send a data product.
virtual void CalculateCrc_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CalculateCrc.
Directory listing file entry.
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
FwDpIdType getBaseId() const
virtual void AppendFile_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &source, const Fw::CmdStringArg &target)=0