2020-09-16 19:05:25 +02:00
|
|
|
#ifndef FSFW_PUS_SERVICE17TEST_H_
|
|
|
|
#define FSFW_PUS_SERVICE17TEST_H_
|
|
|
|
|
2021-07-13 20:58:45 +02:00
|
|
|
#include "fsfw/objectmanager/SystemObject.h"
|
2022-02-02 10:29:30 +01:00
|
|
|
#include "fsfw/tmtcservices/PusServiceBase.h"
|
2022-07-26 11:09:57 +02:00
|
|
|
#include "fsfw/tmtcservices/TmStoreAndSendHelper.h"
|
2022-07-26 11:14:40 +02:00
|
|
|
#include "fsfw/tmtcservices/TmStoreHelper.h"
|
2020-09-16 19:05:25 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Test Service
|
|
|
|
* Full Documentation: ECSS-E70-41A p.167
|
|
|
|
*
|
|
|
|
* The test service provides the capability to activate test functions
|
|
|
|
* implemented on-board and to report the results of such tests.
|
|
|
|
* Service capability:
|
|
|
|
* - TC[17,1]: Perform connection test
|
|
|
|
* - TM[17,2]: Send Connection Test Report
|
|
|
|
* - TC[17,128]: Perform connection test and trigger event
|
|
|
|
*
|
|
|
|
* @ingroup pus_services
|
|
|
|
*/
|
2022-02-02 10:29:30 +01:00
|
|
|
class Service17Test : public PusServiceBase {
|
|
|
|
public:
|
|
|
|
// Custom events which can be triggered
|
|
|
|
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PUS_SERVICE_17;
|
|
|
|
static constexpr Event TEST = MAKE_EVENT(0, severity::INFO);
|
2020-09-16 19:05:25 +02:00
|
|
|
|
2022-02-02 10:29:30 +01:00
|
|
|
enum Subservice : uint8_t {
|
|
|
|
//! [EXPORT] : [COMMAND] Perform connection test
|
|
|
|
CONNECTION_TEST = 1,
|
|
|
|
//! [EXPORT] : [REPLY] Connection test reply
|
|
|
|
CONNECTION_TEST_REPORT = 2,
|
|
|
|
//! [EXPORT] : [COMMAND] Trigger test reply and test event
|
|
|
|
EVENT_TRIGGER_TEST = 128,
|
2022-11-02 19:35:22 +01:00
|
|
|
PING_WITH_DATA = 129,
|
|
|
|
//! [EXPORT] : [COMMAND] Report which reports the sent user data size
|
|
|
|
PING_WITH_DATA_REPORT_WITH_SIZE = 130
|
2022-02-02 10:29:30 +01:00
|
|
|
};
|
2020-09-16 19:05:25 +02:00
|
|
|
|
2022-07-26 16:49:46 +02:00
|
|
|
explicit Service17Test(PsbParams params);
|
2022-07-20 22:21:15 +02:00
|
|
|
|
2022-07-25 11:24:13 +02:00
|
|
|
void setCustomTmStore(StorageManagerIF& tmStore);
|
2022-07-20 22:21:15 +02:00
|
|
|
|
2022-07-20 11:43:16 +02:00
|
|
|
~Service17Test() override;
|
|
|
|
ReturnValue_t handleRequest(uint8_t subservice) override;
|
|
|
|
ReturnValue_t performService() override;
|
|
|
|
ReturnValue_t initialize() override;
|
2020-09-16 19:05:25 +02:00
|
|
|
|
2022-02-02 10:29:30 +01:00
|
|
|
protected:
|
2022-07-20 22:21:15 +02:00
|
|
|
TmStoreHelper storeHelper;
|
|
|
|
TmSendHelper sendHelper;
|
2022-07-26 11:09:57 +02:00
|
|
|
TmStoreAndSendWrapper tmHelper;
|
2020-09-16 19:05:25 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* FSFW_PUS_SERVICE17TEST_H_ */
|