Skip to content
Snippets Groups Projects
Commit 7641dffe authored by kongr45gpen's avatar kongr45gpen
Browse files

Use the new fetch functions in the test service

parent a5b93847
No related branches found
No related tags found
No related merge requests found
...@@ -15,14 +15,14 @@ public: ...@@ -15,14 +15,14 @@ public:
/** /**
* TC[17,1] perform an are-you-alive connection test * TC[17,1] perform an are-you-alive connection test
*/ */
void areYouAlive(const Message & request); void areYouAlive(Message & request);
/** /**
* TC[17,3] perform an on-board connection test * TC[17,3] perform an on-board connection test
* *
* @todo Only respond if we have the correct APID * @todo Only respond if we have the correct APID
*/ */
void onBoardConnection(const Message & request); void onBoardConnection(Message & request);
}; };
......
#include "Services/TestService.hpp" #include "Services/TestService.hpp"
void TestService::areYouAlive(const Message &request) { void TestService::areYouAlive(Message &request) {
// TM[17,2] are-you-alive connection test report // TM[17,2] are-you-alive connection test report
Message report = createTM(2); Message report = createTM(2);
storeMessage(report); storeMessage(report);
} }
void TestService::onBoardConnection(const Message &request) { void TestService::onBoardConnection(Message &request) {
// TM[17,4] on-board connection test report // TM[17,4] on-board connection test report
Message report = createTM(4); Message report = createTM(4);
// TODO: This is not the correct way to do this! Fetching functions will be added later report.appendUint16(request.readUint16());
report.appendUint8(request.data[1]);
storeMessage(report); storeMessage(report);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment