continue request handling
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
parent
74f116f2fa
commit
c4c1f09f2e
@ -80,6 +80,7 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun
|
|||||||
auto* timeStamper = new CdsShortTimeStamper(objects::TIME_STAMPER);
|
auto* timeStamper = new CdsShortTimeStamper(objects::TIME_STAMPER);
|
||||||
StorageManagerIF* tcStore;
|
StorageManagerIF* tcStore;
|
||||||
StorageManagerIF* tmStore;
|
StorageManagerIF* tmStore;
|
||||||
|
StorageManagerIF* ipcStore;
|
||||||
{
|
{
|
||||||
PoolManager::LocalPoolConfig poolCfg = {{250, 16}, {250, 32}, {250, 64},
|
PoolManager::LocalPoolConfig poolCfg = {{250, 16}, {250, 32}, {250, 64},
|
||||||
{150, 128}, {120, 1024}, {120, 2048}};
|
{150, 128}, {120, 1024}, {120, 2048}};
|
||||||
@ -95,7 +96,7 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun
|
|||||||
{
|
{
|
||||||
PoolManager::LocalPoolConfig poolCfg = {{300, 16}, {200, 32}, {150, 64}, {150, 128},
|
PoolManager::LocalPoolConfig poolCfg = {{300, 16}, {200, 32}, {150, 64}, {150, 128},
|
||||||
{100, 256}, {50, 512}, {50, 1024}, {10, 2048}};
|
{100, 256}, {50, 512}, {50, 1024}, {10, 2048}};
|
||||||
new PoolManager(objects::IPC_STORE, poolCfg);
|
ipcStore = new PoolManager(objects::IPC_STORE, poolCfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if OBSW_ADD_TCPIP_SERVERS == 1
|
#if OBSW_ADD_TCPIP_SERVERS == 1
|
||||||
@ -121,8 +122,10 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun
|
|||||||
new CcsdsDistributor(config::EIVE_PUS_APID, objects::CCSDS_PACKET_DISTRIBUTOR);
|
new CcsdsDistributor(config::EIVE_PUS_APID, objects::CCSDS_PACKET_DISTRIBUTOR);
|
||||||
new PusDistributor(config::EIVE_PUS_APID, objects::PUS_PACKET_DISTRIBUTOR, ccsdsDistrib);
|
new PusDistributor(config::EIVE_PUS_APID, objects::PUS_PACKET_DISTRIBUTOR, ccsdsDistrib);
|
||||||
|
|
||||||
*cfdpFunnel = new CfdpTmFunnel(objects::CFDP_TM_FUNNEL, config::EIVE_CFDP_APID, *tmStore, 50, 15);
|
*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);
|
*ipcStore);
|
||||||
|
*pusFunnel =
|
||||||
|
new PusTmFunnel(objects::PUS_TM_FUNNEL, *timeStamper, *tmStore, sdcMan, 80, 15, *ipcStore);
|
||||||
#if OBSW_ADD_TCPIP_SERVERS == 1
|
#if OBSW_ADD_TCPIP_SERVERS == 1
|
||||||
#if OBSW_ADD_TMTC_UDP_SERVER == 1
|
#if OBSW_ADD_TMTC_UDP_SERVER == 1
|
||||||
(*cfdpFunnel)->addDestination(*udpBridge, 0);
|
(*cfdpFunnel)->addDestination(*udpBridge, 0);
|
||||||
|
@ -5,8 +5,10 @@
|
|||||||
#include "fsfw/tmtcservices/TmTcMessage.h"
|
#include "fsfw/tmtcservices/TmTcMessage.h"
|
||||||
|
|
||||||
CfdpTmFunnel::CfdpTmFunnel(object_id_t objectId, uint16_t cfdpInCcsdsApid,
|
CfdpTmFunnel::CfdpTmFunnel(object_id_t objectId, uint16_t cfdpInCcsdsApid,
|
||||||
StorageManagerIF& tmStore, uint32_t tmMsgDepth, uint32_t tcMsgDepth)
|
StorageManagerIF& tmStore, uint32_t tmMsgDepth, uint32_t tcMsgDepth,
|
||||||
: TmFunnelBase(objectId, tmStore, tmMsgDepth, tcMsgDepth), cfdpInCcsdsApid(cfdpInCcsdsApid) {}
|
StorageManagerIF& ipcStore)
|
||||||
|
: TmFunnelBase(objectId, tmStore, tmMsgDepth, tcMsgDepth, ipcStore),
|
||||||
|
cfdpInCcsdsApid(cfdpInCcsdsApid) {}
|
||||||
|
|
||||||
const char* CfdpTmFunnel::getName() const { return "CFDP TM Funnel"; }
|
const char* CfdpTmFunnel::getName() const { return "CFDP TM Funnel"; }
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
class CfdpTmFunnel : public TmFunnelBase {
|
class CfdpTmFunnel : public TmFunnelBase {
|
||||||
public:
|
public:
|
||||||
CfdpTmFunnel(object_id_t objectId, uint16_t cfdpInCcsdsApid, StorageManagerIF& tmStore,
|
CfdpTmFunnel(object_id_t objectId, uint16_t cfdpInCcsdsApid, StorageManagerIF& tmStore,
|
||||||
uint32_t tmMsgDepth, uint32_t tcMsgDepth);
|
uint32_t tmMsgDepth, uint32_t tcMsgDepth, StorageManagerIF& ipcStore);
|
||||||
[[nodiscard]] const char* getName() const override;
|
[[nodiscard]] const char* getName() const override;
|
||||||
ReturnValue_t performOperation(uint8_t opCode);
|
ReturnValue_t performOperation(uint8_t opCode);
|
||||||
ReturnValue_t initialize() override;
|
ReturnValue_t initialize() override;
|
||||||
|
@ -9,8 +9,9 @@
|
|||||||
#include "fsfw/tmtcpacket/pus/tm/PusTmZcWriter.h"
|
#include "fsfw/tmtcpacket/pus/tm/PusTmZcWriter.h"
|
||||||
|
|
||||||
PusTmFunnel::PusTmFunnel(object_id_t objectId, TimeReaderIF &timeReader, StorageManagerIF &tmStore,
|
PusTmFunnel::PusTmFunnel(object_id_t objectId, TimeReaderIF &timeReader, StorageManagerIF &tmStore,
|
||||||
SdCardMountedIF &sdcMan, uint32_t tmMsgDepth, uint32_t tcMsgDepth)
|
SdCardMountedIF &sdcMan, uint32_t tmMsgDepth, uint32_t tcMsgDepth,
|
||||||
: TmFunnelBase(objectId, tmStore, tmMsgDepth, tcMsgDepth),
|
StorageManagerIF &ipcStore)
|
||||||
|
: TmFunnelBase(objectId, tmStore, tmMsgDepth, tcMsgDepth, ipcStore),
|
||||||
timeReader(timeReader),
|
timeReader(timeReader),
|
||||||
miscStore(objects::MISC_TM_STORE, "tm", "misc", RolloverInterval::HOURLY, 2, currentTv,
|
miscStore(objects::MISC_TM_STORE, "tm", "misc", RolloverInterval::HOURLY, 2, currentTv,
|
||||||
sdcMan),
|
sdcMan),
|
||||||
@ -51,24 +52,43 @@ ReturnValue_t PusTmFunnel::performOperation(uint8_t) {
|
|||||||
CommandMessage cmdMessage;
|
CommandMessage cmdMessage;
|
||||||
ReturnValue_t status = tcQueue->receiveMessage(&cmdMessage);
|
ReturnValue_t status = tcQueue->receiveMessage(&cmdMessage);
|
||||||
while (status == returnvalue::OK) {
|
while (status == returnvalue::OK) {
|
||||||
if (cmdMessage.getCommand() == messagetypes::TM_STORE) {
|
if (cmdMessage.getMessageType() == messagetypes::TM_STORE) {
|
||||||
|
Command_t cmd = cmdMessage.getCommand();
|
||||||
object_id_t objectId = TmStoreMessage::getObjectId(&cmdMessage);
|
object_id_t objectId = TmStoreMessage::getObjectId(&cmdMessage);
|
||||||
|
TmStore *tmStore = nullptr;
|
||||||
switch (objectId) {
|
switch (objectId) {
|
||||||
case (objects::HK_TM_STORE): {
|
case (objects::HK_TM_STORE): {
|
||||||
|
tmStore = &hkStore;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case (objects::OK_TM_STORE): {
|
case (objects::OK_TM_STORE): {
|
||||||
|
tmStore = &okStore;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case (objects::NOT_OK_TM_STORE): {
|
case (objects::NOT_OK_TM_STORE): {
|
||||||
|
tmStore = ¬OkStore;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case (objects::MISC_TM_STORE): {
|
case (objects::MISC_TM_STORE): {
|
||||||
|
tmStore = &miscStore;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (tmStore == nullptr) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (cmd == TmStoreMessage::DELETE_STORE_CONTENT_TIME) {
|
||||||
|
store_address_t storeId = TmStoreMessage::getStoreId(&cmdMessage);
|
||||||
|
auto accessor = ipcStore.getData(storeId);
|
||||||
|
uint32_t deleteUpToUnixSeconds = 0;
|
||||||
|
size_t size = accessor.second.size();
|
||||||
|
SerializeAdapter::deSerialize(&deleteUpToUnixSeconds, accessor.second.data(), &size,
|
||||||
|
SerializeIF::Endianness::NETWORK);
|
||||||
|
tmStore->deleteUpTo(deleteUpToUnixSeconds);
|
||||||
|
} else if (cmd == TmStoreMessage::DOWNLINK_STORE_CONTENT_TIME) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TmTcMessage currentMessage;
|
TmTcMessage currentMessage;
|
||||||
|
@ -23,7 +23,8 @@
|
|||||||
class PusTmFunnel : public TmFunnelBase {
|
class PusTmFunnel : public TmFunnelBase {
|
||||||
public:
|
public:
|
||||||
explicit PusTmFunnel(object_id_t objectId, TimeReaderIF &timeReader, StorageManagerIF &tmStore,
|
explicit PusTmFunnel(object_id_t objectId, TimeReaderIF &timeReader, StorageManagerIF &tmStore,
|
||||||
SdCardMountedIF &sdcMan, uint32_t tmMsgDepth, uint32_t tcMsgDepth);
|
SdCardMountedIF &sdcMan, uint32_t tmMsgDepth, uint32_t tcMsgDepth,
|
||||||
|
StorageManagerIF &ipcStore);
|
||||||
[[nodiscard]] const char *getName() const override;
|
[[nodiscard]] const char *getName() const override;
|
||||||
~PusTmFunnel() override;
|
~PusTmFunnel() override;
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
#include "fsfw/ipc/QueueFactory.h"
|
#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)
|
uint32_t tcMsgDepth, StorageManagerIF &ipcStore)
|
||||||
: SystemObject(objectId), tmStore(tmStore) {
|
: SystemObject(objectId), tmStore(tmStore), ipcStore(ipcStore) {
|
||||||
tmQueue = QueueFactory::instance()->createMessageQueue(tmMsgDepth);
|
tmQueue = QueueFactory::instance()->createMessageQueue(tmMsgDepth);
|
||||||
tcQueue = QueueFactory::instance()->createMessageQueue(tcMsgDepth);
|
tcQueue = QueueFactory::instance()->createMessageQueue(tcMsgDepth);
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ class TmFunnelBase : public TmStoreFrontendSimpleIF,
|
|||||||
public SystemObject {
|
public SystemObject {
|
||||||
public:
|
public:
|
||||||
TmFunnelBase(object_id_t objectId, StorageManagerIF& tmStore, uint32_t tmMsgDepth,
|
TmFunnelBase(object_id_t objectId, StorageManagerIF& tmStore, uint32_t tmMsgDepth,
|
||||||
uint32_t tcMsgDepth);
|
uint32_t tcMsgDepth, StorageManagerIF& ipcStore);
|
||||||
void addDestination(const AcceptsTelemetryIF& downlinkDestination, uint8_t vcid = 0);
|
void addDestination(const AcceptsTelemetryIF& downlinkDestination, uint8_t vcid = 0);
|
||||||
|
|
||||||
[[nodiscard]] MessageQueueId_t getCommandQueue() const override;
|
[[nodiscard]] MessageQueueId_t getCommandQueue() const override;
|
||||||
@ -23,6 +23,7 @@ class TmFunnelBase : public TmStoreFrontendSimpleIF,
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
StorageManagerIF& tmStore;
|
StorageManagerIF& tmStore;
|
||||||
|
StorageManagerIF& ipcStore;
|
||||||
std::vector<std::pair<MessageQueueId_t, uint8_t>> destinations;
|
std::vector<std::pair<MessageQueueId_t, uint8_t>> destinations;
|
||||||
MessageQueueIF* tcQueue = nullptr;
|
MessageQueueIF* tcQueue = nullptr;
|
||||||
MessageQueueIF* tmQueue = nullptr;
|
MessageQueueIF* tmQueue = nullptr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user