removed command action helper form ccsds handler
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit

This commit is contained in:
Jakob Meier 2022-06-27 08:53:14 +02:00
parent ed0eb4fe9c
commit 70450041e6
2 changed files with 1 additions and 75 deletions

View File

@ -24,14 +24,11 @@ CCSDSHandler::CCSDSHandler(object_id_t objectId, object_id_t ptmeId, object_id_t
gpioIF(gpioIF),
enTxClock(enTxClock),
enTxData(enTxData),
transmitterTimeout(transmitterTimeout),
commandActionHelper(this) {
transmitterTimeout(transmitterTimeout) {
commandQueue = QueueFactory::instance()->createMessageQueue(QUEUE_SIZE);
auto mqArgs = MqArgs(objectId, static_cast<void*>(this));
eventQueue =
QueueFactory::instance()->createMessageQueue(10, EventMessage::EVENT_MESSAGE_SIZE, &mqArgs);
commandActionHelperQueue =
QueueFactory::instance()->createMessageQueue(EventMessage::EVENT_MESSAGE_SIZE * 5);
}
CCSDSHandler::~CCSDSHandler() {}
@ -161,73 +158,8 @@ void CCSDSHandler::readCommandQueue(void) {
}
}
void CCSDSHandler::readCommandActionHelperQueue() {
CommandMessage message;
for (ReturnValue_t result = commandActionHelperQueue->receiveMessage(&message);
result == RETURN_OK; result = commandActionHelperQueue->receiveMessage(&message)) {
result = commandActionHelper.handleReply(&message);
if (result == RETURN_OK) {
continue;
}
}
}
MessageQueueId_t CCSDSHandler::getCommandQueue() const { return commandQueue->getId(); }
MessageQueueIF* CCSDSHandler::getCommandQueuePtr() { return commandActionHelperQueue; }
void CCSDSHandler::stepSuccessfulReceived(ActionId_t actionId, uint8_t step) { return; }
void CCSDSHandler::stepFailedReceived(ActionId_t actionId, uint8_t step,
ReturnValue_t returnCode) {
switch (actionId) {
case syrlinks::SET_TX_MODE_MODULATION: {
sif::warning << "CCSDSHandler::stepFailedReceived: Failed to set enable transmitter"
<< std::endl;
break;
}
default:
sif::debug << "CCSDSHandler::stepFailedReceived: Received unexpected action reply"
<< std::endl;
break;
}
}
void CCSDSHandler::dataReceived(ActionId_t actionId, const uint8_t* data, uint32_t size) {
return;
}
void CCSDSHandler::completionSuccessfulReceived(ActionId_t actionId) {
switch (actionId) {
case syrlinks::SET_TX_MODE_MODULATION: {
triggerEvent(TRANSMITTER_ENABLED);
transmitterCountdown.setTimeout(transmitterTimeout);
linkState = UP;
// Set link state of all virtual channels to link up
forwardLinkstate();
break;
}
default:
sif::debug << "CCSDSHandler::completionSuccessfulReceived: Received unexpected action reply"
<< std::endl;
break;
}
}
void CCSDSHandler::completionFailedReceived(ActionId_t actionId, ReturnValue_t returnCode) {
switch (actionId) {
case syrlinks::SET_TX_MODE_MODULATION: {
sif::warning << "CCSDSHandler::completionFailedReceived: Failed to set enable transmitter"
<< std::endl;
break;
}
default:
sif::debug << "CCSDSHandler::completionFailedReceived: Received unexpected action reply"
<< std::endl;
break;
}
}
void CCSDSHandler::addVirtualChannel(VcId_t vcId, VirtualChannel* virtualChannel) {
if (vcId > common::NUMBER_OF_VIRTUAL_CHANNELS) {
sif::warning << "CCSDSHandler::addVirtualChannel: Invalid virtual channel ID" << std::endl;

View File

@ -17,7 +17,6 @@
#include "fsfw/tmtcservices/AcceptsTelemetryIF.h"
#include "fsfw_hal/common/gpio/GpioIF.h"
#include "fsfw_hal/common/gpio/gpioDefinitions.h"
#include "fsfw/action/CommandActionHelper.h"
#include "fsfw/action/CommandsActionsIF.h"
#include "linux/obc/PtmeConfig.h"
@ -134,8 +133,6 @@ class CCSDSHandler : public SystemObject,
MessageQueueIF* commandQueue = nullptr;
MessageQueueIF* eventQueue = nullptr;
MessageQueueIF* commandActionHelperQueue = nullptr;
ParameterHelper parameterHelper;
ActionHelper actionHelper;
@ -155,15 +152,12 @@ class CCSDSHandler : public SystemObject,
// Countdown to disable transmitter after 15 minutes
Countdown transmitterCountdown;
CommandActionHelper commandActionHelper;
// When true transmitting is started as soon as carrier lock has been detected
bool enableTxWhenCarrierLock = false;
bool linkState = DOWN;
void readCommandQueue(void);
void readCommandActionHelperQueue(void);
void handleTelemetry();
void handleTelecommands();
void checkEvents();