removed command action helper form ccsds handler
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
This commit is contained in:
parent
ed0eb4fe9c
commit
70450041e6
@ -24,14 +24,11 @@ CCSDSHandler::CCSDSHandler(object_id_t objectId, object_id_t ptmeId, object_id_t
|
|||||||
gpioIF(gpioIF),
|
gpioIF(gpioIF),
|
||||||
enTxClock(enTxClock),
|
enTxClock(enTxClock),
|
||||||
enTxData(enTxData),
|
enTxData(enTxData),
|
||||||
transmitterTimeout(transmitterTimeout),
|
transmitterTimeout(transmitterTimeout) {
|
||||||
commandActionHelper(this) {
|
|
||||||
commandQueue = QueueFactory::instance()->createMessageQueue(QUEUE_SIZE);
|
commandQueue = QueueFactory::instance()->createMessageQueue(QUEUE_SIZE);
|
||||||
auto mqArgs = MqArgs(objectId, static_cast<void*>(this));
|
auto mqArgs = MqArgs(objectId, static_cast<void*>(this));
|
||||||
eventQueue =
|
eventQueue =
|
||||||
QueueFactory::instance()->createMessageQueue(10, EventMessage::EVENT_MESSAGE_SIZE, &mqArgs);
|
QueueFactory::instance()->createMessageQueue(10, EventMessage::EVENT_MESSAGE_SIZE, &mqArgs);
|
||||||
commandActionHelperQueue =
|
|
||||||
QueueFactory::instance()->createMessageQueue(EventMessage::EVENT_MESSAGE_SIZE * 5);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CCSDSHandler::~CCSDSHandler() {}
|
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(); }
|
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) {
|
void CCSDSHandler::addVirtualChannel(VcId_t vcId, VirtualChannel* virtualChannel) {
|
||||||
if (vcId > common::NUMBER_OF_VIRTUAL_CHANNELS) {
|
if (vcId > common::NUMBER_OF_VIRTUAL_CHANNELS) {
|
||||||
sif::warning << "CCSDSHandler::addVirtualChannel: Invalid virtual channel ID" << std::endl;
|
sif::warning << "CCSDSHandler::addVirtualChannel: Invalid virtual channel ID" << std::endl;
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
#include "fsfw/tmtcservices/AcceptsTelemetryIF.h"
|
#include "fsfw/tmtcservices/AcceptsTelemetryIF.h"
|
||||||
#include "fsfw_hal/common/gpio/GpioIF.h"
|
#include "fsfw_hal/common/gpio/GpioIF.h"
|
||||||
#include "fsfw_hal/common/gpio/gpioDefinitions.h"
|
#include "fsfw_hal/common/gpio/gpioDefinitions.h"
|
||||||
#include "fsfw/action/CommandActionHelper.h"
|
|
||||||
#include "fsfw/action/CommandsActionsIF.h"
|
#include "fsfw/action/CommandsActionsIF.h"
|
||||||
#include "linux/obc/PtmeConfig.h"
|
#include "linux/obc/PtmeConfig.h"
|
||||||
|
|
||||||
@ -134,8 +133,6 @@ class CCSDSHandler : public SystemObject,
|
|||||||
|
|
||||||
MessageQueueIF* commandQueue = nullptr;
|
MessageQueueIF* commandQueue = nullptr;
|
||||||
MessageQueueIF* eventQueue = nullptr;
|
MessageQueueIF* eventQueue = nullptr;
|
||||||
MessageQueueIF* commandActionHelperQueue = nullptr;
|
|
||||||
|
|
||||||
ParameterHelper parameterHelper;
|
ParameterHelper parameterHelper;
|
||||||
|
|
||||||
ActionHelper actionHelper;
|
ActionHelper actionHelper;
|
||||||
@ -155,15 +152,12 @@ class CCSDSHandler : public SystemObject,
|
|||||||
// Countdown to disable transmitter after 15 minutes
|
// Countdown to disable transmitter after 15 minutes
|
||||||
Countdown transmitterCountdown;
|
Countdown transmitterCountdown;
|
||||||
|
|
||||||
CommandActionHelper commandActionHelper;
|
|
||||||
|
|
||||||
// When true transmitting is started as soon as carrier lock has been detected
|
// When true transmitting is started as soon as carrier lock has been detected
|
||||||
bool enableTxWhenCarrierLock = false;
|
bool enableTxWhenCarrierLock = false;
|
||||||
|
|
||||||
bool linkState = DOWN;
|
bool linkState = DOWN;
|
||||||
|
|
||||||
void readCommandQueue(void);
|
void readCommandQueue(void);
|
||||||
void readCommandActionHelperQueue(void);
|
|
||||||
void handleTelemetry();
|
void handleTelemetry();
|
||||||
void handleTelecommands();
|
void handleTelecommands();
|
||||||
void checkEvents();
|
void checkEvents();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user