7 #ifndef Svc_DpCatalog_HPP 8 #define Svc_DpCatalog_HPP 17 #include <config/DpCatalogCfg.hpp> 18 #include <config/DpCfg.hpp> 20 #define DIRECTORY_DELIMITER "/" 100 void START_XMIT_CATALOG_cmdHandler(
125 struct DpStateEntry {
134 static int compareEntries(
const DpStateEntry& left,
const DpStateEntry& right);
136 bool operator==(
const DpStateEntry& other)
const;
137 bool operator!=(
const DpStateEntry& other)
const;
138 bool operator>(
const DpStateEntry& other)
const;
139 bool operator<(
const DpStateEntry& other)
const;
142 struct DpDstateFileEntry {
167 bool insertEntry(DpStateEntry& entry);
176 void resetStateFileData();
180 void getFileState(DpStateEntry& entry);
183 void pruneAndWriteStateFile();
190 void appendFileState(
const DpStateEntry& entry);
193 void sendNextEntry();
198 bool findNextEntry(DpStateEntry& entry);
219 bool m_initialized =
false;
222 DpStateEntry m_currentXmitEntry;
223 bool m_hasCurrentXmit =
false;
232 DpDstateFileEntry* m_stateFileData =
nullptr;
236 void* m_memPtr =
nullptr;
240 bool m_catalogBuilt =
false;
241 bool m_xmitInProgress =
false;
243 bool m_xmitCmdWait =
false;
246 U32 m_xmitCmdSeq = 0;
248 U32 m_pendingFiles = 0;
249 U64 m_pendingDpBytes = 0;
251 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
Enum representing a command response.
~DpCatalog()=default
DpCatalog destructor.
void configure(Fw::FileNameString directories[DP_MAX_DIRECTORIES], FwSizeType numDirs, Fw::FileNameString &stateFile, FwEnumStoreType memId, Fw::MemAllocator &allocator)
Configure the DpCatalog.
static const FwIndexType DP_MAX_FILES
DpCatalog(const char *const compName)
DpCatalog constructor.
friend class DpCatalogTester
Memory Allocation base class.
PlatformIndexType FwIndexType
Send file response struct.
RateGroupDivider component implementation.
Defines a base class for a memory allocator for classes.