1
0
forked from fsfw/fsfw

max tm packet size now configurable

This commit is contained in:
2021-06-14 15:14:57 +02:00
parent 1d2dabb4b4
commit aa33ff2f48
12 changed files with 409 additions and 414 deletions

View File

@ -1,5 +1,5 @@
#ifndef FRAMEWORK_TMTCPACKET_PACKETMATCHER_PACKETMATCHTREE_H_
#define FRAMEWORK_TMTCPACKET_PACKETMATCHER_PACKETMATCHTREE_H_
#ifndef FSFW_TMTCPACKET_PACKETMATCHER_PACKETMATCHTREE_H_
#define FSFW_TMTCPACKET_PACKETMATCHER_PACKETMATCHTREE_H_
#include "../../container/PlacementFactory.h"
#include "../../globalfunctions/matching/MatchTree.h"
@ -8,29 +8,29 @@
class PacketMatchTree: public MatchTree<TmPacketMinimal*>, public HasReturnvaluesIF {
public:
PacketMatchTree(Node* root);
PacketMatchTree(iterator root);
PacketMatchTree();
virtual ~PacketMatchTree();
ReturnValue_t changeMatch(bool addToMatch, uint16_t apid, uint8_t type = 0,
uint8_t subtype = 0);
ReturnValue_t addMatch(uint16_t apid, uint8_t type = 0,
uint8_t subtype = 0);
ReturnValue_t removeMatch(uint16_t apid, uint8_t type = 0,
uint8_t subtype = 0);
ReturnValue_t initialize();
PacketMatchTree(Node* root);
PacketMatchTree(iterator root);
PacketMatchTree();
virtual ~PacketMatchTree();
ReturnValue_t changeMatch(bool addToMatch, uint16_t apid, uint8_t type = 0,
uint8_t subtype = 0);
ReturnValue_t addMatch(uint16_t apid, uint8_t type = 0,
uint8_t subtype = 0);
ReturnValue_t removeMatch(uint16_t apid, uint8_t type = 0,
uint8_t subtype = 0);
ReturnValue_t initialize();
protected:
ReturnValue_t cleanUpElement(iterator position);
ReturnValue_t cleanUpElement(iterator position);
private:
static const uint8_t N_POOLS = 4;
LocalPool factoryBackend;
PlacementFactory factory;
static const LocalPool::LocalPoolConfig poolConfig;
static const uint16_t POOL_SIZES[N_POOLS];
static const uint16_t N_ELEMENTS[N_POOLS];
template<typename VALUE_T, typename INSERTION_T>
ReturnValue_t findOrInsertMatch(iterator startAt, VALUE_T test, iterator* lastTest);
iterator findMatch(iterator startAt, TmPacketMinimal* test);
static const uint8_t N_POOLS = 4;
LocalPool factoryBackend;
PlacementFactory factory;
static const LocalPool::LocalPoolConfig poolConfig;
static const uint16_t POOL_SIZES[N_POOLS];
static const uint16_t N_ELEMENTS[N_POOLS];
template<typename VALUE_T, typename INSERTION_T>
ReturnValue_t findOrInsertMatch(iterator startAt, VALUE_T test, iterator* lastTest);
iterator findMatch(iterator startAt, TmPacketMinimal* test);
};
#endif /* FRAMEWORK_TMTCPACKET_PACKETMATCHER_PACKETMATCHTREE_H_ */