updates for new API
This commit is contained in:
parent
751ae6062e
commit
4a28f79e3a
2
fsfw
2
fsfw
@ -1 +1 @@
|
||||
Subproject commit f4c4f9946c7fb9fd050178baa4865da654366b70
|
||||
Subproject commit 007f958a0b787a572bf1bd98b348c3a632799bf7
|
@ -45,6 +45,7 @@ class AcsController : public ExtendedControllerBase {
|
||||
PoolEntry<float> mgm3PoolVec = PoolEntry<float>(3);
|
||||
PoolEntry<float> imtqMgmPoolVec = PoolEntry<float>(3);
|
||||
PoolEntry<uint8_t> imtqCalActStatus = PoolEntry<uint8_t>();
|
||||
|
||||
void copyMgmData();
|
||||
|
||||
// Initial delay to make sure all pool variables have been initialized their owners
|
||||
|
@ -200,10 +200,12 @@ ReturnValue_t ThermalController::initializeLocalDataPool(localpool::DataPool& lo
|
||||
localDataPoolMap.emplace(thermalControllerDefinitions::TEMP_ADC_PAYLOAD_PCDU,
|
||||
new PoolEntry<float>({0.0}));
|
||||
|
||||
poolManager.subscribeForPeriodicPacket(sensorTemperatures.getSid(), false, 1.0, false);
|
||||
poolManager.subscribeForPeriodicPacket(susTemperatures.getSid(), false, 1.0, false);
|
||||
poolManager.subscribeForPeriodicPacket(deviceTemperatures.getSid(), false, 1.0, false);
|
||||
|
||||
poolManager.subscribeForRegularPeriodicPacket(
|
||||
subdp::RegularHkPeriodicParams(sensorTemperatures.getSid(), false, 10.0));
|
||||
poolManager.subscribeForRegularPeriodicPacket(
|
||||
subdp::RegularHkPeriodicParams(susTemperatures.getSid(), false, 10.0));
|
||||
poolManager.subscribeForRegularPeriodicPacket(
|
||||
subdp::RegularHkPeriodicParams(deviceTemperatures.getSid(), false, 10.0));
|
||||
return RETURN_OK;
|
||||
}
|
||||
|
||||
|
@ -15,8 +15,8 @@
|
||||
#include <fsfw/pus/Service9TimeManagement.h>
|
||||
#include <fsfw/storagemanager/PoolManager.h>
|
||||
#include <fsfw/tcdistribution/CCSDSDistributor.h>
|
||||
#include <fsfw/tcdistribution/PUSDistributor.h>
|
||||
#include <fsfw/timemanager/TimeStamper.h>
|
||||
#include <fsfw/tcdistribution/PusDistributor.h>
|
||||
#include <fsfw/timemanager/CdsShortTimeStamper.h>
|
||||
#include <mission/tmtc/TmFunnel.h>
|
||||
|
||||
#include "OBSWConfig.h"
|
||||
@ -54,7 +54,7 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_) {
|
||||
*healthTable_ = healthTable;
|
||||
}
|
||||
new InternalErrorReporter(objects::INTERNAL_ERROR_REPORTER);
|
||||
new TimeStamper(objects::TIME_STAMPER);
|
||||
auto* timeStamper = new CdsShortTimeStamper(objects::TIME_STAMPER);
|
||||
|
||||
{
|
||||
PoolManager::LocalPoolConfig poolCfg = {{300, 16}, {300, 32}, {200, 64},
|
||||
@ -75,15 +75,14 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_) {
|
||||
}
|
||||
|
||||
auto* ccsdsDistrib = new CCSDSDistributor(apid::EIVE_OBSW, objects::CCSDS_PACKET_DISTRIBUTOR);
|
||||
new PUSDistributor(apid::EIVE_OBSW, objects::PUS_PACKET_DISTRIBUTOR,
|
||||
objects::CCSDS_PACKET_DISTRIBUTOR);
|
||||
new PusDistributor(apid::EIVE_OBSW, objects::PUS_PACKET_DISTRIBUTOR, ccsdsDistrib);
|
||||
|
||||
uint8_t vc = 0;
|
||||
#if OBSW_TM_TO_PTME == 1
|
||||
vc = config::LIVE_TM;
|
||||
#endif
|
||||
// Every TM packet goes through this funnel
|
||||
new TmFunnel(objects::TM_FUNNEL, 50, vc);
|
||||
new TmFunnel(objects::TM_FUNNEL, *timeStamper, 50, vc);
|
||||
|
||||
// PUS service stack
|
||||
new Service1TelecommandVerification(objects::PUS_SERVICE_1_VERIFICATION, apid::EIVE_OBSW,
|
||||
@ -92,15 +91,15 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_) {
|
||||
pus::PUS_SERVICE_2, 3, 10);
|
||||
new Service3Housekeeping(objects::PUS_SERVICE_3_HOUSEKEEPING, apid::EIVE_OBSW,
|
||||
pus::PUS_SERVICE_3);
|
||||
new Service5EventReporting(objects::PUS_SERVICE_5_EVENT_REPORTING, apid::EIVE_OBSW,
|
||||
pus::PUS_SERVICE_5, 15, 45);
|
||||
new Service5EventReporting(PsbParams(objects::PUS_SERVICE_5_EVENT_REPORTING, apid::EIVE_OBSW,
|
||||
pus::PUS_SERVICE_5), 15, 45);
|
||||
new Service8FunctionManagement(objects::PUS_SERVICE_8_FUNCTION_MGMT, apid::EIVE_OBSW,
|
||||
pus::PUS_SERVICE_8, 3, 60);
|
||||
new Service9TimeManagement(objects::PUS_SERVICE_9_TIME_MGMT, apid::EIVE_OBSW, pus::PUS_SERVICE_9);
|
||||
new Service9TimeManagement(PsbParams(objects::PUS_SERVICE_9_TIME_MGMT, apid::EIVE_OBSW, pus::PUS_SERVICE_9));
|
||||
|
||||
new Service11TelecommandScheduling<common::OBSW_MAX_SCHEDULED_TCS>(
|
||||
objects::PUS_SERVICE_11_TC_SCHEDULER, apid::EIVE_OBSW, pus::PUS_SERVICE_11, ccsdsDistrib);
|
||||
new Service17Test(objects::PUS_SERVICE_17_TEST, apid::EIVE_OBSW, pus::PUS_SERVICE_17);
|
||||
PsbParams(objects::PUS_SERVICE_11_TC_SCHEDULER, apid::EIVE_OBSW, pus::PUS_SERVICE_11), ccsdsDistrib);
|
||||
new Service17Test(PsbParams(objects::PUS_SERVICE_17_TEST, apid::EIVE_OBSW, pus::PUS_SERVICE_17));
|
||||
new Service20ParameterManagement(objects::PUS_SERVICE_20_PARAMETERS, apid::EIVE_OBSW,
|
||||
pus::PUS_SERVICE_20);
|
||||
new CService200ModeCommanding(objects::PUS_SERVICE_200_MODE_MGMT, apid::EIVE_OBSW,
|
||||
|
@ -170,8 +170,10 @@ ReturnValue_t ACUHandler::initializeLocalDataPool(localpool::DataPool &localData
|
||||
localDataPoolMap.emplace(pool::ACU_WDT_CNT_GND, new PoolEntry<uint32_t>({0}));
|
||||
localDataPoolMap.emplace(pool::ACU_WDT_GND_LEFT, new PoolEntry<uint32_t>({0}));
|
||||
|
||||
poolManager.subscribeForPeriodicPacket(coreHk.getSid(), false, 10.0, true);
|
||||
poolManager.subscribeForPeriodicPacket(auxHk.getSid(), false, 30.0, false);
|
||||
poolManager.subscribeForDiagPeriodicPacket(
|
||||
subdp::DiagnosticsHkPeriodicParams(coreHk.getSid(), false, 10.0));
|
||||
poolManager.subscribeForRegularPeriodicPacket(
|
||||
subdp::RegularHkPeriodicParams(auxHk.getSid(), false, 30.0));
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
|
@ -270,7 +270,8 @@ ReturnValue_t BpxBatteryHandler::initializeLocalDataPool(localpool::DataPool& lo
|
||||
localDataPoolMap.emplace(BpxBattery::BATTERY_HEATER_MODE, &battheatMode);
|
||||
localDataPoolMap.emplace(BpxBattery::BATTHEAT_LOW_LIMIT, &battheatLow);
|
||||
localDataPoolMap.emplace(BpxBattery::BATTHEAT_HIGH_LIMIT, &battheatHigh);
|
||||
poolManager.subscribeForPeriodicPacket(hkSet.getSid(), false, 30.0, false);
|
||||
poolManager.subscribeForRegularPeriodicPacket(
|
||||
subdp::RegularHkPeriodicParams(hkSet.getSid(), false, 30.0));
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
|
@ -363,7 +363,8 @@ ReturnValue_t GyroADIS1650XHandler::initializeLocalDataPool(localpool::DataPool
|
||||
localDataPoolMap.emplace(ADIS1650X::FILTER_SETTINGS, new PoolEntry<uint8_t>());
|
||||
localDataPoolMap.emplace(ADIS1650X::MSC_CTRL_REGISTER, new PoolEntry<uint16_t>());
|
||||
localDataPoolMap.emplace(ADIS1650X::DEC_RATE_REGISTER, new PoolEntry<uint16_t>());
|
||||
poolManager.subscribeForPeriodicPacket(primaryDataset.getSid(), false, 5.0, true);
|
||||
poolManager.subscribeForRegularPeriodicPacket(
|
||||
subdp::RegularHkPeriodicParams(primaryDataset.getSid(), false, 5.0));
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
|
@ -604,9 +604,12 @@ ReturnValue_t IMTQHandler::initializeLocalDataPool(localpool::DataPool& localDat
|
||||
localDataPoolMap.emplace(IMTQ::FINA_NEG_Z_COIL_Y_TEMPERATURE, new PoolEntry<int16_t>({0}));
|
||||
localDataPoolMap.emplace(IMTQ::FINA_NEG_Z_COIL_Z_TEMPERATURE, new PoolEntry<int16_t>({0}));
|
||||
|
||||
poolManager.subscribeForPeriodicPacket(engHkDataset.getSid(), false, 10.0, true);
|
||||
poolManager.subscribeForPeriodicPacket(calMtmMeasurementSet.getSid(), false, 10.0, true);
|
||||
poolManager.subscribeForPeriodicPacket(rawMtmMeasurementSet.getSid(), false, 10.0, true);
|
||||
poolManager.subscribeForDiagPeriodicPacket(
|
||||
subdp::DiagnosticsHkPeriodicParams(engHkDataset.getSid(), false, 10.0));
|
||||
poolManager.subscribeForDiagPeriodicPacket(
|
||||
subdp::DiagnosticsHkPeriodicParams(calMtmMeasurementSet.getSid(), false, 10.0));
|
||||
poolManager.subscribeForDiagPeriodicPacket(
|
||||
subdp::DiagnosticsHkPeriodicParams(rawMtmMeasurementSet.getSid(), false, 10.0));
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
|
@ -184,7 +184,8 @@ ReturnValue_t Max31865EiveHandler::initializeLocalDataPool(localpool::DataPool&
|
||||
localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::LAST_FAULT_BYTE),
|
||||
new PoolEntry<uint8_t>({0}));
|
||||
localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::FAULT_BYTE), new PoolEntry<uint8_t>({0}));
|
||||
poolManager.subscribeForPeriodicPacket(sensorDataset.getSid(), false, 30.0, false);
|
||||
poolManager.subscribeForRegularPeriodicPacket(
|
||||
subdp::RegularHkPeriodicParams(sensorDataset.getSid(), false, 30.0));
|
||||
return RETURN_OK;
|
||||
}
|
||||
|
||||
|
@ -514,7 +514,8 @@ ReturnValue_t Max31865PT1000Handler::initializeLocalDataPool(localpool::DataPool
|
||||
localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::LAST_FAULT_BYTE),
|
||||
new PoolEntry<uint8_t>({0}));
|
||||
localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::FAULT_BYTE), new PoolEntry<uint8_t>({0}));
|
||||
poolManager.subscribeForPeriodicPacket(sensorDataset.getSid(), false, 30.0, false);
|
||||
poolManager.subscribeForRegularPeriodicPacket(
|
||||
subdp::RegularHkPeriodicParams(sensorDataset.getSid(), false, 30.0));
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
|
@ -225,8 +225,10 @@ ReturnValue_t P60DockHandler::initializeLocalDataPool(localpool::DataPool &local
|
||||
|
||||
localDataPoolMap.emplace(pool::P60DOCK_ANT6_DEPL, new PoolEntry<int8_t>({0}));
|
||||
localDataPoolMap.emplace(pool::P60DOCK_AR6_DEPL, new PoolEntry<int8_t>({0}));
|
||||
poolManager.subscribeForPeriodicPacket(coreHk.getSid(), false, 10.0, false);
|
||||
poolManager.subscribeForPeriodicPacket(auxHk.getSid(), false, 30.0, false);
|
||||
poolManager.subscribeForDiagPeriodicPacket(
|
||||
subdp::DiagnosticsHkPeriodicParams(coreHk.getSid(), false, 10.0));
|
||||
poolManager.subscribeForRegularPeriodicPacket(
|
||||
subdp::RegularHkPeriodicParams(auxHk.getSid(), false, 30.0));
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
|
@ -394,7 +394,8 @@ ReturnValue_t PCDUHandler::initializeLocalDataPool(localpool::DataPool& localDat
|
||||
using namespace pcdu;
|
||||
localDataPoolMap.emplace(PoolIds::PDU1_SWITCHES, &pdu1Switches);
|
||||
localDataPoolMap.emplace(PoolIds::PDU2_SWITCHES, &pdu2Switches);
|
||||
poolManager.subscribeForPeriodicPacket(switcherSet.getSid(), false, 5.0, true);
|
||||
poolManager.subscribeForRegularPeriodicPacket(
|
||||
subdp::RegularHkPeriodicParams(switcherSet.getSid(), false, 5.0));
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ class PCDUHandler : public PowerSwitchIF,
|
||||
virtual ReturnValue_t initialize() override;
|
||||
virtual ReturnValue_t performOperation(uint8_t counter) override;
|
||||
virtual void handleChangedDataset(sid_t sid,
|
||||
store_address_t storeId = storeId::INVALID_STORE_ADDRESS,
|
||||
store_address_t storeId = store_address_t::invalid(),
|
||||
bool* clearMessage = nullptr) override;
|
||||
|
||||
virtual ReturnValue_t sendSwitchCommand(uint8_t switchNr, ReturnValue_t onOff) override;
|
||||
|
@ -86,8 +86,10 @@ void PDU1Handler::parseHkTableReply(const uint8_t *packet) {
|
||||
ReturnValue_t PDU1Handler::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||
LocalDataPoolManager &poolManager) {
|
||||
initializePduPool(localDataPoolMap, poolManager, pcdu::INIT_SWITCHES_PDU1);
|
||||
poolManager.subscribeForPeriodicPacket(coreHk.getSid(), false, 10.0, true);
|
||||
poolManager.subscribeForPeriodicPacket(auxHk.getSid(), false, 30.0, false);
|
||||
poolManager.subscribeForDiagPeriodicPacket(
|
||||
subdp::DiagnosticsHkPeriodicParams(coreHk.getSid(), false, 10.0));
|
||||
poolManager.subscribeForRegularPeriodicPacket(
|
||||
subdp::RegularHkPeriodicParams(auxHk.getSid(), false, 30.0));
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
|
@ -49,8 +49,10 @@ void PDU2Handler::parseHkTableReply(const uint8_t *packet) {
|
||||
ReturnValue_t PDU2Handler::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||
LocalDataPoolManager &poolManager) {
|
||||
initializePduPool(localDataPoolMap, poolManager, pcdu::INIT_SWITCHES_PDU2);
|
||||
poolManager.subscribeForPeriodicPacket(coreHk.getSid(), false, 10.0, true);
|
||||
poolManager.subscribeForPeriodicPacket(auxHk.getSid(), false, 30.0, false);
|
||||
poolManager.subscribeForDiagPeriodicPacket(
|
||||
subdp::DiagnosticsHkPeriodicParams(coreHk.getSid(), false, 10.0));
|
||||
poolManager.subscribeForRegularPeriodicPacket(
|
||||
subdp::RegularHkPeriodicParams(auxHk.getSid(), false, 30.0));
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
|
@ -295,7 +295,8 @@ ReturnValue_t PayloadPcduHandler::initializeLocalDataPool(localpool::DataPool& l
|
||||
localDataPoolMap.emplace(plpcdu::PlPcduPoolIds::CHANNEL_VEC, &channelValues);
|
||||
localDataPoolMap.emplace(plpcdu::PlPcduPoolIds::PROCESSED_VEC, &processedValues);
|
||||
localDataPoolMap.emplace(plpcdu::PlPcduPoolIds::TEMP, &tempC);
|
||||
poolManager.subscribeForPeriodicPacket(adcSet.getSid(), false, 5.0, true);
|
||||
poolManager.subscribeForDiagPeriodicPacket(
|
||||
subdp::DiagnosticsHkPeriodicParams(adcSet.getSid(), false, 5.0));
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
|
@ -204,7 +204,8 @@ ReturnValue_t RadiationSensorHandler::initializeLocalDataPool(localpool::DataPoo
|
||||
localDataPoolMap.emplace(RAD_SENSOR::AIN5, new PoolEntry<uint16_t>({0}));
|
||||
localDataPoolMap.emplace(RAD_SENSOR::AIN6, new PoolEntry<uint16_t>({0}));
|
||||
localDataPoolMap.emplace(RAD_SENSOR::AIN7, new PoolEntry<uint16_t>({0}));
|
||||
poolManager.subscribeForPeriodicPacket(dataset.getSid(), false, 20.0, false);
|
||||
poolManager.subscribeForRegularPeriodicPacket(
|
||||
subdp::RegularHkPeriodicParams(dataset.getSid(), false, 20.0));
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
|
@ -277,9 +277,12 @@ ReturnValue_t RwHandler::initializeLocalDataPool(localpool::DataPool& localDataP
|
||||
localDataPoolMap.emplace(RwDefinitions::SPI_BYTES_READ, new PoolEntry<uint32_t>({0}));
|
||||
localDataPoolMap.emplace(RwDefinitions::SPI_REG_OVERRUN_ERRORS, new PoolEntry<uint32_t>({0}));
|
||||
localDataPoolMap.emplace(RwDefinitions::SPI_TOTAL_ERRORS, new PoolEntry<uint32_t>({0}));
|
||||
poolManager.subscribeForPeriodicPacket(statusSet.getSid(), false, 5.0, true);
|
||||
poolManager.subscribeForPeriodicPacket(tmDataset.getSid(), false, 30.0, false);
|
||||
poolManager.subscribeForPeriodicPacket(lastResetStatusSet.getSid(), false, 30.0, false);
|
||||
poolManager.subscribeForDiagPeriodicPacket(
|
||||
subdp::DiagnosticsHkPeriodicParams(statusSet.getSid(), false, 5.0));
|
||||
poolManager.subscribeForRegularPeriodicPacket(
|
||||
subdp::RegularHkPeriodicParams(tmDataset.getSid(), false, 30.0));
|
||||
poolManager.subscribeForRegularPeriodicPacket(
|
||||
subdp::RegularHkPeriodicParams(lastResetStatusSet.getSid(), false, 30.0));
|
||||
return RETURN_OK;
|
||||
}
|
||||
|
||||
|
@ -202,7 +202,8 @@ ReturnValue_t SusHandler::initializeLocalDataPool(localpool::DataPool &localData
|
||||
LocalDataPoolManager &poolManager) {
|
||||
localDataPoolMap.emplace(SUS::TEMPERATURE_C, &tempC);
|
||||
localDataPoolMap.emplace(SUS::CHANNEL_VEC, &channelVec);
|
||||
poolManager.subscribeForPeriodicPacket(dataset.getSid(), false, 5.0, true);
|
||||
poolManager.subscribeForDiagPeriodicPacket(
|
||||
subdp::DiagnosticsHkPeriodicParams(dataset.getSid(), false, 5.0));
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
|
@ -621,9 +621,12 @@ ReturnValue_t SyrlinksHkHandler::initializeLocalDataPool(localpool::DataPool& lo
|
||||
localDataPoolMap.emplace(syrlinks::TEMP_BASEBAND_BOARD, new PoolEntry<float>({0}));
|
||||
localDataPoolMap.emplace(syrlinks::TEMP_POWER_AMPLIFIER, new PoolEntry<float>({0}));
|
||||
|
||||
poolManager.subscribeForPeriodicPacket(txDataset.getSid(), false, 5.0, true);
|
||||
poolManager.subscribeForPeriodicPacket(rxDataset.getSid(), false, 5.0, true);
|
||||
poolManager.subscribeForPeriodicPacket(temperatureSet.getSid(), false, 10.0, false);
|
||||
poolManager.subscribeForDiagPeriodicPacket(
|
||||
subdp::DiagnosticsHkPeriodicParams(txDataset.getSid(), false, 5.0));
|
||||
poolManager.subscribeForDiagPeriodicPacket(
|
||||
subdp::DiagnosticsHkPeriodicParams(rxDataset.getSid(), false, 5.0));
|
||||
poolManager.subscribeForRegularPeriodicPacket(
|
||||
subdp::RegularHkPeriodicParams(temperatureSet.getSid(), false, 10.0));
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
|
@ -123,6 +123,7 @@ uint32_t Tmp1075Handler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) {
|
||||
ReturnValue_t Tmp1075Handler::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||
LocalDataPoolManager &poolManager) {
|
||||
localDataPoolMap.emplace(TMP1075::TEMPERATURE_C_TMP1075, new PoolEntry<float>({0.0}));
|
||||
poolManager.subscribeForPeriodicPacket(dataset.getSid(), false, 30.0, false);
|
||||
poolManager.subscribeForRegularPeriodicPacket(
|
||||
subdp::RegularHkPeriodicParams(dataset.getSid(), false, 30.0));
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include <fsfw/ipc/QueueFactory.h>
|
||||
#include <fsfw/objectmanager/ObjectManager.h>
|
||||
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
||||
#include <fsfw/timemanager/CdsShortTimeStamper.h>
|
||||
#include <fsfw/tmtcpacket/pus/tm.h>
|
||||
#include <mission/tmtc/TmFunnel.h>
|
||||
|
||||
@ -9,8 +10,9 @@
|
||||
object_id_t TmFunnel::downlinkDestination = objects::NO_OBJECT;
|
||||
object_id_t TmFunnel::storageDestination = objects::NO_OBJECT;
|
||||
|
||||
TmFunnel::TmFunnel(object_id_t objectId, uint32_t messageDepth, uint8_t reportReceptionVc)
|
||||
: SystemObject(objectId), messageDepth(messageDepth), reportReceptionVc(reportReceptionVc) {
|
||||
TmFunnel::TmFunnel(object_id_t objectId, CdsShortTimeStamper& timeReader, uint32_t messageDepth,
|
||||
uint8_t reportReceptionVc)
|
||||
: SystemObject(objectId), timeReader(timeReader), messageDepth(messageDepth), reportReceptionVc(reportReceptionVc) {
|
||||
auto mqArgs = MqArgs(objectId, static_cast<void*>(this));
|
||||
tmQueue = QueueFactory::instance()->createMessageQueue(
|
||||
messageDepth, MessageQueueMessage::MAX_MESSAGE_SIZE, &mqArgs);
|
||||
@ -49,11 +51,16 @@ ReturnValue_t TmFunnel::handlePacket(TmTcMessage* message) {
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
return result;
|
||||
}
|
||||
TmPacketPusC packet(packetData);
|
||||
packet.setPacketSequenceCount(this->sourceSequenceCount);
|
||||
sourceSequenceCount++;
|
||||
sourceSequenceCount = sourceSequenceCount % SpacePacketBase::LIMIT_SEQUENCE_COUNT;
|
||||
packet.setErrorControl();
|
||||
|
||||
PusTmZeroCopyWriter packet(timeReader, packetData, size);
|
||||
result = packet.parseDataWithoutCrcCheck();
|
||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||
return result;
|
||||
}
|
||||
packet.setSequenceCount(sourceSequenceCount++);
|
||||
sourceSequenceCount = sourceSequenceCount % ccsds::LIMIT_SEQUENCE_COUNT;
|
||||
packet.updateErrorControl();
|
||||
|
||||
|
||||
result = tmQueue->sendToDefault(message);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
@ -107,7 +114,7 @@ ReturnValue_t TmFunnel::initialize() {
|
||||
AcceptsTelemetryIF* storageTarget =
|
||||
ObjectManager::instance()->get<AcceptsTelemetryIF>(storageDestination);
|
||||
if (storageTarget != nullptr) {
|
||||
storageQueue->setDefaultDestination(storageTarget->getReportReceptionQueue());
|
||||
storageQueue->setDefaultDestination(storageTarget->getReportReceptionQueue(0));
|
||||
}
|
||||
|
||||
return SystemObject::initialize();
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <fsfw/ipc/MessageQueueIF.h>
|
||||
#include <fsfw/objectmanager/SystemObject.h>
|
||||
#include <fsfw/tasks/ExecutableObjectIF.h>
|
||||
#include <fsfw/timemanager/CdsShortTimeStamper.h>
|
||||
#include <fsfw/tmtcservices/AcceptsTelemetryIF.h>
|
||||
#include <fsfw/tmtcservices/TmTcMessage.h>
|
||||
|
||||
@ -23,7 +24,7 @@ class TmFunnel : public AcceptsTelemetryIF, public ExecutableObjectIF, public Sy
|
||||
friend void(Factory::setStaticFrameworkObjectIds)();
|
||||
|
||||
public:
|
||||
TmFunnel(object_id_t objectId, uint32_t messageDepth = 20, uint8_t reportReceptionVc = 0);
|
||||
TmFunnel(object_id_t objectId, CdsShortTimeStamper& timeReader, uint32_t messageDepth = 20, uint8_t reportReceptionVc = 0);
|
||||
virtual ~TmFunnel();
|
||||
|
||||
virtual MessageQueueId_t getReportReceptionQueue(uint8_t virtualChannel = 0) override;
|
||||
@ -35,6 +36,7 @@ class TmFunnel : public AcceptsTelemetryIF, public ExecutableObjectIF, public Sy
|
||||
static object_id_t storageDestination;
|
||||
|
||||
private:
|
||||
CdsShortTimeStamper& timeReader;
|
||||
uint32_t messageDepth = 0;
|
||||
uint8_t reportReceptionVc = 0;
|
||||
uint16_t sourceSequenceCount = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user