1
0
forked from fsfw/fsfw

finalized PUS C TM support

This commit is contained in:
2021-04-13 00:19:09 +02:00
parent f906605097
commit ed186b04df
13 changed files with 196 additions and 33 deletions

View File

@ -1,8 +1,9 @@
#include "Service17Test.h"
#include <FSFWConfig.h>
#include "../serviceinterface/ServiceInterfaceStream.h"
#include "../serviceinterface/ServiceInterface.h"
#include "../objectmanager/SystemObject.h"
#include "../tmtcpacket/pus/TmPacketStoredPusA.h"
#include "../tmtcpacket/pus/TmPacketStored.h"
Service17Test::Service17Test(object_id_t objectId,
@ -17,15 +18,25 @@ Service17Test::~Service17Test() {
ReturnValue_t Service17Test::handleRequest(uint8_t subservice) {
switch(subservice) {
case Subservice::CONNECTION_TEST: {
#if FSFW_USE_PUS_C_TELEMETRY == 0
TmPacketStoredPusA connectionPacket(apid, serviceId,
Subservice::CONNECTION_TEST_REPORT, packetSubCounter++);
#else
TmPacketStoredPusC connectionPacket(apid, serviceId,
Subservice::CONNECTION_TEST_REPORT, packetSubCounter++);
#endif
connectionPacket.sendPacket(requestQueue->getDefaultDestination(),
requestQueue->getId());
return HasReturnvaluesIF::RETURN_OK;
}
case Subservice::EVENT_TRIGGER_TEST: {
#if FSFW_USE_PUS_C_TELEMETRY == 0
TmPacketStoredPusA connectionPacket(apid, serviceId,
Subservice::CONNECTION_TEST_REPORT, packetSubCounter++);
#else
TmPacketStoredPusC connectionPacket(apid, serviceId,
Subservice::CONNECTION_TEST_REPORT, packetSubCounter++);
#endif
connectionPacket.sendPacket(requestQueue->getDefaultDestination(),
requestQueue->getId());
triggerEvent(TEST, 1234, 5678);