PusServiceBase enhancements #103

Merged
gaisser merged 5 commits from KSat/fsfw:mueller_PSB_improvement into master 2020-07-28 12:10:19 +02:00
2 changed files with 7 additions and 3 deletions
Showing only changes of commit 860cdba94d - Show all commits

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.