continue cfdp handler impl
This commit is contained in:
parent
68857b9d4e
commit
b1e704cd11
@ -1 +1,2 @@
|
|||||||
target_sources(${TARGET_NAME} PRIVATE InitMission.cpp ObjectFactory.cpp)
|
target_sources(${TARGET_NAME} PRIVATE InitMission.cpp ObjectFactory.cpp
|
||||||
|
CfdpHandler.cpp)
|
||||||
|
29
bsp_hosted/core/CfdpHandler.cpp
Normal file
29
bsp_hosted/core/CfdpHandler.cpp
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#include "CfdpHandler.h"
|
||||||
|
|
||||||
|
#include "fsfw/ipc/QueueFactory.h"
|
||||||
|
|
||||||
|
using namespace returnvalue;
|
||||||
|
CfdpHandler::CfdpHandler(object_id_t objectId, AcceptsTelemetryIF& packetDest,
|
||||||
|
const cfdp::DestHandlerParams& destParams)
|
||||||
|
: SystemObject(objectId), destHandler(destParams, cfdp::FsfwParams(packetDest, nullptr, this)) {
|
||||||
|
// TODO: Make configurable?
|
||||||
|
msgQueue = QueueFactory::instance()->createMessageQueue();
|
||||||
|
destHandler.setMsgQueue(*msgQueue);
|
||||||
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] const char* CfdpHandler::getName() const { return "CFDP Handler"; }
|
||||||
|
|
||||||
|
[[nodiscard]] uint32_t CfdpHandler::getIdentifier() const { return 0; }
|
||||||
|
|
||||||
|
[[nodiscard]] MessageQueueId_t CfdpHandler::getRequestQueue() const {
|
||||||
|
// TODO: return TC queue here
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t CfdpHandler::initialize() {
|
||||||
|
ReturnValue_t result = destHandler.initialize();
|
||||||
|
if (result != OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
return SystemObject::initialize();
|
||||||
|
}
|
23
bsp_hosted/core/CfdpHandler.h
Normal file
23
bsp_hosted/core/CfdpHandler.h
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#ifndef FSFW_EXAMPLE_HOSTED_CFDPHANDLER_H
|
||||||
|
#define FSFW_EXAMPLE_HOSTED_CFDPHANDLER_H
|
||||||
|
|
||||||
|
#include "fsfw/cfdp/handler/DestHandler.h"
|
||||||
|
#include "fsfw/objectmanager/SystemObject.h"
|
||||||
|
#include "fsfw/tmtcservices/AcceptsTelecommandsIF.h"
|
||||||
|
|
||||||
|
class CfdpHandler : public SystemObject, public AcceptsTelecommandsIF {
|
||||||
|
public:
|
||||||
|
CfdpHandler(object_id_t objectId, AcceptsTelemetryIF& packetDest,
|
||||||
|
const cfdp::DestHandlerParams& destParams);
|
||||||
|
[[nodiscard]] const char* getName() const override;
|
||||||
|
[[nodiscard]] uint32_t getIdentifier() const override;
|
||||||
|
[[nodiscard]] MessageQueueId_t getRequestQueue() const override;
|
||||||
|
|
||||||
|
ReturnValue_t initialize() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
MessageQueueIF* msgQueue = nullptr;
|
||||||
|
cfdp::DestHandler destHandler;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // FSFW_EXAMPLE_HOSTED_CFDPHANDLER_H
|
@ -1 +1 @@
|
|||||||
Subproject commit 4ae9f5c74622ded292dd9f5e8ad130fb2e8c7a2f
|
Subproject commit bf36e7f8f987e9c244dfd67f527b4c178fb37643
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
|||||||
Subproject commit 8971eb386ed8985fcfb5eb6aa1dc157b20c2d897
|
Subproject commit 11a4b276423ac287f5522cdbf913a81e1ee3d347
|
Loading…
x
Reference in New Issue
Block a user