Bump FSFW #31

Merged
muellerr merged 139 commits from bump-fsfw into develop 2023-12-18 13:16:28 +01:00
Showing only changes of commit e8bf8b9575 - Show all commits

View File

@ -4,6 +4,7 @@
#include "fsfw/cfdp/handler/ReservedMessageParser.h" #include "fsfw/cfdp/handler/ReservedMessageParser.h"
#include "fsfw/cfdp/tlv/Lv.h" #include "fsfw/cfdp/tlv/Lv.h"
#include "fsfw/cfdp/tlv/ReservedMessageCreator.h" #include "fsfw/cfdp/tlv/ReservedMessageCreator.h"
#include "fsfw/cfdp/CfdpMessage.h"
#include "fsfw/cfdp/tlv/StringLv.h" #include "fsfw/cfdp/tlv/StringLv.h"
#include "fsfw/globalfunctions/arrayprinter.h" #include "fsfw/globalfunctions/arrayprinter.h"
#include "mocks/MessageQueueMock.h" #include "mocks/MessageQueueMock.h"
@ -16,7 +17,7 @@ TEST_CASE("Reserved Message Parser", "[cfdp]") {
std::string srcFileName = "hello.txt"; std::string srcFileName = "hello.txt";
std::string destFileName = "hello2.txt"; std::string destFileName = "hello2.txt";
MessageQueueId_t destQueueId = 2; MessageQueueId_t destQueueId = 2;
MessageQueueMock msgQueue(destQueueId); MessageQueueMock msgQueue(1);
LocalPool::LocalPoolConfig storeCfg = {{10, 32}, {10, 64}, {10, 128}, {10, 1024}}; LocalPool::LocalPoolConfig storeCfg = {{10, 32}, {10, 64}, {10, 128}, {10, 1024}};
StorageManagerMock ipcStore(0, storeCfg); StorageManagerMock ipcStore(0, storeCfg);
std::array<uint8_t, 128> buffer{}; std::array<uint8_t, 128> buffer{};
@ -41,4 +42,13 @@ TEST_CASE("Reserved Message Parser", "[cfdp]") {
ReservedMessageParser parser(ipcStore, msgQueue, destQueueId); ReservedMessageParser parser(ipcStore, msgQueue, destQueueId);
CHECK(parser.parse(buffer.data(), serLen) == OK); CHECK(parser.parse(buffer.data(), serLen) == OK);
CommandMessage msg;
CHECK(msgQueue.wasMessageSent());
CHECK(msgQueue.numberOfSentMessages() == 1);
CHECK(msgQueue.getNextSentMessage(destQueueId, msg) == OK);
store_address_t storeId = CfdpMessage::getStoreId(&msg);
const uint8_t* data;
size_t packetLen;
ipcStore.getData(storeId, &data, &packetLen);
CHECK(packetLen > 0);
} }