7 #ifndef Svc_DpCatalog_HPP 8 #define Svc_DpCatalog_HPP 19 #include <config/DpCatalogCfg.hpp> 20 #include <config/DpCfg.hpp> 22 #define DIRECTORY_DELIMITER "/" 65 "Use configure(const Fw::ExternalArray<Fw::FileNameString>& directories, ...) instead");
113 void START_XMIT_CATALOG_cmdHandler(
138 struct DpStateEntry {
147 static I8 compareEntries(
const DpStateEntry& left,
const DpStateEntry& right);
149 bool operator==(
const DpStateEntry& other)
const;
150 bool operator!=(
const DpStateEntry& other)
const;
151 bool operator>(
const DpStateEntry& other)
const;
152 bool operator<(
const DpStateEntry& other)
const;
155 struct DpDstateFileEntry {
167 enum class ProcessFileStatus {
187 bool insertEntry(DpStateEntry& entry);
196 void resetStateFileData();
200 void getFileState(DpStateEntry& entry);
203 void pruneAndWriteStateFile();
210 void appendFileState(
const DpStateEntry& entry);
213 void sendNextEntry();
218 bool findNextEntry(DpStateEntry& entry);
239 bool m_initialized =
false;
242 DpStateEntry m_currentXmitEntry;
243 bool m_hasCurrentXmit =
false;
252 DpDstateFileEntry* m_stateFileData =
nullptr;
256 void* m_memPtr =
nullptr;
260 bool m_catalogBuilt =
false;
261 bool m_xmitInProgress =
false;
263 bool m_xmitCmdWait =
false;
266 U32 m_xmitCmdSeq = 0;
268 U32 m_pendingFiles = 0;
269 U64 m_pendingDpBytes = 0;
271 bool m_remainActive =
false;
Data structure representing a data product.
FwIdType FwOpcodeType
The type of a command opcode.
PlatformSizeType FwSizeType
U32 FwDpPriorityType
The type of a data product priority.
Auto-generated base for DpCatalog component.
Wait or don't wait for something.
static const FwIndexType DP_MAX_DIRECTORIES
int8_t I8
8-bit signed integer
void configure(const Fw::ExternalArray< Fw::FileNameString > &directories, Fw::FileNameString &stateFile, FwEnumStoreType memId, Fw::MemAllocator &allocator)
Configure the DpCatalog.
Enum representing a command response.
~DpCatalog()=default
DpCatalog destructor.
static const FwIndexType DP_MAX_FILES
DpCatalog(const char *const compName)
DpCatalog constructor.
friend class DpCatalogTester
Memory Allocation base class.
DEPRECATED(void configure(Fw::FileNameString directories[DP_MAX_DIRECTORIES], FwSizeType numDirs, Fw::FileNameString &stateFile, FwEnumStoreType memId, Fw::MemAllocator &allocator), "Use configure(const Fw::ExternalArray<Fw::FileNameString>& directories, ...) instead")
Configure the DpCatalog.
PlatformIndexType FwIndexType
Send file response struct.
RateGroupDivider component implementation.
Defines a base class for a memory allocator for classes.