finalized PUS C TM support
This commit is contained in:
@ -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);
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include "../ipc/QueueFactory.h"
|
||||
#include "../tmtcservices/PusVerificationReport.h"
|
||||
#include "../tmtcpacket/pus/TmPacketStoredPusA.h"
|
||||
#include "../tmtcpacket/pus/TmPacketStored.h"
|
||||
#include "../serviceinterface/ServiceInterfaceStream.h"
|
||||
#include "../tmtcservices/AcceptsTelemetryIF.h"
|
||||
|
||||
@ -68,8 +68,13 @@ ReturnValue_t Service1TelecommandVerification::generateFailureReport(
|
||||
message->getTcSequenceControl(), message->getStep(),
|
||||
message->getErrorCode(), message->getParameter1(),
|
||||
message->getParameter2());
|
||||
#if FSFW_USE_PUS_C_TELEMETRY == 0
|
||||
TmPacketStoredPusA tmPacket(apid, serviceId, message->getReportId(),
|
||||
packetSubCounter++, &report);
|
||||
#else
|
||||
TmPacketStoredPusC tmPacket(apid, serviceId, message->getReportId(),
|
||||
packetSubCounter++, &report);
|
||||
#endif
|
||||
ReturnValue_t result = tmPacket.sendPacket(tmQueue->getDefaultDestination(),
|
||||
tmQueue->getId());
|
||||
return result;
|
||||
@ -79,8 +84,13 @@ ReturnValue_t Service1TelecommandVerification::generateSuccessReport(
|
||||
PusVerificationMessage *message) {
|
||||
SuccessReport report(message->getReportId(),message->getTcPacketId(),
|
||||
message->getTcSequenceControl(),message->getStep());
|
||||
#if FSFW_USE_PUS_C_TELEMETRY == 0
|
||||
TmPacketStoredPusA tmPacket(apid, serviceId, message->getReportId(),
|
||||
packetSubCounter++, &report);
|
||||
#else
|
||||
TmPacketStoredPusC tmPacket(apid, serviceId, message->getReportId(),
|
||||
packetSubCounter++, &report);
|
||||
#endif
|
||||
ReturnValue_t result = tmPacket.sendPacket(tmQueue->getDefaultDestination(),
|
||||
tmQueue->getId());
|
||||
return result;
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include "../serviceinterface/ServiceInterfaceStream.h"
|
||||
#include "../events/EventManagerIF.h"
|
||||
#include "../ipc/QueueFactory.h"
|
||||
#include "../tmtcpacket/pus/TmPacketStoredPusA.h"
|
||||
#include "../tmtcpacket/pus/TmPacketStored.h"
|
||||
|
||||
|
||||
Service5EventReporting::Service5EventReporting(object_id_t objectId,
|
||||
@ -52,8 +52,13 @@ ReturnValue_t Service5EventReporting::generateEventReport(
|
||||
{
|
||||
EventReport report(message.getEventId(),message.getReporter(),
|
||||
message.getParameter1(),message.getParameter2());
|
||||
#if FSFW_USE_PUS_C_TELEMETRY == 0
|
||||
TmPacketStoredPusA tmPacket(PusServiceBase::apid, PusServiceBase::serviceId,
|
||||
message.getSeverity(), packetSubCounter++, &report);
|
||||
#else
|
||||
TmPacketStoredPusC tmPacket(PusServiceBase::apid, PusServiceBase::serviceId,
|
||||
message.getSeverity(), packetSubCounter++, &report);
|
||||
#endif
|
||||
ReturnValue_t result = tmPacket.sendPacket(
|
||||
requestQueue->getDefaultDestination(),requestQueue->getId());
|
||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||
|
Reference in New Issue
Block a user