ping works now
This commit is contained in:
parent
3acc72470d
commit
a523f4ab91
@ -40,13 +40,13 @@ void ObjectFactory::produceGenericObjects() {
|
||||
new EventManager(objects::EVENT_MANAGER);
|
||||
new HealthTable(objects::HEALTH_TABLE);
|
||||
new InternalErrorReporter(objects::INTERNAL_ERROR_REPORTER);
|
||||
new CdsShortTimeStamper(objects::TIME_STAMPER);
|
||||
auto* stamperAndReader = new CdsShortTimeStamper(objects::TIME_STAMPER);
|
||||
new VerificationReporter(nullptr);
|
||||
auto *ccsdsDistrib =
|
||||
new CCSDSDistributor(apid::APID, objects::CCSDS_DISTRIBUTOR);
|
||||
new PusDistributor(apid::APID, objects::PUS_DISTRIBUTOR,
|
||||
ccsdsDistrib);
|
||||
new TmFunnel(objects::TM_FUNNEL);
|
||||
new TmFunnel(*stamperAndReader, objects::TM_FUNNEL);
|
||||
#endif /* OBSW_ADD_CORE_COMPONENTS == 1 */
|
||||
|
||||
/* PUS stack */
|
||||
|
@ -9,8 +9,8 @@
|
||||
object_id_t TmFunnel::downlinkDestination = objects::NO_OBJECT;
|
||||
object_id_t TmFunnel::storageDestination = objects::NO_OBJECT;
|
||||
|
||||
TmFunnel::TmFunnel(object_id_t objectId, uint32_t messageDepth)
|
||||
: SystemObject(objectId), messageDepth(messageDepth) {
|
||||
TmFunnel::TmFunnel(TimeReaderIF& timeReader, object_id_t objectId, uint32_t messageDepth)
|
||||
: SystemObject(objectId), timeReader(timeReader), messageDepth(messageDepth) {
|
||||
tmQueue = QueueFactory::instance()->createMessageQueue(
|
||||
messageDepth, MessageQueueMessage::MAX_MESSAGE_SIZE);
|
||||
storageQueue = QueueFactory::instance()->createMessageQueue(
|
||||
@ -29,6 +29,7 @@ ReturnValue_t TmFunnel::performOperation(uint8_t operationCode) {
|
||||
while (status == HasReturnvaluesIF::RETURN_OK) {
|
||||
status = handlePacket(¤tMessage);
|
||||
if (status != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::warning << "TmFunnel packet handling failed" << std::endl;
|
||||
break;
|
||||
}
|
||||
status = tmQueue->receiveMessage(¤tMessage);
|
||||
@ -49,7 +50,7 @@ ReturnValue_t TmFunnel::handlePacket(TmTcMessage *message) {
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
return result;
|
||||
}
|
||||
PusTmZeroCopyWriter packet(packetData, size);
|
||||
PusTmZeroCopyWriter packet(&timeReader, packetData, size);
|
||||
result = packet.parseDataWithoutCrcCheck();
|
||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||
return result;
|
||||
@ -62,8 +63,7 @@ ReturnValue_t TmFunnel::handlePacket(TmTcMessage *message) {
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
tmPool->deleteData(message->getStorageId());
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "TmFunnel::handlePacket: Error sending to downlink handler"
|
||||
<< std::endl;
|
||||
sif::error << "TmFunnel::handlePacket: Error sending TM to downlink handler" << std::endl;
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
@ -7,6 +7,8 @@
|
||||
#include <fsfw/tmtcservices/AcceptsTelemetryIF.h>
|
||||
#include <fsfw/tmtcservices/TmTcMessage.h>
|
||||
|
||||
#include "fsfw/timemanager/TimeReaderIF.h"
|
||||
|
||||
namespace Factory {
|
||||
void setStaticFrameworkObjectIds();
|
||||
}
|
||||
@ -25,7 +27,7 @@ class TmFunnel : public AcceptsTelemetryIF,
|
||||
friend void(Factory::setStaticFrameworkObjectIds)();
|
||||
|
||||
public:
|
||||
explicit TmFunnel(object_id_t objectId, uint32_t messageDepth = 20);
|
||||
explicit TmFunnel(TimeReaderIF& timeReader, object_id_t objectId, uint32_t messageDepth = 20);
|
||||
~TmFunnel() override;
|
||||
|
||||
MessageQueueId_t getReportReceptionQueue(uint8_t virtualChannel) override;
|
||||
@ -38,6 +40,7 @@ protected:
|
||||
|
||||
private:
|
||||
uint16_t sourceSequenceCount = 0;
|
||||
TimeReaderIF& timeReader;
|
||||
MessageQueueIF *tmQueue = nullptr;
|
||||
MessageQueueIF *storageQueue = nullptr;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user