move some config and tweak queue sizes
EIVE/eive-obsw/pipeline/pr-develop This commit looks good Details

This commit is contained in:
Robin Müller 2023-01-23 11:52:46 +01:00
parent 588cc16fc5
commit fe80ff4070
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
8 changed files with 23 additions and 18 deletions

View File

@ -140,6 +140,7 @@ void ObjectFactory::createTmpComponents() {
auto* tmpDevHandler =
new Tmp1075Handler(tmpDevIds[idx].first, objects::I2C_COM_IF, tmpDevCookies[idx]);
tmpDevHandler->connectModeTreeParent(satsystem::tcs::SUBSYSTEM);
// TODO: Remove this after TCS subsystem was added
// These devices are connected to the 3V3 stack and should be powered permanently. Therefore,
// we set them to normal mode immediately here.
tmpDevHandler->setModeNormal();
@ -789,13 +790,13 @@ ReturnValue_t ObjectFactory::createCcsdsComponents(LinuxLibgpioIF* gpioComIF,
objects::CCSDS_HANDLER, objects::PTME, objects::CCSDS_PACKET_DISTRIBUTOR, ptmeConfig,
gpioComIF, gpioIds::RS485_EN_TX_CLOCK, gpioIds::RS485_EN_TX_DATA, TRANSMITTER_TIMEOUT);
VirtualChannel* vc = nullptr;
vc = new VirtualChannel(ccsds::VC0, common::VC0_QUEUE_SIZE, objects::CCSDS_HANDLER);
vc = new VirtualChannel(ccsds::VC0, config::VC0_QUEUE_SIZE, objects::CCSDS_HANDLER);
(*ipCoreHandler)->addVirtualChannel(ccsds::VC0, vc);
vc = new VirtualChannel(ccsds::VC1, common::VC1_QUEUE_SIZE, objects::CCSDS_HANDLER);
vc = new VirtualChannel(ccsds::VC1, config::VC1_QUEUE_SIZE, objects::CCSDS_HANDLER);
(*ipCoreHandler)->addVirtualChannel(ccsds::VC1, vc);
vc = new VirtualChannel(ccsds::VC2, common::VC2_QUEUE_SIZE, objects::CCSDS_HANDLER);
vc = new VirtualChannel(ccsds::VC2, config::VC2_QUEUE_SIZE, objects::CCSDS_HANDLER);
(*ipCoreHandler)->addVirtualChannel(ccsds::VC2, vc);
vc = new VirtualChannel(ccsds::VC3, common::VC3_QUEUE_SIZE, objects::CCSDS_HANDLER);
vc = new VirtualChannel(ccsds::VC3, config::VC3_QUEUE_SIZE, objects::CCSDS_HANDLER);
(*ipCoreHandler)->addVirtualChannel(ccsds::VC3, vc);
GpioCookie* gpioCookiePdec = new GpioCookie;

View File

@ -36,14 +36,6 @@ extern const fsfw::Version OBSW_VERSION;
extern const uint16_t PUS_PACKET_ID;
extern const uint16_t CFDP_PACKET_ID;
static constexpr uint32_t CCSDS_HANDLER_QUEUE_SIZE = 50;
static constexpr uint8_t NUMBER_OF_VIRTUAL_CHANNELS = 4;
static constexpr uint8_t VC0_QUEUE_SIZE = 50;
static constexpr uint8_t VC1_QUEUE_SIZE = 50;
static constexpr uint8_t VC2_QUEUE_SIZE = 50;
static constexpr uint8_t VC3_QUEUE_SIZE = 50;
}
#endif /* COMMON_CONFIG_COMMONCONFIG_H_ */

View File

@ -43,6 +43,13 @@ static constexpr uint32_t LEGACY_SA_DEPL_CHANNEL_ALTERNATION_INTERVAL_SECS = 5;
// Maximum allowed burn time allowed by the software.
static constexpr uint32_t SA_DEPL_MAX_BURN_TIME = 180;
static constexpr uint32_t CCSDS_HANDLER_QUEUE_SIZE = 50;
static constexpr uint8_t NUMBER_OF_VIRTUAL_CHANNELS = 4;
static constexpr uint8_t VC0_QUEUE_SIZE = 80;
static constexpr uint8_t VC1_QUEUE_SIZE = 80;
static constexpr uint8_t VC2_QUEUE_SIZE = 50;
static constexpr uint8_t VC3_QUEUE_SIZE = 50;
} // namespace config
#endif /* COMMON_CONFIG_DEFINITIONS_H_ */

View File

@ -5,6 +5,7 @@
#include "OBSWConfig.h"
#include "PdecConfig.h"
#include "eive/definitions.h"
#include "fsfw/action/ActionHelper.h"
#include "fsfw/action/HasActionsIF.h"
#include "fsfw/objectmanager/SystemObject.h"
@ -120,7 +121,7 @@ class PdecHandler : public SystemObject, public ExecutableObjectIF, public HasAc
//! Invalid BC control command
static const ReturnValue_t INVALID_BC_CC = MAKE_RETURN_CODE(0xAE);
static const uint32_t QUEUE_SIZE = common::CCSDS_HANDLER_QUEUE_SIZE;
static const uint32_t QUEUE_SIZE = config::CCSDS_HANDLER_QUEUE_SIZE;
// Action IDs
static const ActionId_t PRINT_CLCW = 0;

View File

@ -4,6 +4,7 @@
#include <unistd.h>
#include "PtmeConfig.h"
#include "eive/definitions.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
Ptme::Ptme(object_id_t objectId) : SystemObject(objectId) {}
@ -32,7 +33,7 @@ ReturnValue_t Ptme::writeToVc(uint8_t vcId, const uint8_t* data, size_t size) {
}
void Ptme::addVcInterface(VcId_t vcId, VcInterfaceIF* vc) {
if (vcId > common::NUMBER_OF_VIRTUAL_CHANNELS) {
if (vcId > config::NUMBER_OF_VIRTUAL_CHANNELS) {
sif::warning << "Ptme::addVcInterface: Invalid virtual channel ID" << std::endl;
return;
}

View File

@ -122,7 +122,7 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun
new PusDistributor(config::EIVE_PUS_APID, objects::PUS_PACKET_DISTRIBUTOR, ccsdsDistrib);
*cfdpFunnel = new CfdpTmFunnel(objects::CFDP_TM_FUNNEL, config::EIVE_CFDP_APID, *tmStore, 50);
*pusFunnel = new PusTmFunnel(objects::PUS_TM_FUNNEL, *timeStamper, *tmStore, 80);
*pusFunnel = new PusTmFunnel(objects::PUS_TM_FUNNEL, *timeStamper, *tmStore, 100);
#if OBSW_ADD_TCPIP_SERVERS == 1
#if OBSW_ADD_TMTC_UDP_SERVER == 1
(*cfdpFunnel)->addDestination(*udpBridge, 0);

View File

@ -3,6 +3,7 @@
#include <linux/ipcore/PdecHandler.h>
#include <linux/ipcore/PtmeConfig.h>
#include "eive/definitions.h"
#include "fsfw/events/EventManagerIF.h"
#include "fsfw/ipc/QueueFactory.h"
#include "fsfw/objectmanager/ObjectManager.h"
@ -161,7 +162,7 @@ void CcsdsIpCoreHandler::readCommandQueue(void) {
MessageQueueId_t CcsdsIpCoreHandler::getCommandQueue() const { return commandQueue->getId(); }
void CcsdsIpCoreHandler::addVirtualChannel(VcId_t vcId, VirtualChannel* virtualChannel) {
if (vcId > common::NUMBER_OF_VIRTUAL_CHANNELS) {
if (vcId > config::NUMBER_OF_VIRTUAL_CHANNELS) {
sif::warning << "CcsdsHandler::addVirtualChannel: Invalid virtual channel ID" << std::endl;
return;
}
@ -182,7 +183,7 @@ void CcsdsIpCoreHandler::addVirtualChannel(VcId_t vcId, VirtualChannel* virtualC
}
MessageQueueId_t CcsdsIpCoreHandler::getReportReceptionQueue(uint8_t virtualChannel) const {
if (virtualChannel < common::NUMBER_OF_VIRTUAL_CHANNELS) {
if (virtualChannel < config::NUMBER_OF_VIRTUAL_CHANNELS) {
auto iter = virtualChannelMap.find(virtualChannel);
if (iter != virtualChannelMap.end()) {
return iter->second->getReportReceptionQueue();

View File

@ -1,10 +1,12 @@
#ifndef CCSDSHANDLER_H_
#define CCSDSHANDLER_H_
#include <cstdint>
#include <unordered_map>
#include "OBSWConfig.h"
#include "VirtualChannel.h"
#include "eive/definitions.h"
#include "fsfw/action/ActionHelper.h"
#include "fsfw/action/HasActionsIF.h"
#include "fsfw/events/EventMessage.h"
@ -83,7 +85,7 @@ class CcsdsIpCoreHandler : public SystemObject,
static const uint8_t INTERFACE_ID = CLASS_ID::CCSDS_HANDLER;
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PLOC_MPSOC_HANDLER;
static const uint32_t QUEUE_SIZE = common::CCSDS_HANDLER_QUEUE_SIZE;
static const uint32_t QUEUE_SIZE = config::CCSDS_HANDLER_QUEUE_SIZE;
static const ActionId_t SET_LOW_RATE = 0;
static const ActionId_t SET_HIGH_RATE = 1;