Merge branch 'development' into mueller/newLocalDataPools
This commit is contained in:
commit
a5134769ed
@ -5,3 +5,9 @@
|
|||||||
|
|
||||||
- vRequestContextSwitchFromISR is declared extern "C" so it can be defined in
|
- vRequestContextSwitchFromISR is declared extern "C" so it can be defined in
|
||||||
a C file without issues
|
a C file without issues
|
||||||
|
|
||||||
|
### PUS Services
|
||||||
|
|
||||||
|
- It is now possible to change the message queue depth for the telecommand verification service (PUS1)
|
||||||
|
- The same is possible for the event reporting service (PUS5)
|
||||||
|
- PUS Health Service added, which allows to command and retrieve health via PUS packets
|
||||||
|
@ -18,6 +18,8 @@ public:
|
|||||||
static const uint8_t TRANSITION_MODE_CHILD_ACTION_MASK = 0x20;
|
static const uint8_t TRANSITION_MODE_CHILD_ACTION_MASK = 0x20;
|
||||||
static const uint8_t TRANSITION_MODE_BASE_ACTION_MASK = 0x10;
|
static const uint8_t TRANSITION_MODE_BASE_ACTION_MASK = 0x10;
|
||||||
|
|
||||||
|
static constexpr Command_t NO_COMMAND = -1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This is the mode the <strong>device handler</strong> is in.
|
* @brief This is the mode the <strong>device handler</strong> is in.
|
||||||
*
|
*
|
||||||
|
@ -13,7 +13,7 @@ extern "C" {
|
|||||||
* Architecture dependant portmacro.h function call.
|
* Architecture dependant portmacro.h function call.
|
||||||
* Should be implemented in bsp.
|
* Should be implemented in bsp.
|
||||||
*/
|
*/
|
||||||
extern void vRequestContextSwitchFromISR();
|
extern "C" void vRequestContextSwitchFromISR();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Used by functions to tell if they are being called from
|
* Used by functions to tell if they are being called from
|
||||||
|
@ -7,9 +7,10 @@
|
|||||||
#include "../modes/ModeMessage.h"
|
#include "../modes/ModeMessage.h"
|
||||||
|
|
||||||
CService200ModeCommanding::CService200ModeCommanding(object_id_t objectId,
|
CService200ModeCommanding::CService200ModeCommanding(object_id_t objectId,
|
||||||
uint16_t apid, uint8_t serviceId):
|
uint16_t apid, uint8_t serviceId, uint8_t numParallelCommands,
|
||||||
|
uint16_t commandTimeoutSeconds):
|
||||||
CommandingServiceBase(objectId, apid, serviceId,
|
CommandingServiceBase(objectId, apid, serviceId,
|
||||||
NUMBER_OF_PARALLEL_COMMANDS,COMMAND_TIMEOUT_SECONDS) {}
|
numParallelCommands, commandTimeoutSeconds) {}
|
||||||
|
|
||||||
CService200ModeCommanding::~CService200ModeCommanding() {}
|
CService200ModeCommanding::~CService200ModeCommanding() {}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef FRAMEWORK_PUS_CSERVICE200MODECOMMANDING_H_
|
#ifndef FSFW_PUS_CSERVICE200MODECOMMANDING_H_
|
||||||
#define FRAMEWORK_PUS_CSERVICE200MODECOMMANDING_H_
|
#define FSFW_PUS_CSERVICE200MODECOMMANDING_H_
|
||||||
|
|
||||||
#include "../tmtcservices/CommandingServiceBase.h"
|
#include "../tmtcservices/CommandingServiceBase.h"
|
||||||
|
|
||||||
@ -15,11 +15,10 @@
|
|||||||
*/
|
*/
|
||||||
class CService200ModeCommanding: public CommandingServiceBase {
|
class CService200ModeCommanding: public CommandingServiceBase {
|
||||||
public:
|
public:
|
||||||
static constexpr uint8_t NUMBER_OF_PARALLEL_COMMANDS = 4;
|
|
||||||
static constexpr uint16_t COMMAND_TIMEOUT_SECONDS = 60;
|
|
||||||
|
|
||||||
CService200ModeCommanding(object_id_t objectId,
|
CService200ModeCommanding(object_id_t objectId,
|
||||||
uint16_t apid, uint8_t serviceId);
|
uint16_t apid, uint8_t serviceId, uint8_t numParallelCommands = 4,
|
||||||
|
uint16_t commandTimeoutSeconds = 60);
|
||||||
virtual~ CService200ModeCommanding();
|
virtual~ CService200ModeCommanding();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -82,4 +81,4 @@ private:
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* FRAMEWORK_PUS_CSERVICE200MODECOMMANDING_H_ */
|
#endif /* FSFW_PUS_CSERVICE200MODECOMMANDING_H_ */
|
||||||
|
106
pus/CService201HealthCommanding.cpp
Normal file
106
pus/CService201HealthCommanding.cpp
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
#include "CService201HealthCommanding.h"
|
||||||
|
|
||||||
|
#include "../health/HasHealthIF.h"
|
||||||
|
#include "../serviceinterface/ServiceInterfaceStream.h"
|
||||||
|
#include "../health/HealthMessage.h"
|
||||||
|
#include "servicepackets/Service201Packets.h"
|
||||||
|
|
||||||
|
CService201HealthCommanding::CService201HealthCommanding(object_id_t objectId,
|
||||||
|
uint16_t apid, uint8_t serviceId, uint8_t numParallelCommands,
|
||||||
|
uint16_t commandTimeoutSeconds):
|
||||||
|
CommandingServiceBase(objectId, apid, serviceId,
|
||||||
|
numParallelCommands, commandTimeoutSeconds) {
|
||||||
|
}
|
||||||
|
|
||||||
|
CService201HealthCommanding::~CService201HealthCommanding() {
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t CService201HealthCommanding::isValidSubservice(uint8_t subservice) {
|
||||||
|
switch(subservice) {
|
||||||
|
case(Subservice::COMMAND_SET_HEALTH):
|
||||||
|
case(Subservice::COMMAND_ANNOUNCE_HEALTH):
|
||||||
|
case(Subservice::COMMAND_ANNOUNCE_HEALTH_ALL):
|
||||||
|
return RETURN_OK;
|
||||||
|
default:
|
||||||
|
sif::error << "Invalid Subservice" << std::endl;
|
||||||
|
return AcceptsTelecommandsIF::INVALID_SUBSERVICE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t CService201HealthCommanding::getMessageQueueAndObject(
|
||||||
|
uint8_t subservice, const uint8_t *tcData, size_t tcDataLen,
|
||||||
|
MessageQueueId_t *id, object_id_t *objectId) {
|
||||||
|
if(tcDataLen < sizeof(object_id_t)) {
|
||||||
|
return CommandingServiceBase::INVALID_TC;
|
||||||
|
}
|
||||||
|
SerializeAdapter::deSerialize(objectId, &tcData, &tcDataLen,
|
||||||
|
SerializeIF::Endianness::BIG);
|
||||||
|
|
||||||
|
return checkInterfaceAndAcquireMessageQueue(id,objectId);
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t CService201HealthCommanding::checkInterfaceAndAcquireMessageQueue(
|
||||||
|
MessageQueueId_t* messageQueueToSet, object_id_t* objectId) {
|
||||||
|
HasHealthIF * destination = objectManager->get<HasHealthIF>(*objectId);
|
||||||
|
if(destination == nullptr) {
|
||||||
|
return CommandingServiceBase::INVALID_OBJECT;
|
||||||
|
}
|
||||||
|
|
||||||
|
*messageQueueToSet = destination->getCommandQueue();
|
||||||
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t CService201HealthCommanding::prepareCommand(
|
||||||
|
CommandMessage* message, uint8_t subservice, const uint8_t *tcData,
|
||||||
|
size_t tcDataLen, uint32_t *state, object_id_t objectId) {
|
||||||
|
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
||||||
|
switch(subservice) {
|
||||||
|
case(Subservice::COMMAND_SET_HEALTH): {
|
||||||
|
HealthSetCommand healthCommand;
|
||||||
|
result = healthCommand.deSerialize(&tcData, &tcDataLen,
|
||||||
|
SerializeIF::Endianness::BIG);
|
||||||
|
if (result != RETURN_OK) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
HealthMessage::setHealthMessage(message, HealthMessage::HEALTH_SET,
|
||||||
|
healthCommand.getHealth());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case(Subservice::COMMAND_ANNOUNCE_HEALTH): {
|
||||||
|
HealthMessage::setHealthMessage(message,
|
||||||
|
HealthMessage::HEALTH_ANNOUNCE);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case(Subservice::COMMAND_ANNOUNCE_HEALTH_ALL): {
|
||||||
|
HealthMessage::setHealthMessage(message,
|
||||||
|
HealthMessage::HEALTH_ANNOUNCE_ALL);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t CService201HealthCommanding::handleReply
|
||||||
|
(const CommandMessage* reply, Command_t previousCommand,
|
||||||
|
uint32_t *state, CommandMessage* optionalNextCommand,
|
||||||
|
object_id_t objectId, bool *isStep) {
|
||||||
|
Command_t replyId = reply->getCommand();
|
||||||
|
if (replyId == HealthMessage::REPLY_HEALTH_SET) {
|
||||||
|
return EXECUTION_COMPLETE;
|
||||||
|
}
|
||||||
|
else if(replyId == CommandMessageIF::REPLY_REJECTED) {
|
||||||
|
return reply->getReplyRejectedReason();
|
||||||
|
}
|
||||||
|
return CommandingServiceBase::INVALID_REPLY;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Not used for now, health state already reported by event
|
||||||
|
ReturnValue_t CService201HealthCommanding::prepareHealthSetReply(
|
||||||
|
const CommandMessage* reply) {
|
||||||
|
prepareHealthSetReply(reply);
|
||||||
|
uint8_t health = static_cast<uint8_t>(HealthMessage::getHealth(reply));
|
||||||
|
uint8_t oldHealth = static_cast<uint8_t>(HealthMessage::getOldHealth(reply));
|
||||||
|
HealthSetReply healthSetReply(health, oldHealth);
|
||||||
|
return sendTmPacket(Subservice::REPLY_HEALTH_SET, &healthSetReply);
|
||||||
|
}
|
||||||
|
|
63
pus/CService201HealthCommanding.h
Normal file
63
pus/CService201HealthCommanding.h
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
#ifndef FSFW_PUS_CSERVICE201HEALTHCOMMANDING_H_
|
||||||
|
#define FSFW_PUS_CSERVICE201HEALTHCOMMANDING_H_
|
||||||
|
|
||||||
|
#include "../tmtcservices/CommandingServiceBase.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Custom PUS service to set health of all objects
|
||||||
|
* implementing hasHealthIF.
|
||||||
|
*
|
||||||
|
* Examples: Device Handlers, Assemblies or Subsystems.
|
||||||
|
* Full Documentation: ECSS-E-ST-70-41C or ECSS-E-70-41A
|
||||||
|
* Dissertation Baetz p. 115, 116, 165-167.
|
||||||
|
*
|
||||||
|
* This is a gateway service. It relays device commands using the software bus.
|
||||||
|
* This service is very closely tied to the Commanding Service Base template
|
||||||
|
* class. There is constant interaction between this Service Base und a
|
||||||
|
* child class like this service
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class CService201HealthCommanding: public CommandingServiceBase {
|
||||||
|
public:
|
||||||
|
|
||||||
|
CService201HealthCommanding(object_id_t objectId, uint16_t apid,
|
||||||
|
uint8_t serviceId, uint8_t numParallelCommands = 4,
|
||||||
|
uint16_t commandTimeoutSeconds = 60);
|
||||||
|
virtual~ CService201HealthCommanding();
|
||||||
|
protected:
|
||||||
|
/* CSB abstract function implementations */
|
||||||
|
ReturnValue_t isValidSubservice(uint8_t subservice) override;
|
||||||
|
ReturnValue_t getMessageQueueAndObject(uint8_t subservice,
|
||||||
|
const uint8_t *tcData, size_t tcDataLen, MessageQueueId_t *id,
|
||||||
|
object_id_t *objectId) override;
|
||||||
|
/** Prepare health command */
|
||||||
|
ReturnValue_t prepareCommand(CommandMessage* message,
|
||||||
|
uint8_t subservice, const uint8_t *tcData, size_t tcDataLen,
|
||||||
|
uint32_t *state, object_id_t objectId) override;
|
||||||
|
/** Handle health reply */
|
||||||
|
ReturnValue_t handleReply(const CommandMessage* reply,
|
||||||
|
Command_t previousCommand, uint32_t *state,
|
||||||
|
CommandMessage* optionalNextCommand, object_id_t objectId,
|
||||||
|
bool *isStep) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
ReturnValue_t checkAndAcquireTargetID(object_id_t* objectIdToSet,
|
||||||
|
const uint8_t* tcData, size_t tcDataLen);
|
||||||
|
ReturnValue_t checkInterfaceAndAcquireMessageQueue(
|
||||||
|
MessageQueueId_t* MessageQueueToSet, object_id_t* objectId);
|
||||||
|
|
||||||
|
ReturnValue_t prepareHealthSetReply(const CommandMessage *reply);
|
||||||
|
|
||||||
|
enum Subservice {
|
||||||
|
//! [EXPORT] : [TC] Set health of target object
|
||||||
|
COMMAND_SET_HEALTH = 1,
|
||||||
|
//! [EXPORT] : [TM] Reply to health set command which also provides old health
|
||||||
|
REPLY_HEALTH_SET = 2,
|
||||||
|
//! [EXPORT] : [TC] Commands object to announce their health as an event
|
||||||
|
COMMAND_ANNOUNCE_HEALTH = 3,
|
||||||
|
//! [EXPORT] : [TC] Commands all objects in the health map to announce their health
|
||||||
|
COMMAND_ANNOUNCE_HEALTH_ALL = 4
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* FSFW_PUS_CSERVICE201HEALTHCOMMANDING_H_ */
|
@ -6,15 +6,13 @@
|
|||||||
#include "../tmtcpacket/pus/TmPacketStored.h"
|
#include "../tmtcpacket/pus/TmPacketStored.h"
|
||||||
#include "../serviceinterface/ServiceInterfaceStream.h"
|
#include "../serviceinterface/ServiceInterfaceStream.h"
|
||||||
#include "../tmtcservices/AcceptsTelemetryIF.h"
|
#include "../tmtcservices/AcceptsTelemetryIF.h"
|
||||||
#include "../serviceinterface/ServiceInterfaceStream.h"
|
|
||||||
|
|
||||||
|
|
||||||
Service1TelecommandVerification::Service1TelecommandVerification(
|
Service1TelecommandVerification::Service1TelecommandVerification(
|
||||||
object_id_t objectId, uint16_t apid, uint8_t serviceId,
|
object_id_t objectId, uint16_t apid, uint8_t serviceId,
|
||||||
object_id_t targetDestination):
|
object_id_t targetDestination, uint16_t messageQueueDepth):
|
||||||
SystemObject(objectId), apid(apid), serviceId(serviceId),
|
SystemObject(objectId), apid(apid), serviceId(serviceId),
|
||||||
targetDestination(targetDestination) {
|
targetDestination(targetDestination) {
|
||||||
tmQueue = QueueFactory::instance()->createMessageQueue();
|
tmQueue = QueueFactory::instance()->createMessageQueue(messageQueueDepth);
|
||||||
}
|
}
|
||||||
|
|
||||||
Service1TelecommandVerification::~Service1TelecommandVerification() {}
|
Service1TelecommandVerification::~Service1TelecommandVerification() {}
|
||||||
@ -53,7 +51,7 @@ ReturnValue_t Service1TelecommandVerification::sendVerificationReport(
|
|||||||
result = generateSuccessReport(message);
|
result = generateSuccessReport(message);
|
||||||
}
|
}
|
||||||
if(result != HasReturnvaluesIF::RETURN_OK){
|
if(result != HasReturnvaluesIF::RETURN_OK){
|
||||||
sif::error << "Service1TelecommandVerification::initialize: "
|
sif::error << "Service1TelecommandVerification::sendVerificationReport: "
|
||||||
"Sending verification packet failed !" << std::endl;
|
"Sending verification packet failed !" << std::endl;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef MISSION_PUS_SERVICE1TELECOMMANDVERIFICATION_H_
|
#ifndef FSFW_PUS_SERVICE1TELECOMMANDVERIFICATION_H_
|
||||||
#define MISSION_PUS_SERVICE1TELECOMMANDVERIFICATION_H_
|
#define FSFW_PUS_SERVICE1TELECOMMANDVERIFICATION_H_
|
||||||
|
|
||||||
#include "../objectmanager/SystemObject.h"
|
#include "../objectmanager/SystemObject.h"
|
||||||
#include "../returnvalues/HasReturnvaluesIF.h"
|
#include "../returnvalues/HasReturnvaluesIF.h"
|
||||||
@ -44,14 +44,15 @@ public:
|
|||||||
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PUS_SERVICE_1;
|
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PUS_SERVICE_1;
|
||||||
|
|
||||||
Service1TelecommandVerification(object_id_t objectId,
|
Service1TelecommandVerification(object_id_t objectId,
|
||||||
uint16_t apid, uint8_t serviceId, object_id_t targetDestination);
|
uint16_t apid, uint8_t serviceId, object_id_t targetDestination,
|
||||||
|
uint16_t messageQueueDepth);
|
||||||
virtual ~Service1TelecommandVerification();
|
virtual ~Service1TelecommandVerification();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return ID of Verification Queue
|
* @return ID of Verification Queue
|
||||||
*/
|
*/
|
||||||
virtual MessageQueueId_t getVerificationQueue();
|
virtual MessageQueueId_t getVerificationQueue() override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs the service periodically as specified in init_mission().
|
* Performs the service periodically as specified in init_mission().
|
||||||
@ -91,4 +92,4 @@ private:
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* MISSION_PUS_SERVICE1TELECOMMANDVERIFICATION_H_ */
|
#endif /* FSFW_PUS_SERVICE1TELECOMMANDVERIFICATION_H_ */
|
||||||
|
@ -21,8 +21,8 @@ Service2DeviceAccess::~Service2DeviceAccess() {}
|
|||||||
|
|
||||||
ReturnValue_t Service2DeviceAccess::isValidSubservice(uint8_t subservice) {
|
ReturnValue_t Service2DeviceAccess::isValidSubservice(uint8_t subservice) {
|
||||||
switch(static_cast<Subservice>(subservice)){
|
switch(static_cast<Subservice>(subservice)){
|
||||||
case Subservice::RAW_COMMANDING:
|
case Subservice::COMMAND_RAW_COMMANDING:
|
||||||
case Subservice::TOGGLE_WIRETAPPING:
|
case Subservice::COMMAND_TOGGLE_WIRETAPPING:
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
default:
|
default:
|
||||||
sif::error << "Invalid Subservice" << std::endl;
|
sif::error << "Invalid Subservice" << std::endl;
|
||||||
@ -39,8 +39,7 @@ ReturnValue_t Service2DeviceAccess::getMessageQueueAndObject(
|
|||||||
SerializeAdapter::deSerialize(objectId, &tcData,
|
SerializeAdapter::deSerialize(objectId, &tcData,
|
||||||
&tcDataLen, SerializeIF::Endianness::BIG);
|
&tcDataLen, SerializeIF::Endianness::BIG);
|
||||||
|
|
||||||
ReturnValue_t result = checkInterfaceAndAcquireMessageQueue(id,objectId);
|
return checkInterfaceAndAcquireMessageQueue(id,objectId);
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t Service2DeviceAccess::checkInterfaceAndAcquireMessageQueue(
|
ReturnValue_t Service2DeviceAccess::checkInterfaceAndAcquireMessageQueue(
|
||||||
@ -59,14 +58,12 @@ ReturnValue_t Service2DeviceAccess::prepareCommand(CommandMessage* message,
|
|||||||
uint8_t subservice, const uint8_t* tcData, size_t tcDataLen,
|
uint8_t subservice, const uint8_t* tcData, size_t tcDataLen,
|
||||||
uint32_t* state, object_id_t objectId) {
|
uint32_t* state, object_id_t objectId) {
|
||||||
switch(static_cast<Subservice>(subservice)){
|
switch(static_cast<Subservice>(subservice)){
|
||||||
case Subservice::RAW_COMMANDING: {
|
case Subservice::COMMAND_RAW_COMMANDING: {
|
||||||
return prepareRawCommand(dynamic_cast<CommandMessage*>(message),
|
return prepareRawCommand(message, tcData, tcDataLen);
|
||||||
tcData, tcDataLen);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Subservice::TOGGLE_WIRETAPPING: {
|
case Subservice::COMMAND_TOGGLE_WIRETAPPING: {
|
||||||
return prepareWiretappingCommand(dynamic_cast<CommandMessage*>(message),
|
return prepareWiretappingCommand(message, tcData, tcDataLen);
|
||||||
tcData, tcDataLen);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -121,11 +118,11 @@ void Service2DeviceAccess::handleUnrequestedReply(CommandMessage* reply) {
|
|||||||
switch(reply->getCommand()) {
|
switch(reply->getCommand()) {
|
||||||
case DeviceHandlerMessage::REPLY_RAW_COMMAND:
|
case DeviceHandlerMessage::REPLY_RAW_COMMAND:
|
||||||
sendWiretappingTm(reply,
|
sendWiretappingTm(reply,
|
||||||
static_cast<uint8_t>(Subservice::WIRETAPPING_RAW_TC));
|
static_cast<uint8_t>(Subservice::REPLY_WIRETAPPING_RAW_TC));
|
||||||
break;
|
break;
|
||||||
case DeviceHandlerMessage::REPLY_RAW_REPLY:
|
case DeviceHandlerMessage::REPLY_RAW_REPLY:
|
||||||
sendWiretappingTm(reply,
|
sendWiretappingTm(reply,
|
||||||
static_cast<uint8_t>(Subservice::RAW_REPLY));
|
static_cast<uint8_t>(Subservice::REPLY_RAW));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
sif::error << "Unknown message in Service2DeviceAccess::"
|
sif::error << "Unknown message in Service2DeviceAccess::"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef FRAMEWORK_PUS_SERVICE2DEVICEACCESS_H_
|
#ifndef FSFW_PUS_SERVICE2DEVICEACCESS_H_
|
||||||
#define FRAMEWORK_PUS_SERVICE2DEVICEACCESS_H_
|
#define FSFW_PUS_SERVICE2DEVICEACCESS_H_
|
||||||
|
|
||||||
#include "../objectmanager/SystemObjectIF.h"
|
#include "../objectmanager/SystemObjectIF.h"
|
||||||
#include "../devicehandlers/AcceptsDeviceResponsesIF.h"
|
#include "../devicehandlers/AcceptsDeviceResponsesIF.h"
|
||||||
@ -81,12 +81,16 @@ private:
|
|||||||
const uint8_t* tcData, size_t tcDataLen);
|
const uint8_t* tcData, size_t tcDataLen);
|
||||||
|
|
||||||
enum class Subservice {
|
enum class Subservice {
|
||||||
RAW_COMMANDING = 128, //!< [EXPORT] : [COMMAND] Command in device native protocol
|
//!< [EXPORT] : [COMMAND] Command in device native protocol
|
||||||
TOGGLE_WIRETAPPING = 129, //!< [EXPORT] : [COMMAND] Toggle wiretapping of raw communication
|
COMMAND_RAW_COMMANDING = 128,
|
||||||
RAW_REPLY = 130, //!< [EXPORT] : [REPLY] Includes wiretapping TM and normal TM raw replies from device
|
//!< [EXPORT] : [COMMAND] Toggle wiretapping of raw communication
|
||||||
WIRETAPPING_RAW_TC = 131 //!< [EXPORT] : [REPLY] Wiretapping packets of commands built by device handler
|
COMMAND_TOGGLE_WIRETAPPING = 129,
|
||||||
|
//!< [EXPORT] : [REPLY] Includes wiretapping TM and normal TM raw replies from device
|
||||||
|
REPLY_RAW = 130,
|
||||||
|
//!< [EXPORT] : [REPLY] Wiretapping packets of commands built by device handler
|
||||||
|
REPLY_WIRETAPPING_RAW_TC = 131
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif /* MISSION_PUS_DEVICE2DEVICECOMMANDING_H_ */
|
#endif /* FSFW_PUS_DEVICE2DEVICECOMMANDING_H_ */
|
||||||
|
@ -8,10 +8,11 @@
|
|||||||
|
|
||||||
|
|
||||||
Service5EventReporting::Service5EventReporting(object_id_t objectId,
|
Service5EventReporting::Service5EventReporting(object_id_t objectId,
|
||||||
uint16_t apid, uint8_t serviceId, size_t maxNumberReportsPerCycle):
|
uint16_t apid, uint8_t serviceId, size_t maxNumberReportsPerCycle,
|
||||||
|
uint32_t messageQueueDepth):
|
||||||
PusServiceBase(objectId, apid, serviceId),
|
PusServiceBase(objectId, apid, serviceId),
|
||||||
maxNumberReportsPerCycle(maxNumberReportsPerCycle) {
|
maxNumberReportsPerCycle(maxNumberReportsPerCycle) {
|
||||||
eventQueue = QueueFactory::instance()->createMessageQueue();
|
eventQueue = QueueFactory::instance()->createMessageQueue(messageQueueDepth);
|
||||||
}
|
}
|
||||||
|
|
||||||
Service5EventReporting::~Service5EventReporting(){}
|
Service5EventReporting::~Service5EventReporting(){}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef FRAMEWORK_PUS_SERVICE5EVENTREPORTING_H_
|
#ifndef FSFW_PUS_SERVICE5EVENTREPORTING_H_
|
||||||
#define FRAMEWORK_PUS_SERVICE5EVENTREPORTING_H_
|
#define FSFW_PUS_SERVICE5EVENTREPORTING_H_
|
||||||
|
|
||||||
#include "../tmtcservices/PusServiceBase.h"
|
#include "../tmtcservices/PusServiceBase.h"
|
||||||
#include "../events/EventMessage.h"
|
#include "../events/EventMessage.h"
|
||||||
@ -42,7 +42,8 @@ class Service5EventReporting: public PusServiceBase {
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
Service5EventReporting(object_id_t objectId, uint16_t apid,
|
Service5EventReporting(object_id_t objectId, uint16_t apid,
|
||||||
uint8_t serviceId, size_t maxNumberReportsPerCycle = 10);
|
uint8_t serviceId, size_t maxNumberReportsPerCycle = 10,
|
||||||
|
uint32_t messageQueueDepth = 10);
|
||||||
virtual ~Service5EventReporting();
|
virtual ~Service5EventReporting();
|
||||||
|
|
||||||
/***
|
/***
|
||||||
@ -83,4 +84,4 @@ private:
|
|||||||
ReturnValue_t generateEventReport(EventMessage message);
|
ReturnValue_t generateEventReport(EventMessage message);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* MISSION_PUS_SERVICE5EVENTREPORTING_H_ */
|
#endif /* FSFW_PUS_SERVICE5EVENTREPORTING_H_ */
|
||||||
|
@ -7,10 +7,10 @@
|
|||||||
#include "../serialize/SerializeAdapter.h"
|
#include "../serialize/SerializeAdapter.h"
|
||||||
#include "../serviceinterface/ServiceInterfaceStream.h"
|
#include "../serviceinterface/ServiceInterfaceStream.h"
|
||||||
|
|
||||||
Service8FunctionManagement::Service8FunctionManagement(object_id_t object_id,
|
Service8FunctionManagement::Service8FunctionManagement(object_id_t objectId,
|
||||||
uint16_t apid, uint8_t serviceId, uint8_t numParallelCommands,
|
uint16_t apid, uint8_t serviceId, uint8_t numParallelCommands,
|
||||||
uint16_t commandTimeoutSeconds):
|
uint16_t commandTimeoutSeconds):
|
||||||
CommandingServiceBase(object_id, apid, serviceId, numParallelCommands,
|
CommandingServiceBase(objectId, apid, serviceId, numParallelCommands,
|
||||||
commandTimeoutSeconds) {}
|
commandTimeoutSeconds) {}
|
||||||
|
|
||||||
Service8FunctionManagement::~Service8FunctionManagement() {}
|
Service8FunctionManagement::~Service8FunctionManagement() {}
|
||||||
@ -19,7 +19,7 @@ Service8FunctionManagement::~Service8FunctionManagement() {}
|
|||||||
ReturnValue_t Service8FunctionManagement::isValidSubservice(
|
ReturnValue_t Service8FunctionManagement::isValidSubservice(
|
||||||
uint8_t subservice) {
|
uint8_t subservice) {
|
||||||
switch(static_cast<Subservice>(subservice)) {
|
switch(static_cast<Subservice>(subservice)) {
|
||||||
case Subservice::DIRECT_COMMANDING:
|
case Subservice::COMMAND_DIRECT_COMMANDING:
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
default:
|
default:
|
||||||
return AcceptsTelecommandsIF::INVALID_SUBSERVICE;
|
return AcceptsTelecommandsIF::INVALID_SUBSERVICE;
|
||||||
@ -131,7 +131,7 @@ ReturnValue_t Service8FunctionManagement::handleDataReply(
|
|||||||
}
|
}
|
||||||
DataReply dataReply(objectId, actionId, buffer, size);
|
DataReply dataReply(objectId, actionId, buffer, size);
|
||||||
result = sendTmPacket(static_cast<uint8_t>(
|
result = sendTmPacket(static_cast<uint8_t>(
|
||||||
Subservice::DIRECT_COMMANDING_DATA_REPLY), &dataReply);
|
Subservice::REPLY_DIRECT_COMMANDING_DATA), &dataReply);
|
||||||
|
|
||||||
auto deletionResult = IPCStore->deleteData(storeId);
|
auto deletionResult = IPCStore->deleteData(storeId);
|
||||||
if(deletionResult != HasReturnvaluesIF::RETURN_OK) {
|
if(deletionResult != HasReturnvaluesIF::RETURN_OK) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef FRAMEWORK_PUS_SERVICE8FUNCTIONMANAGEMENT_H_
|
#ifndef FSFW_PUS_SERVICE8FUNCTIONMANAGEMENT_H_
|
||||||
#define FRAMEWORK_PUS_SERVICE8FUNCTIONMANAGEMENT_H_
|
#define FSFW_PUS_SERVICE8FUNCTIONMANAGEMENT_H_
|
||||||
|
|
||||||
#include "../action/ActionMessage.h"
|
#include "../action/ActionMessage.h"
|
||||||
#include "../tmtcservices/CommandingServiceBase.h"
|
#include "../tmtcservices/CommandingServiceBase.h"
|
||||||
@ -52,8 +52,10 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
enum class Subservice {
|
enum class Subservice {
|
||||||
DIRECT_COMMANDING = 128, //!< [EXPORT] : [COMMAND] Functional commanding
|
//!< [EXPORT] : [COMMAND] Functional commanding
|
||||||
DIRECT_COMMANDING_DATA_REPLY = 130, //!< [EXPORT] : [REPLY] Data reply
|
COMMAND_DIRECT_COMMANDING = 128,
|
||||||
|
//!< [EXPORT] : [REPLY] Data reply
|
||||||
|
REPLY_DIRECT_COMMANDING_DATA = 130,
|
||||||
};
|
};
|
||||||
|
|
||||||
ReturnValue_t checkInterfaceAndAcquireMessageQueue(
|
ReturnValue_t checkInterfaceAndAcquireMessageQueue(
|
||||||
@ -64,4 +66,4 @@ private:
|
|||||||
object_id_t objectId, ActionId_t actionId);
|
object_id_t objectId, ActionId_t actionId);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* FRAMEWORK_PUS_SERVICE8FUNCTIONMANAGEMENT_H_ */
|
#endif /* FSFW_PUS_SERVICE8FUNCTIONMANAGEMENT_H_ */
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
#ifndef FSFW_PUS_SERVICEPACKETS_SERVICE1PACKETS_H_
|
||||||
|
#define FSFW_PUS_SERVICEPACKETS_SERVICE1PACKETS_H_
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup spacepackets PUS Packet Definitions
|
* @defgroup spacepackets PUS Packet Definitions
|
||||||
* This group contains all implemented TM or TM packages that are sent to
|
* This group contains all implemented TM or TM packages that are sent to
|
||||||
@ -5,9 +8,6 @@
|
|||||||
* packet structures in Mission Information Base (MIB).
|
* packet structures in Mission Information Base (MIB).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MISSION_PUS_SERVICEPACKETS_SERVICE1PACKETS_H_
|
|
||||||
#define MISSION_PUS_SERVICEPACKETS_SERVICE1PACKETS_H_
|
|
||||||
|
|
||||||
#include "../../serialize/SerializeAdapter.h"
|
#include "../../serialize/SerializeAdapter.h"
|
||||||
#include "../../tmtcservices/VerificationCodes.h"
|
#include "../../tmtcservices/VerificationCodes.h"
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef FRAMEWORK_PUS_SERVICEPACKETS_SERVICE200PACKETS_H_
|
#ifndef FSFW_PUS_SERVICEPACKETS_SERVICE200PACKETS_H_
|
||||||
#define FRAMEWORK_PUS_SERVICEPACKETS_SERVICE200PACKETS_H_
|
#define FSFW_PUS_SERVICEPACKETS_SERVICE200PACKETS_H_
|
||||||
|
|
||||||
#include "../../serialize/SerialLinkedListAdapter.h"
|
#include "../../serialize/SerialLinkedListAdapter.h"
|
||||||
#include "../../modes/ModeMessage.h"
|
#include "../../modes/ModeMessage.h"
|
||||||
@ -60,4 +60,4 @@ public:
|
|||||||
SerializeElement<ReturnValue_t> reason; //!< [EXPORT] : [COMMENT] Reason the mode could not be reached
|
SerializeElement<ReturnValue_t> reason; //!< [EXPORT] : [COMMENT] Reason the mode could not be reached
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* FRAMEWORK_PUS_SERVICEPACKETS_SERVICE200PACKETS_H_ */
|
#endif /* FSFW_PUS_SERVICEPACKETS_SERVICE200PACKETS_H_ */
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef FRAMEWORK_PUS_SERVICEPACKETS_SERVICE2PACKETS_H_
|
#ifndef FSFW_PUS_SERVICEPACKETS_SERVICE2PACKETS_H_
|
||||||
#define FRAMEWORK_PUS_SERVICEPACKETS_SERVICE2PACKETS_H_
|
#define FSFW_PUS_SERVICEPACKETS_SERVICE2PACKETS_H_
|
||||||
|
|
||||||
#include "../../action/ActionMessage.h"
|
#include "../../action/ActionMessage.h"
|
||||||
#include "../../objectmanager/SystemObjectIF.h"
|
#include "../../objectmanager/SystemObjectIF.h"
|
||||||
@ -73,4 +73,4 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* FRAMEWORK_PUS_SERVICEPACKETS_SERVICE2PACKETS_H_ */
|
#endif /* FSFW_PUS_SERVICEPACKETS_SERVICE2PACKETS_H_ */
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef MISSION_PUS_SERVICEPACKETS_SERVICE5PACKETS_H_
|
#ifndef FSFW_PUS_SERVICEPACKETS_SERVICE5PACKETS_H_
|
||||||
#define MISSION_PUS_SERVICEPACKETS_SERVICE5PACKETS_H_
|
#define FSFW_PUS_SERVICEPACKETS_SERVICE5PACKETS_H_
|
||||||
|
|
||||||
#include "../../serialize/SerializeAdapter.h"
|
#include "../../serialize/SerializeAdapter.h"
|
||||||
#include "../../tmtcservices/VerificationCodes.h"
|
#include "../../tmtcservices/VerificationCodes.h"
|
||||||
@ -73,4 +73,4 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif /* MISSION_PUS_SERVICEPACKETS_SERVICE5PACKETS_H_ */
|
#endif /* FSFW_PUS_SERVICEPACKETS_SERVICE5PACKETS_H_ */
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef FRAMEWORK_PUS_SERVICEPACKETS_SERVICE8PACKETS_H_
|
#ifndef FSFW_PUS_SERVICEPACKETS_SERVICE8PACKETS_H_
|
||||||
#define FRAMEWORK_PUS_SERVICEPACKETS_SERVICE8PACKETS_H_
|
#define FSFW_PUS_SERVICEPACKETS_SERVICE8PACKETS_H_
|
||||||
|
|
||||||
#include "../../action/ActionMessage.h"
|
#include "../../action/ActionMessage.h"
|
||||||
#include "../../objectmanager/SystemObjectIF.h"
|
#include "../../objectmanager/SystemObjectIF.h"
|
||||||
@ -118,4 +118,4 @@ private:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* FRAMEWORK_PUS_SERVICEPACKETS_SERVICE8PACKETS_H_ */
|
#endif /* FSFW_PUS_SERVICEPACKETS_SERVICE8PACKETS_H_ */
|
||||||
|
Loading…
Reference in New Issue
Block a user