max tm packet size now configurable

This commit is contained in:
Robin Müller 2021-06-14 15:14:57 +02:00
parent 1d2dabb4b4
commit aa33ff2f48
No known key found for this signature in database
GPG Key ID: 9C287E88FED11DF3
12 changed files with 409 additions and 414 deletions

View File

@ -68,6 +68,8 @@ static constexpr uint8_t FSFW_CSB_FIFO_DEPTH = 6;
static constexpr size_t FSFW_PRINT_BUFFER_SIZE = 124; static constexpr size_t FSFW_PRINT_BUFFER_SIZE = 124;
static constexpr size_t FSFW_MAX_TM_PACKET_SIZE = 2048;
} }
#endif /* CONFIG_FSFWCONFIG_H_ */ #endif /* CONFIG_FSFWCONFIG_H_ */

View File

@ -1,5 +1,5 @@
#ifndef FRAMEWORK_TMTCPACKET_PACKETMATCHER_APIDMATCHER_H_ #ifndef FSFW_TMTCPACKET_PACKETMATCHER_APIDMATCHER_H_
#define FRAMEWORK_TMTCPACKET_PACKETMATCHER_APIDMATCHER_H_ #define FSFW_TMTCPACKET_PACKETMATCHER_APIDMATCHER_H_
#include "../../globalfunctions/matching/SerializeableMatcherIF.h" #include "../../globalfunctions/matching/SerializeableMatcherIF.h"
#include "../../serialize/SerializeAdapter.h" #include "../../serialize/SerializeAdapter.h"

View File

@ -11,20 +11,17 @@ const LocalPool::LocalPoolConfig PacketMatchTree::poolConfig = {
{40, sizeof(PacketMatchTree::Node)} {40, sizeof(PacketMatchTree::Node)}
}; };
PacketMatchTree::PacketMatchTree(Node* root) : PacketMatchTree::PacketMatchTree(Node* root): MatchTree<TmPacketMinimal*>(root, 2),
MatchTree<TmPacketMinimal*>(root, 2),
factoryBackend(0, poolConfig, false, true), factoryBackend(0, poolConfig, false, true),
factory(&factoryBackend) { factory(&factoryBackend) {
} }
PacketMatchTree::PacketMatchTree(iterator root) : PacketMatchTree::PacketMatchTree(iterator root): MatchTree<TmPacketMinimal*>(root.element, 2),
MatchTree<TmPacketMinimal*>(root.element, 2),
factoryBackend(0, poolConfig, false, true), factoryBackend(0, poolConfig, false, true),
factory(&factoryBackend) { factory(&factoryBackend) {
} }
PacketMatchTree::PacketMatchTree() : PacketMatchTree::PacketMatchTree(): MatchTree<TmPacketMinimal*>((Node*) NULL, 2),
MatchTree<TmPacketMinimal*>((Node*) NULL, 2),
factoryBackend(0, poolConfig, false, true), factoryBackend(0, poolConfig, false, true),
factory(&factoryBackend) { factory(&factoryBackend) {
} }

View File

@ -1,5 +1,5 @@
#ifndef FRAMEWORK_TMTCPACKET_PACKETMATCHER_PACKETMATCHTREE_H_ #ifndef FSFW_TMTCPACKET_PACKETMATCHER_PACKETMATCHTREE_H_
#define FRAMEWORK_TMTCPACKET_PACKETMATCHER_PACKETMATCHTREE_H_ #define FSFW_TMTCPACKET_PACKETMATCHER_PACKETMATCHTREE_H_
#include "../../container/PlacementFactory.h" #include "../../container/PlacementFactory.h"
#include "../../globalfunctions/matching/MatchTree.h" #include "../../globalfunctions/matching/MatchTree.h"

View File

@ -1,5 +1,5 @@
#ifndef FRAMEWORK_TMTCPACKET_PACKETMATCHER_SUBSERVICEMATCHER_H_ #ifndef FSFW_TMTCPACKET_PACKETMATCHER_SUBSERVICEMATCHER_H_
#define FRAMEWORK_TMTCPACKET_PACKETMATCHER_SUBSERVICEMATCHER_H_ #define FSFW_TMTCPACKET_PACKETMATCHER_SUBSERVICEMATCHER_H_
#include "../../globalfunctions/matching/SerializeableMatcherIF.h" #include "../../globalfunctions/matching/SerializeableMatcherIF.h"
#include "../../serialize/SerializeAdapter.h" #include "../../serialize/SerializeAdapter.h"

View File

@ -11,9 +11,7 @@
TimeStamperIF* TmPacketBase::timeStamper = nullptr; TimeStamperIF* TmPacketBase::timeStamper = nullptr;
object_id_t TmPacketBase::timeStamperId = objects::NO_OBJECT; object_id_t TmPacketBase::timeStamperId = objects::NO_OBJECT;
TmPacketBase::TmPacketBase(uint8_t* setData): TmPacketBase::TmPacketBase(uint8_t* setData): SpacePacketBase(setData) {}
SpacePacketBase(setData) {
}
TmPacketBase::~TmPacketBase() { TmPacketBase::~TmPacketBase() {
//Nothing to do. //Nothing to do.

View File

@ -23,7 +23,7 @@ struct PUSTmDataFieldHeaderPusA {
uint8_t service_type; uint8_t service_type;
uint8_t service_subtype; uint8_t service_subtype;
uint8_t subcounter; uint8_t subcounter;
// uint8_t destination; // uint8_t destination;
uint8_t time[TimeStamperIF::MISSION_TIMESTAMP_SIZE]; uint8_t time[TimeStamperIF::MISSION_TIMESTAMP_SIZE];
}; };
@ -51,8 +51,7 @@ public:
static const uint32_t TM_PACKET_MIN_SIZE = (sizeof(CCSDSPrimaryHeader) + static const uint32_t TM_PACKET_MIN_SIZE = (sizeof(CCSDSPrimaryHeader) +
sizeof(PUSTmDataFieldHeaderPusA) + 2); sizeof(PUSTmDataFieldHeaderPusA) + 2);
//! Maximum size of a TM Packet in this mission. //! Maximum size of a TM Packet in this mission.
//! TODO: Make this dependant on a config variable. static const uint32_t MISSION_TM_PACKET_MAX_SIZE = fsfwconfig::FSFW_MAX_TM_PACKET_SIZE;
static const uint32_t MISSION_TM_PACKET_MAX_SIZE = 2048;
/** /**
* This is the default constructor. * This is the default constructor.

View File

@ -53,8 +53,7 @@ public:
static const uint32_t TM_PACKET_MIN_SIZE = (sizeof(CCSDSPrimaryHeader) + static const uint32_t TM_PACKET_MIN_SIZE = (sizeof(CCSDSPrimaryHeader) +
sizeof(PUSTmDataFieldHeaderPusC) + 2); sizeof(PUSTmDataFieldHeaderPusC) + 2);
//! Maximum size of a TM Packet in this mission. //! Maximum size of a TM Packet in this mission.
//! TODO: Make this dependant on a config variable. static const uint32_t MISSION_TM_PACKET_MAX_SIZE = fsfwconfig::FSFW_MAX_TM_PACKET_SIZE;
static const uint32_t MISSION_TM_PACKET_MAX_SIZE = 2048;
/** /**
* This is the default constructor. * This is the default constructor.