7 #ifndef Svc_DpCatalog_HPP 8 #define Svc_DpCatalog_HPP 16 #include <config/DpCatalogCfg.hpp> 17 #include <config/DpCfg.hpp> 19 #define DIRECTORY_DELIMITER "/" 99 void START_XMIT_CATALOG_cmdHandler(
124 struct DpStateEntry {
133 static int compareEntries(
const DpStateEntry& left,
const DpStateEntry& right);
135 bool operator==(
const DpStateEntry& other)
const;
136 bool operator!=(
const DpStateEntry& other)
const;
137 bool operator>(
const DpStateEntry& other)
const;
138 bool operator<(
const DpStateEntry& other)
const;
141 struct DpDstateFileEntry {
174 DpCatalog::DpBtreeNode* insertEntry(DpStateEntry& entry);
184 CheckStat checkLeftRight(
bool condition, DpBtreeNode*& node,
const DpStateEntry& newEntry);
187 void resetBinaryTree();
193 void resetStateFileData();
197 void getFileState(DpStateEntry& entry);
200 void pruneAndWriteStateFile();
207 void appendFileState(
const DpStateEntry& entry);
213 bool allocateNode(DpBtreeNode*& newNode,
const DpStateEntry& newEntry);
217 void deallocateNode(DpBtreeNode* node);
220 void sendNextEntry();
225 DpBtreeNode* findNextTreeNode();
248 DpBtreeNode* m_dpTree;
249 DpBtreeNode* m_freeListHead;
250 DpBtreeNode* m_currentNode;
251 DpBtreeNode* m_currentXmitNode;
260 DpDstateFileEntry* m_stateFileData;
269 bool m_xmitInProgress;
277 U64 m_pendingDpBytes;
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.
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.
~DpCatalog()
DpCatalog destructor.
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.