fsfw/pus/Service17Test.cpp

42 lines
1.3 KiB
C++
Raw Normal View History

2020-09-16 19:05:25 +02:00
#include "Service17Test.h"
#include "../serviceinterface/ServiceInterfaceStream.h"
#include "../objectmanager/SystemObject.h"
#include "../tmtcpacket/pus/TmPacketStored.h"
Service17Test::Service17Test(object_id_t objectId,
uint16_t apid, uint8_t serviceId):
PusServiceBase(objectId, apid, serviceId),
packetSubCounter(0) {
}
Service17Test::~Service17Test() {
}
ReturnValue_t Service17Test::handleRequest(uint8_t subservice) {
2021-01-29 17:16:34 +01:00
switch(subservice) {
2020-09-16 19:05:25 +02:00
case Subservice::CONNECTION_TEST: {
2021-04-12 21:53:08 +02:00
TmPacketStoredPusA connectionPacket(apid, serviceId,
2020-09-16 19:05:25 +02:00
Subservice::CONNECTION_TEST_REPORT, packetSubCounter++);
connectionPacket.sendPacket(requestQueue->getDefaultDestination(),
requestQueue->getId());
return HasReturnvaluesIF::RETURN_OK;
}
case Subservice::EVENT_TRIGGER_TEST: {
2021-04-12 21:53:08 +02:00
TmPacketStoredPusA connectionPacket(apid, serviceId,
2020-09-16 19:05:25 +02:00
Subservice::CONNECTION_TEST_REPORT, packetSubCounter++);
connectionPacket.sendPacket(requestQueue->getDefaultDestination(),
requestQueue->getId());
triggerEvent(TEST, 1234, 5678);
return RETURN_OK;
}
default:
return AcceptsTelecommandsIF::INVALID_SUBSERVICE;
}
}
ReturnValue_t Service17Test::performService() {
return HasReturnvaluesIF::RETURN_OK;
}