allow sending TC requests to funnels
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Robin Müller 2022-12-14 13:19:14 +01:00
parent ec02332615
commit 4d473315fe
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
9 changed files with 29 additions and 21 deletions

View File

@ -121,8 +121,8 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun
new CcsdsDistributor(config::EIVE_PUS_APID, objects::CCSDS_PACKET_DISTRIBUTOR);
new PusDistributor(config::EIVE_PUS_APID, objects::PUS_PACKET_DISTRIBUTOR, ccsdsDistrib);
*cfdpFunnel = new CfdpTmFunnel(objects::CFDP_TM_FUNNEL, config::EIVE_CFDP_APID, *tmStore, 50);
*pusFunnel = new PusTmFunnel(objects::PUS_TM_FUNNEL, *timeStamper, *tmStore, sdcMan, 80);
*cfdpFunnel = new CfdpTmFunnel(objects::CFDP_TM_FUNNEL, config::EIVE_CFDP_APID, *tmStore, 50, 15);
*pusFunnel = new PusTmFunnel(objects::PUS_TM_FUNNEL, *timeStamper, *tmStore, sdcMan, 80, 15);
#if OBSW_ADD_TCPIP_SERVERS == 1
#if OBSW_ADD_TMTC_UDP_SERVER == 1
(*cfdpFunnel)->addDestination(*udpBridge, 0);

View File

@ -5,8 +5,8 @@
#include "fsfw/tmtcservices/TmTcMessage.h"
CfdpTmFunnel::CfdpTmFunnel(object_id_t objectId, uint16_t cfdpInCcsdsApid,
StorageManagerIF& tmStore, uint32_t messageDepth)
: TmFunnelBase(objectId, tmStore, messageDepth), cfdpInCcsdsApid(cfdpInCcsdsApid) {}
StorageManagerIF& tmStore, uint32_t tmMsgDepth, uint32_t tcMsgDepth)
: TmFunnelBase(objectId, tmStore, tmMsgDepth, tcMsgDepth), cfdpInCcsdsApid(cfdpInCcsdsApid) {}
const char* CfdpTmFunnel::getName() const { return "CFDP TM Funnel"; }

View File

@ -13,7 +13,7 @@
class CfdpTmFunnel : public TmFunnelBase {
public:
CfdpTmFunnel(object_id_t objectId, uint16_t cfdpInCcsdsApid, StorageManagerIF& tmStore,
uint32_t messageDepth);
uint32_t tmMsgDepth, uint32_t tcMsgDepth);
[[nodiscard]] const char* getName() const override;
ReturnValue_t performOperation(uint8_t opCode);
ReturnValue_t initialize() override;

View File

@ -7,8 +7,8 @@
#include "fsfw/tmtcpacket/pus/tm/PusTmZcWriter.h"
PusTmFunnel::PusTmFunnel(object_id_t objectId, TimeReaderIF &timeReader, StorageManagerIF &tmStore,
SdCardMountedIF &sdcMan, uint32_t messageDepth)
: TmFunnelBase(objectId, tmStore, messageDepth),
SdCardMountedIF &sdcMan, uint32_t tmMsgDepth, uint32_t tcMsgDepth)
: TmFunnelBase(objectId, tmStore, tmMsgDepth, tcMsgDepth),
timeReader(timeReader),
miscStore(objects::MISC_TM_STORE, "tm", "misc", RolloverInterval::HOURLY, 2, currentTv,
sdcMan),

View File

@ -23,7 +23,7 @@
class PusTmFunnel : public TmFunnelBase {
public:
explicit PusTmFunnel(object_id_t objectId, TimeReaderIF &timeReader, StorageManagerIF &tmStore,
SdCardMountedIF &sdcMan, uint32_t messageDepth = 10);
SdCardMountedIF &sdcMan, uint32_t tmMsgDepth, uint32_t tcMsgDepth);
[[nodiscard]] const char *getName() const override;
~PusTmFunnel() override;

View File

@ -10,12 +10,12 @@ Service15TmStorage::Service15TmStorage(object_id_t objectId, uint16_t apid,
ReturnValue_t Service15TmStorage::isValidSubservice(uint8_t subservice) {
switch (subservice) {
case(Subservices::START_BY_TIME_RANGE_RETRIEVAL): {
return OK;
}
case(Subservices::DELETE_UP_TO): {
return OK;
}
case (Subservices::START_BY_TIME_RANGE_RETRIEVAL): {
return OK;
}
case (Subservices::DELETE_UP_TO): {
return OK;
}
}
return FAILED;
}

View File

@ -5,10 +5,7 @@
class Service15TmStorage : public CommandingServiceBase {
public:
enum Subservices: uint8_t {
START_BY_TIME_RANGE_RETRIEVAL = 9,
DELETE_UP_TO = 11
};
enum Subservices : uint8_t { START_BY_TIME_RANGE_RETRIEVAL = 9, DELETE_UP_TO = 11 };
explicit Service15TmStorage(object_id_t objectId, uint16_t apid, uint8_t numParallelCommands,
uint16_t commandTimeoutSecs, size_t queueDepth);

View File

@ -2,11 +2,15 @@
#include "fsfw/ipc/QueueFactory.h"
TmFunnelBase::TmFunnelBase(object_id_t objectId, StorageManagerIF &tmStore, uint32_t tmMsgDepth)
TmFunnelBase::TmFunnelBase(object_id_t objectId, StorageManagerIF &tmStore, uint32_t tmMsgDepth,
uint32_t tcMsgDepth)
: SystemObject(objectId), tmStore(tmStore) {
tmQueue = QueueFactory::instance()->createMessageQueue(tmMsgDepth);
tcQueue = QueueFactory::instance()->createMessageQueue(tcMsgDepth);
}
MessageQueueId_t TmFunnelBase::getCommandQueue() const { return tcQueue->getId(); }
TmFunnelBase::~TmFunnelBase() { QueueFactory::instance()->deleteMessageQueue(tmQueue); }
MessageQueueId_t TmFunnelBase::getReportReceptionQueue(uint8_t virtualChannel) const {

View File

@ -3,14 +3,20 @@
#include <fsfw/objectmanager/SystemObject.h>
#include <fsfw/storagemanager/StorageManagerIF.h>
#include <fsfw/tmstorage/TmStoreFrontendSimpleIF.h>
#include <fsfw/tmtcservices/AcceptsTelemetryIF.h>
#include <vector>
class TmFunnelBase : public AcceptsTelemetryIF, public SystemObject {
class TmFunnelBase : public TmStoreFrontendSimpleIF,
public AcceptsTelemetryIF,
public SystemObject {
public:
TmFunnelBase(object_id_t objectId, StorageManagerIF& tmStore, uint32_t tmMsgDepth);
TmFunnelBase(object_id_t objectId, StorageManagerIF& tmStore, uint32_t tmMsgDepth,
uint32_t tcMsgDepth);
void addDestination(const AcceptsTelemetryIF& downlinkDestination, uint8_t vcid = 0);
[[nodiscard]] MessageQueueId_t getCommandQueue() const override;
[[nodiscard]] MessageQueueId_t getReportReceptionQueue(uint8_t virtualChannel) const override;
virtual ~TmFunnelBase();
@ -18,6 +24,7 @@ class TmFunnelBase : public AcceptsTelemetryIF, public SystemObject {
protected:
StorageManagerIF& tmStore;
std::vector<std::pair<MessageQueueId_t, uint8_t>> destinations;
MessageQueueIF* tcQueue = nullptr;
MessageQueueIF* tmQueue = nullptr;
};