subservicve passed to handleRequest()

This commit is contained in:
Robin Müller 2020-06-10 20:28:44 +02:00
parent 514ff4f420
commit 860cdba94d
2 changed files with 7 additions and 3 deletions

View File

@ -29,7 +29,8 @@ 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.