Skip to content
Snippets Groups Projects
Unverified Commit cdf4373e authored by Dimitrios Stoupis's avatar Dimitrios Stoupis
Browse files

Add a simple TC[6,9] triggering TM[6,10] demonstration

parent 835cd321
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@
#include "Message.hpp"
#include "MessageParser.hpp"
#include "Services/MemoryManagementService.hpp"
#include "Helpers/CRCHelper.hpp"
int main() {
Message packet = Message(0, 0, Message::TC, 1);
......@@ -85,10 +86,22 @@ int main() {
rcvPack.appendUint16(2); // Iteration count
rcvPack.appendUint64(reinterpret_cast<uint64_t >(pStr)); // Start address
rcvPack.appendOctetString(2, data);
rcvPack.appendBits(16, CRCHelper::calculateCRC(data, 2)); // Append the CRC value
rcvPack.appendUint64(reinterpret_cast<uint64_t >(pStr + 1)); // Start address
rcvPack.appendOctetString(1, data);
rcvPack.appendBits(16, CRCHelper::calculateCRC(data, 1)); // Append the CRC value
memMangService.rawDataMemorySubservice.loadRawData(rcvPack);
rcvPack = Message(6, 9, Message::TC, 1);
rcvPack.appendEnum8(MemoryManagementService::MemoryID::EXTERNAL); // Memory ID
rcvPack.appendUint16(2); // Iteration count
rcvPack.appendUint64(reinterpret_cast<uint64_t >(data)); // Start address
rcvPack.appendUint16(2);
rcvPack.appendUint64(reinterpret_cast<uint64_t >(data + 1)); // Start address
rcvPack.appendUint16(1);
memMangService.rawDataMemorySubservice.checkRawData(rcvPack);
// ST[01] test
// parameters take random values and works as expected
......
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