PSB subservice passed to handleRequest

This commit is contained in:
Robin Müller 2020-04-06 12:38:39 +02:00
parent 3654c7bf81
commit 78aad91aab
2 changed files with 6 additions and 3 deletions

View File

@ -29,7 +29,7 @@ ReturnValue_t PusServiceBase::performOperation(uint8_t opCode) {
this->currentPacket.setStoreAddress(message.getStorageId());
// info << "Service " << (uint16_t) this->serviceId << ": new packet!" << std::endl;
ReturnValue_t return_code = this->handleRequest();
ReturnValue_t return_code = this->handleRequest(currentPacket.getSubService());
// debug << "Service " << (uint16_t)this->serviceId << ": handleRequest returned: " << (int)return_code << std::endl;
if (return_code == RETURN_OK) {
this->verifyReporter.sendSuccessReport(

View File

@ -30,7 +30,10 @@ void setStaticFrameworkObjectIds();
* All PUS Services are System Objects, so an Object ID needs to be specified on construction.
* \ingroup pus_services
*/
class PusServiceBase : public ExecutableObjectIF, public AcceptsTelecommandsIF, public SystemObject, public HasReturnvaluesIF {
class PusServiceBase : public ExecutableObjectIF,
public AcceptsTelecommandsIF,
public SystemObject,
public HasReturnvaluesIF {
friend void (Factory::setStaticFrameworkObjectIds)();
public:
/**
@ -63,7 +66,7 @@ public:
* @return The returned status_code is directly taken as main error code in the Verification Report.
* On success, RETURN_OK shall be returned.
*/
virtual ReturnValue_t handleRequest() = 0;
virtual ReturnValue_t handleRequest(uint8_t subservice) = 0;
/**
* In performService, implementations can handle periodic, non-TC-triggered activities.
* The performService method is always called.