auto-formatter
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Robin Müller 2023-02-22 19:45:41 +01:00
parent 5357de8da8
commit a190d99f6d
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
11 changed files with 74 additions and 63 deletions

View File

@ -756,9 +756,9 @@ ReturnValue_t ObjectFactory::createCcsdsComponents(LinuxLibgpioIF* gpioComIF,
new AxiPtmeConfig(objects::AXI_PTME_CONFIG, q7s::UIO_PTME, q7s::uiomapids::PTME_CONFIG); new AxiPtmeConfig(objects::AXI_PTME_CONFIG, q7s::UIO_PTME, q7s::uiomapids::PTME_CONFIG);
PtmeConfig* ptmeConfig = new PtmeConfig(objects::PTME_CONFIG, axiPtmeConfig); PtmeConfig* ptmeConfig = new PtmeConfig(objects::PTME_CONFIG, axiPtmeConfig);
*ipCoreHandler = new CcsdsIpCoreHandler( *ipCoreHandler = new CcsdsIpCoreHandler(objects::CCSDS_HANDLER, objects::PTME,
objects::CCSDS_HANDLER, objects::PTME, objects::CCSDS_PACKET_DISTRIBUTOR, ptmeConfig, objects::CCSDS_PACKET_DISTRIBUTOR, ptmeConfig, gpioComIF,
gpioComIF, gpioIds::RS485_EN_TX_CLOCK, gpioIds::RS485_EN_TX_DATA); gpioIds::RS485_EN_TX_CLOCK, gpioIds::RS485_EN_TX_DATA);
VirtualChannel* vc = nullptr; VirtualChannel* vc = nullptr;
vc = new VirtualChannel(ccsds::VC0, config::VC0_QUEUE_SIZE, objects::CCSDS_HANDLER); vc = new VirtualChannel(ccsds::VC0, config::VC0_QUEUE_SIZE, objects::CCSDS_HANDLER);
(*ipCoreHandler)->addVirtualChannel(ccsds::VC0, vc); (*ipCoreHandler)->addVirtualChannel(ccsds::VC0, vc);

View File

@ -3,8 +3,9 @@ if(EIVE_BUILD_GPSD_GPS_HANDLER)
endif() endif()
target_sources( target_sources(
${OBSW_NAME} PRIVATE Max31865RtdPolling.cpp ScexUartReader.cpp ImtqPollingTask.cpp ${OBSW_NAME}
ScexDleParser.cpp ScexHelper.cpp RwPollingTask.cpp) PRIVATE Max31865RtdPolling.cpp ScexUartReader.cpp ImtqPollingTask.cpp
ScexDleParser.cpp ScexHelper.cpp RwPollingTask.cpp)
add_subdirectory(ploc) add_subdirectory(ploc)

View File

@ -256,7 +256,7 @@ ReturnValue_t ImtqHandler::scanForReply(const uint8_t* start, size_t remainingSi
ReturnValue_t ImtqHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) { ReturnValue_t ImtqHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) {
ReturnValue_t result; ReturnValue_t result;
ReturnValue_t status = returnvalue::OK; ReturnValue_t status = returnvalue::OK;
if(getMode() != MODE_NORMAL) { if (getMode() != MODE_NORMAL) {
// Ignore replies during transitions. // Ignore replies during transitions.
return returnvalue::OK; return returnvalue::OK;
} }

View File

@ -10,7 +10,6 @@
#include <utility> #include <utility>
ComSubsystem::ComSubsystem(object_id_t setObjectId, uint32_t maxNumberOfSequences, ComSubsystem::ComSubsystem(object_id_t setObjectId, uint32_t maxNumberOfSequences,
uint32_t maxNumberOfTables, uint32_t transmitterTimeout) uint32_t maxNumberOfTables, uint32_t transmitterTimeout)
: Subsystem(setObjectId, maxNumberOfSequences, maxNumberOfTables), paramHelper(this) { : Subsystem(setObjectId, maxNumberOfSequences, maxNumberOfTables), paramHelper(this) {
@ -116,11 +115,11 @@ void ComSubsystem::startTransition(Mode_t mode, Submode_t submode) {
transmitterCountdown.timeOut(); transmitterCountdown.timeOut();
countdownActive = false; countdownActive = false;
} else if (isTxMode(mode)) { } else if (isTxMode(mode)) {
// Only start transmitter countdown if transmitter is not already on // Only start transmitter countdown if transmitter is not already on
if (not isTxMode(this->mode)) { if (not isTxMode(this->mode)) {
transmitterCountdown.resetTimer(); transmitterCountdown.resetTimer();
countdownActive = true; countdownActive = true;
} }
} }
Subsystem::startTransition(mode, submode); Subsystem::startTransition(mode, submode);
} }
@ -190,10 +189,10 @@ void ComSubsystem::checkTransmitterCountdown() {
} }
bool ComSubsystem::isTxMode(Mode_t mode) { bool ComSubsystem::isTxMode(Mode_t mode) {
if ((mode == com::Submode::RX_AND_TX_DEFAULT_DATARATE) || if ((mode == com::Submode::RX_AND_TX_DEFAULT_DATARATE) ||
(mode == com::Submode::RX_AND_TX_LOW_DATARATE) || (mode == com::Submode::RX_AND_TX_LOW_DATARATE) ||
(mode == com::Submode::RX_AND_TX_HIGH_DATARATE)) { (mode == com::Submode::RX_AND_TX_HIGH_DATARATE)) {
return true; return true;
} }
return false; return false;
} }

View File

@ -1,24 +1,25 @@
#ifndef MISSION_SYSTEM_COMSUBSYSTEM_H_ #ifndef MISSION_SYSTEM_COMSUBSYSTEM_H_
#define MISSION_SYSTEM_COMSUBSYSTEM_H_ #define MISSION_SYSTEM_COMSUBSYSTEM_H_
#include <fsfw/events/EventMessage.h>
#include <fsfw/parameters/HasParametersIF.h> #include <fsfw/parameters/HasParametersIF.h>
#include <fsfw/parameters/ParameterHelper.h> #include <fsfw/parameters/ParameterHelper.h>
#include <fsfw/subsystem/Subsystem.h> #include <fsfw/subsystem/Subsystem.h>
#include <fsfw/events/EventMessage.h>
#include "mission/comDefs.h" #include "mission/comDefs.h"
class ComSubsystem : public Subsystem, public ReceivesParameterMessagesIF { class ComSubsystem : public Subsystem, public ReceivesParameterMessagesIF {
public: public:
/** /**
* @brief Constructor * @brief Constructor
* *
* @param setObjectId * @param setObjectId
* @param maxNumberOfSequences * @param maxNumberOfSequences
* @param maxNumberOfTables * @param maxNumberOfTables
* @param transmitterTimeout Maximum time the transmitter of the syrlinks * @param transmitterTimeout Maximum time the transmitter of the syrlinks
* will be enabled * will be
*/ * enabled
*/
ComSubsystem(object_id_t setObjectId, uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables, ComSubsystem(object_id_t setObjectId, uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables,
uint32_t transmitterTimeout); uint32_t transmitterTimeout);
virtual ~ComSubsystem() = default; virtual ~ComSubsystem() = default;
@ -30,7 +31,6 @@ class ComSubsystem : public Subsystem, public ReceivesParameterMessagesIF {
virtual void performChildOperation() override; virtual void performChildOperation() override;
private: private:
static const Mode_t INITIAL_MODE = 0; static const Mode_t INITIAL_MODE = 0;
ReturnValue_t handleCommandMessage(CommandMessage *message) override; ReturnValue_t handleCommandMessage(CommandMessage *message) override;
@ -40,7 +40,7 @@ class ComSubsystem : public Subsystem, public ReceivesParameterMessagesIF {
void startTransition(Mode_t mode, Submode_t submode) override; void startTransition(Mode_t mode, Submode_t submode) override;
void readEventQueue(); void readEventQueue();
void handleEventMessage(EventMessage* eventMessage); void handleEventMessage(EventMessage *eventMessage);
void handleBitLockEvent(); void handleBitLockEvent();
void handleCarrierLockEvent(); void handleCarrierLockEvent();
void checkTransmitterCountdown(); void checkTransmitterCountdown();
@ -56,11 +56,11 @@ class ComSubsystem : public Subsystem, public ReceivesParameterMessagesIF {
uint8_t datarateCfg = static_cast<uint8_t>(com::Datarate::LOW_RATE_MODULATION_BPSK); uint8_t datarateCfg = static_cast<uint8_t>(com::Datarate::LOW_RATE_MODULATION_BPSK);
// Maximum time after which the transmitter will be turned of. This is a // Maximum time after which the transmitter will be turned of. This is a
// protection mechanism due prevent the syrlinks from overheating // protection mechanism due prevent the syrlinks from overheating
uint32_t transmitterTimeout = 0; uint32_t transmitterTimeout = 0;
ParameterHelper paramHelper; ParameterHelper paramHelper;
MessageQueueIF* eventQueue = nullptr; MessageQueueIF *eventQueue = nullptr;
bool enableTxWhenCarrierLock = false; bool enableTxWhenCarrierLock = false;

View File

@ -10,7 +10,8 @@
const auto check = subsystem::checkInsert; const auto check = subsystem::checkInsert;
ComSubsystem satsystem::com::SUBSYSTEM = ComSubsystem(objects::COM_SUBSYSTEM, 12, 24, TRANSMITTER_TIMEOUT); ComSubsystem satsystem::com::SUBSYSTEM =
ComSubsystem(objects::COM_SUBSYSTEM, 12, 24, TRANSMITTER_TIMEOUT);
static const auto OFF = HasModesIF::MODE_OFF; static const auto OFF = HasModesIF::MODE_OFF;
static const auto ON = HasModesIF::MODE_ON; static const auto ON = HasModesIF::MODE_ON;
@ -18,39 +19,48 @@ static const auto NML = DeviceHandlerIF::MODE_NORMAL;
auto COM_SEQUENCE_RX_ONLY = auto COM_SEQUENCE_RX_ONLY =
std::make_pair(::com::Submode::RX_ONLY, FixedArrayList<ModeListEntry, 3>()); std::make_pair(::com::Submode::RX_ONLY, FixedArrayList<ModeListEntry, 3>());
auto COM_TABLE_RX_ONLY_TGT = auto COM_TABLE_RX_ONLY_TGT = std::make_pair(
std::make_pair(static_cast<uint32_t>(::com::Submode::RX_ONLY << 24) | 1, FixedArrayList<ModeListEntry, 3>()); static_cast<uint32_t>(::com::Submode::RX_ONLY << 24) | 1, FixedArrayList<ModeListEntry, 3>());
auto COM_TABLE_RX_ONLY_TRANS_0 = auto COM_TABLE_RX_ONLY_TRANS_0 = std::make_pair(
std::make_pair(static_cast<uint32_t>(::com::Submode::RX_ONLY << 24) | 2, FixedArrayList<ModeListEntry, 3>()); static_cast<uint32_t>(::com::Submode::RX_ONLY << 24) | 2, FixedArrayList<ModeListEntry, 3>());
auto COM_TABLE_RX_ONLY_TRANS_1 = auto COM_TABLE_RX_ONLY_TRANS_1 = std::make_pair(
std::make_pair(static_cast<uint32_t>(::com::Submode::RX_ONLY << 24) | 3, FixedArrayList<ModeListEntry, 3>()); static_cast<uint32_t>(::com::Submode::RX_ONLY << 24) | 3, FixedArrayList<ModeListEntry, 3>());
auto COM_SEQUENCE_RX_AND_TX_LOW_RATE = auto COM_SEQUENCE_RX_AND_TX_LOW_RATE =
std::make_pair(::com::Submode::RX_AND_TX_LOW_DATARATE, FixedArrayList<ModeListEntry, 3>()); std::make_pair(::com::Submode::RX_AND_TX_LOW_DATARATE, FixedArrayList<ModeListEntry, 3>());
auto COM_TABLE_RX_AND_TX_LOW_RATE_TGT = std::make_pair( auto COM_TABLE_RX_AND_TX_LOW_RATE_TGT =
static_cast<uint32_t>(::com::Submode::RX_AND_TX_LOW_DATARATE << 24) | 1, FixedArrayList<ModeListEntry, 3>()); std::make_pair(static_cast<uint32_t>(::com::Submode::RX_AND_TX_LOW_DATARATE << 24) | 1,
auto COM_TABLE_RX_AND_TX_LOW_RATE_TRANS_0 = std::make_pair( FixedArrayList<ModeListEntry, 3>());
static_cast<uint32_t>(::com::Submode::RX_AND_TX_LOW_DATARATE << 24) | 2, FixedArrayList<ModeListEntry, 3>()); auto COM_TABLE_RX_AND_TX_LOW_RATE_TRANS_0 =
auto COM_TABLE_RX_AND_TX_LOW_RATE_TRANS_1 = std::make_pair( std::make_pair(static_cast<uint32_t>(::com::Submode::RX_AND_TX_LOW_DATARATE << 24) | 2,
static_cast<uint32_t>(::com::Submode::RX_AND_TX_LOW_DATARATE << 24) | 3, FixedArrayList<ModeListEntry, 3>()); FixedArrayList<ModeListEntry, 3>());
auto COM_TABLE_RX_AND_TX_LOW_RATE_TRANS_1 =
std::make_pair(static_cast<uint32_t>(::com::Submode::RX_AND_TX_LOW_DATARATE << 24) | 3,
FixedArrayList<ModeListEntry, 3>());
auto COM_SEQUENCE_RX_AND_TX_HIGH_RATE = auto COM_SEQUENCE_RX_AND_TX_HIGH_RATE =
std::make_pair(::com::Submode::RX_AND_TX_HIGH_DATARATE, FixedArrayList<ModeListEntry, 3>()); std::make_pair(::com::Submode::RX_AND_TX_HIGH_DATARATE, FixedArrayList<ModeListEntry, 3>());
auto COM_TABLE_RX_AND_TX_HIGH_RATE_TGT = std::make_pair( auto COM_TABLE_RX_AND_TX_HIGH_RATE_TGT =
static_cast<uint32_t>(::com::Submode::RX_AND_TX_HIGH_DATARATE << 24) | 1, FixedArrayList<ModeListEntry, 3>()); std::make_pair(static_cast<uint32_t>(::com::Submode::RX_AND_TX_HIGH_DATARATE << 24) | 1,
auto COM_TABLE_RX_AND_TX_HIGH_RATE_TRANS_0 = std::make_pair( FixedArrayList<ModeListEntry, 3>());
static_cast<uint32_t>(::com::Submode::RX_AND_TX_HIGH_DATARATE << 24) | 2, FixedArrayList<ModeListEntry, 3>()); auto COM_TABLE_RX_AND_TX_HIGH_RATE_TRANS_0 =
auto COM_TABLE_RX_AND_TX_HIGH_RATE_TRANS_1 = std::make_pair( std::make_pair(static_cast<uint32_t>(::com::Submode::RX_AND_TX_HIGH_DATARATE << 24) | 2,
static_cast<uint32_t>(::com::Submode::RX_AND_TX_HIGH_DATARATE << 24) | 3, FixedArrayList<ModeListEntry, 3>()); FixedArrayList<ModeListEntry, 3>());
auto COM_TABLE_RX_AND_TX_HIGH_RATE_TRANS_1 =
std::make_pair(static_cast<uint32_t>(::com::Submode::RX_AND_TX_HIGH_DATARATE << 24) | 3,
FixedArrayList<ModeListEntry, 3>());
auto COM_SEQUENCE_RX_AND_TX_DEFAULT_RATE = auto COM_SEQUENCE_RX_AND_TX_DEFAULT_RATE =
std::make_pair(::com::Submode::RX_AND_TX_DEFAULT_DATARATE, FixedArrayList<ModeListEntry, 3>()); std::make_pair(::com::Submode::RX_AND_TX_DEFAULT_DATARATE, FixedArrayList<ModeListEntry, 3>());
auto COM_TABLE_RX_AND_TX_DEFAULT_RATE_TGT = std::make_pair( auto COM_TABLE_RX_AND_TX_DEFAULT_RATE_TGT =
static_cast<uint32_t>(::com::Submode::RX_AND_TX_DEFAULT_DATARATE << 24) | 1, FixedArrayList<ModeListEntry, 3>()); std::make_pair(static_cast<uint32_t>(::com::Submode::RX_AND_TX_DEFAULT_DATARATE << 24) | 1,
auto COM_TABLE_RX_AND_TX_DEFAULT_RATE_TRANS_0 = std::make_pair( FixedArrayList<ModeListEntry, 3>());
static_cast<uint32_t>(::com::Submode::RX_AND_TX_DEFAULT_DATARATE << 24) | 2, FixedArrayList<ModeListEntry, 3>()); auto COM_TABLE_RX_AND_TX_DEFAULT_RATE_TRANS_0 =
auto COM_TABLE_RX_AND_TX_DEFAULT_RATE_TRANS_1 = std::make_pair( std::make_pair(static_cast<uint32_t>(::com::Submode::RX_AND_TX_DEFAULT_DATARATE << 24) | 2,
static_cast<uint32_t>(::com::Submode::RX_AND_TX_DEFAULT_DATARATE << 24) | 3, FixedArrayList<ModeListEntry, 3>()); FixedArrayList<ModeListEntry, 3>());
auto COM_TABLE_RX_AND_TX_DEFAULT_RATE_TRANS_1 =
std::make_pair(static_cast<uint32_t>(::com::Submode::RX_AND_TX_DEFAULT_DATARATE << 24) | 3,
FixedArrayList<ModeListEntry, 3>());
namespace { namespace {

View File

@ -1,8 +1,8 @@
#ifndef MISSION_SYSTEM_TREE_COMMODETREE_H_ #ifndef MISSION_SYSTEM_TREE_COMMODETREE_H_
#define MISSION_SYSTEM_TREE_COMMODETREE_H_ #define MISSION_SYSTEM_TREE_COMMODETREE_H_
#include <mission/system/objects/ComSubsystem.h>
#include <fsfw/devicehandlers/DeviceHandlerIF.h> #include <fsfw/devicehandlers/DeviceHandlerIF.h>
#include <mission/system/objects/ComSubsystem.h>
namespace satsystem { namespace satsystem {

View File

@ -3,10 +3,11 @@
#include <fsfw/devicehandlers/DeviceHandlerIF.h> #include <fsfw/devicehandlers/DeviceHandlerIF.h>
#include <fsfw/subsystem/Subsystem.h> #include <fsfw/subsystem/Subsystem.h>
#include <mission/acsDefs.h> #include <mission/acsDefs.h>
#include "mission/comDefs.h"
#include "acsModeTree.h" #include "acsModeTree.h"
#include "comModeTree.h" #include "comModeTree.h"
#include "eive/objects.h" #include "eive/objects.h"
#include "mission/comDefs.h"
#include "payloadModeTree.h" #include "payloadModeTree.h"
#include "tcsModeTree.h" #include "tcsModeTree.h"
#include "util.h" #include "util.h"

View File

@ -21,7 +21,7 @@ ReturnValue_t CfdpTmFunnel::performOperation(uint8_t) {
break; break;
} }
count++; count++;
if(count == 500) { if (count == 500) {
sif::error << "CfdpTmFunnel: Possible message storm detected" << std::endl; sif::error << "CfdpTmFunnel: Possible message storm detected" << std::endl;
break; break;
} }

View File

@ -21,7 +21,7 @@ ReturnValue_t PusTmFunnel::performOperation(uint8_t) {
break; break;
} }
count++; count++;
if(count == 500) { if (count == 500) {
sif::error << "PusTmFunnel: Possible message storm detected" << std::endl; sif::error << "PusTmFunnel: Possible message storm detected" << std::endl;
break; break;
} }

View File

@ -50,7 +50,7 @@ ReturnValue_t VirtualChannel::performOperation() {
} }
count++; count++;
if(count == 500) { if (count == 500) {
sif::error << "VirtualChannel: Possible message storm detected" << std::endl; sif::error << "VirtualChannel: Possible message storm detected" << std::endl;
break; break;
} }