This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user