ccsds handler
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
Jakob Meier
2021-09-29 14:47:20 +02:00
parent 5b26564058
commit 55d31d0dc2
9 changed files with 41 additions and 10 deletions

View File

@ -43,6 +43,16 @@ ReturnValue_t CCSDSHandler::initialize() {
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
VirtualChannelMapIter iter;
for (iter = virtualChannelMap.begin(); iter != virtualChannelMap.end(); iter++) {
result = iter->second->initialize();
if (result != RETURN_OK) {
return result;
}
iter->second->setPtmeObject(ptme);
}
return result;
}

View File

@ -56,11 +56,12 @@ MessageQueueId_t VirtualChannel::getReportReceptionQueue(uint8_t virtualChannel)
return tmQueue->getId();
}
void VirtualChannel::setPtmeObject(PtmeIF* ptme) {
if (ptme == nullptr) {
void VirtualChannel::setPtmeObject(PtmeIF* ptme_) {
if (ptme_ == nullptr) {
sif::warning << "VirtualChannel::setPtmeObject: Invalid ptme object" << std::endl;
return;
}
ptme = ptme;
ptme = ptme_;
}
void VirtualChannel::setLinkState(bool linkIsUp) {

View File

@ -1,6 +1,7 @@
#ifndef VIRTUALCHANNEL_H_
#define VIRTUALCHANNEL_H_
#include "OBSWConfig.h"
#include "fsfw/tmtcservices/AcceptsTelemetryIF.h"
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
#include <fsfw/ipc/MessageQueueIF.h>
@ -31,7 +32,7 @@ class VirtualChannel: public AcceptsTelemetryIF, public HasReturnvaluesIF {
*
* @param ptme Pointer to ptme object
*/
void setPtmeObject(PtmeIF* ptme);
void setPtmeObject(PtmeIF* ptme_);
/**
* @brief Can be used by the owner to set the link state. Packets will be discarded if link
@ -44,7 +45,13 @@ private:
PtmeIF* ptme = nullptr;
MessageQueueIF* tmQueue = nullptr;
uint8_t vcId;
bool linkIsUp;
#if OBSW_LINK_IS_UP == 1
bool linkIsUp = true;
#else
bool linkIsUp = false;
#endif /* OBSW_LINK_IS_UP == 1 */
StorageManagerIF* tmStore = nullptr;
};