fixed merge conflicts
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:
@ -1,6 +1,5 @@
|
||||
#include "GenericFactory.h"
|
||||
|
||||
#include <OBSWConfig.h>
|
||||
#include <fsfw/events/EventManager.h>
|
||||
#include <fsfw/health/HealthTable.h>
|
||||
#include <fsfw/internalerror/InternalErrorReporter.h>
|
||||
@ -18,10 +17,12 @@
|
||||
#include <fsfw/tcdistribution/PUSDistributor.h>
|
||||
#include <fsfw/timemanager/TimeStamper.h>
|
||||
#include <mission/utility/TmFunnel.h>
|
||||
#include <tmtc/apid.h>
|
||||
#include <tmtc/pusIds.h>
|
||||
|
||||
#include "OBSWConfig.h"
|
||||
#include "eive/definitions.h"
|
||||
#include "objects/systemObjectList.h"
|
||||
#include "tmtc/apid.h"
|
||||
#include "tmtc/pusIds.h"
|
||||
|
||||
#if OBSW_ADD_TCPIP_BRIDGE == 1
|
||||
#if OBSW_USE_TMTC_TCP_BRIDGE == 0
|
||||
@ -39,6 +40,10 @@
|
||||
#include <test/testtasks/TestTask.h>
|
||||
#endif
|
||||
|
||||
#ifndef OBSW_TM_TO_PTME
|
||||
#define OBSW_TM_TO_PTME 0
|
||||
#endif
|
||||
|
||||
void ObjectFactory::produceGenericObjects() {
|
||||
// Framework objects
|
||||
new EventManager(objects::EVENT_MANAGER);
|
||||
@ -68,8 +73,12 @@ void ObjectFactory::produceGenericObjects() {
|
||||
new PUSDistributor(apid::EIVE_OBSW, objects::PUS_PACKET_DISTRIBUTOR,
|
||||
objects::CCSDS_PACKET_DISTRIBUTOR);
|
||||
|
||||
uint8_t vc = 0;
|
||||
#if OBSW_TM_TO_PTME == 1
|
||||
vc = config::LIVE_TM;
|
||||
#endif
|
||||
// Every TM packet goes through this funnel
|
||||
new TmFunnel(objects::TM_FUNNEL, 50);
|
||||
new TmFunnel(objects::TM_FUNNEL, 50, vc);
|
||||
|
||||
// PUS service stack
|
||||
new Service1TelecommandVerification(objects::PUS_SERVICE_1_VERIFICATION, apid::EIVE_OBSW,
|
||||
@ -87,7 +96,7 @@ void ObjectFactory::produceGenericObjects() {
|
||||
new Service20ParameterManagement(objects::PUS_SERVICE_20_PARAMETERS, apid::EIVE_OBSW,
|
||||
pus::PUS_SERVICE_20);
|
||||
new CService200ModeCommanding(objects::PUS_SERVICE_200_MODE_MGMT, apid::EIVE_OBSW,
|
||||
pus::PUS_SERVICE_200);
|
||||
pus::PUS_SERVICE_200, 8, config::LONGEST_MODE_TIMEOUT_SECONDS);
|
||||
|
||||
#if OBSW_ADD_TCPIP_BRIDGE == 1
|
||||
#if OBSW_USE_TMTC_TCP_BRIDGE == 0
|
||||
|
@ -403,9 +403,9 @@ ReturnValue_t Max31865PT1000Handler::interpretDeviceReply(DeviceCommandId_t id,
|
||||
#if OBSW_VERBOSE_LEVEL >= 1
|
||||
if (debugDivider->checkAndIncrement()) {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::info << "Max31865: Object ID: " << std::hex << this->getObjectId()
|
||||
<< ": Measured resistance is " << rtdValue << " Ohms." << std::endl;
|
||||
sif::info << "Approximated temperature is " << approxTemp << " C" << std::endl;
|
||||
sif::info << "Max31865: ObjID " << std::hex << this->getObjectId() << " | RTD " << std::dec
|
||||
<< static_cast<int>(deviceIdx) << ": R[Ohm] " << rtdValue
|
||||
<< " Ohms | Approx T[C]: " << approxTemp << std::endl;
|
||||
#else
|
||||
sif::printInfo("Max31685: Measured resistance is %f Ohms\n", rtdValue);
|
||||
sif::printInfo("Approximated temperature is %f C\n", approxTemp);
|
||||
@ -529,3 +529,5 @@ void Max31865PT1000Handler::modeChanged() {
|
||||
internalState = InternalState::NONE;
|
||||
}
|
||||
}
|
||||
|
||||
void Max31865PT1000Handler::setDeviceIdx(uint8_t idx) { deviceIdx = idx; }
|
||||
|
@ -46,6 +46,8 @@ class Max31865PT1000Handler : public DeviceHandlerBase {
|
||||
static constexpr uint8_t DEFAULT_CONFIG = 0b11000001;
|
||||
|
||||
void setInstantNormal(bool instantNormal);
|
||||
void setDeviceIdx(uint8_t idx);
|
||||
|
||||
/**
|
||||
* Expected temperature range is -100 C and 100 C.
|
||||
* If there are temperatures beyond this range there must be a fault.
|
||||
@ -105,6 +107,7 @@ class Max31865PT1000Handler : public DeviceHandlerBase {
|
||||
bool resetFaultBit = false;
|
||||
dur_millis_t startTime = 0;
|
||||
uint8_t faultByte = 0;
|
||||
uint8_t deviceIdx = 0;
|
||||
std::array<uint8_t, 3> commandBuffer{0};
|
||||
|
||||
Max31865Definitions::Max31865Set sensorDataset;
|
||||
|
@ -14,8 +14,7 @@ struct TcsBoardHelper {
|
||||
class TcsBoardAssembly : public AssemblyBase, public ConfirmsFailuresIF {
|
||||
public:
|
||||
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::TCS_BOARD_ASS;
|
||||
static constexpr Event CHILDREN_LOST_MODE =
|
||||
event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM);
|
||||
static constexpr Event CHILDREN_LOST_MODE = event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM);
|
||||
|
||||
TcsBoardAssembly(object_id_t objectId, object_id_t parentId, PowerSwitchIF* pwrSwitcher,
|
||||
power::Switch_t switcher, TcsBoardHelper helper);
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
CCSDSHandler::CCSDSHandler(object_id_t objectId, object_id_t ptmeId, object_id_t tcDestination,
|
||||
PtmeConfig* ptmeConfig, GpioIF* gpioIF, gpioId_t enTxClock,
|
||||
gpioId_t enTxData)
|
||||
gpioId_t enTxData, uint32_t transmitterTimeout)
|
||||
: SystemObject(objectId),
|
||||
ptmeId(ptmeId),
|
||||
tcDestination(tcDestination),
|
||||
@ -21,7 +21,8 @@ CCSDSHandler::CCSDSHandler(object_id_t objectId, object_id_t ptmeId, object_id_t
|
||||
ptmeConfig(ptmeConfig),
|
||||
gpioIF(gpioIF),
|
||||
enTxClock(enTxClock),
|
||||
enTxData(enTxData) {
|
||||
enTxData(enTxData),
|
||||
TRANSMITTER_TIMEOUT(transmitterTimeout) {
|
||||
commandQueue = QueueFactory::instance()->createMessageQueue(QUEUE_SIZE);
|
||||
auto mqArgs = MqArgs(objectId, static_cast<void*>(this));
|
||||
eventQueue =
|
||||
|
@ -51,7 +51,8 @@ class CCSDSHandler : public SystemObject,
|
||||
* @param enTxData GPIO ID of RS485 tx data enable
|
||||
*/
|
||||
CCSDSHandler(object_id_t objectId, object_id_t ptmeId, object_id_t tcDestination,
|
||||
PtmeConfig* ptmeConfig, GpioIF* gpioIF, gpioId_t enTxClock, gpioId_t enTxData);
|
||||
PtmeConfig* ptmeConfig, GpioIF* gpioIF, gpioId_t enTxClock, gpioId_t enTxData,
|
||||
uint32_t transmitterTimeout = 900000);
|
||||
|
||||
~CCSDSHandler();
|
||||
|
||||
@ -104,14 +105,6 @@ class CCSDSHandler : public SystemObject,
|
||||
//! [EXPORT] : [COMMENT] Received action message with unknown action id
|
||||
static const ReturnValue_t COMMAND_NOT_IMPLEMENTED = MAKE_RETURN_CODE(0xA0);
|
||||
|
||||
#if OBSW_ENABLE_SYRLINKS_TRANSMIT_TIMEOUT == 1
|
||||
// syrlinks must not be transmitting more than 15 minutes (according to datasheet)
|
||||
static const uint32_t TRANSMITTER_TIMEOUT = 900000; // 900000 ms = 15 min
|
||||
#else
|
||||
// Set to high value when not sending via syrlinks
|
||||
static const uint32_t TRANSMITTER_TIMEOUT = 86400000; // 1 day
|
||||
#endif /* OBSW_SYRLINKS_DOWNLINK == 0 */
|
||||
|
||||
static const bool UP = true;
|
||||
static const bool DOWN = false;
|
||||
|
||||
@ -140,6 +133,10 @@ class CCSDSHandler : public SystemObject,
|
||||
gpioId_t enTxClock = gpio::NO_GPIO;
|
||||
gpioId_t enTxData = gpio::NO_GPIO;
|
||||
|
||||
// syrlinks must not be transmitting more than 15 minutes (according to datasheet)
|
||||
// Value can be configured via CTOR argument to allow test setups
|
||||
const uint32_t TRANSMITTER_TIMEOUT = 900000; // 900000 ms = 15 min
|
||||
|
||||
// Countdown to disable transmitter after 15 minutes
|
||||
Countdown transmitterCountdown;
|
||||
|
||||
|
@ -9,8 +9,8 @@
|
||||
object_id_t TmFunnel::downlinkDestination = objects::NO_OBJECT;
|
||||
object_id_t TmFunnel::storageDestination = objects::NO_OBJECT;
|
||||
|
||||
TmFunnel::TmFunnel(object_id_t objectId, uint32_t messageDepth)
|
||||
: SystemObject(objectId), messageDepth(messageDepth) {
|
||||
TmFunnel::TmFunnel(object_id_t objectId, uint32_t messageDepth, uint8_t reportReceptionVc)
|
||||
: SystemObject(objectId), messageDepth(messageDepth), reportReceptionVc(reportReceptionVc) {
|
||||
auto mqArgs = MqArgs(objectId, static_cast<void*>(this));
|
||||
tmQueue = QueueFactory::instance()->createMessageQueue(
|
||||
messageDepth, MessageQueueMessage::MAX_MESSAGE_SIZE, &mqArgs);
|
||||
@ -97,12 +97,7 @@ ReturnValue_t TmFunnel::initialize() {
|
||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||
}
|
||||
|
||||
#if OBSW_TM_TO_PTME == 1
|
||||
// Live TM will be sent via the virtual channel 0
|
||||
tmQueue->setDefaultDestination(tmTarget->getReportReceptionQueue(config::LIVE_TM));
|
||||
#else
|
||||
tmQueue->setDefaultDestination(tmTarget->getReportReceptionQueue());
|
||||
#endif /* OBSW_TM_TO_PTME == 1 */
|
||||
tmQueue->setDefaultDestination(tmTarget->getReportReceptionQueue(reportReceptionVc));
|
||||
|
||||
// Storage destination is optional.
|
||||
if (storageDestination == objects::NO_OBJECT) {
|
||||
|
@ -23,7 +23,7 @@ class TmFunnel : public AcceptsTelemetryIF, public ExecutableObjectIF, public Sy
|
||||
friend void(Factory::setStaticFrameworkObjectIds)();
|
||||
|
||||
public:
|
||||
TmFunnel(object_id_t objectId, uint32_t messageDepth = 20);
|
||||
TmFunnel(object_id_t objectId, uint32_t messageDepth = 20, uint8_t reportReceptionVc = 0);
|
||||
virtual ~TmFunnel();
|
||||
|
||||
virtual MessageQueueId_t getReportReceptionQueue(uint8_t virtualChannel = 0) override;
|
||||
@ -35,12 +35,13 @@ class TmFunnel : public AcceptsTelemetryIF, public ExecutableObjectIF, public Sy
|
||||
static object_id_t storageDestination;
|
||||
|
||||
private:
|
||||
uint32_t messageDepth = 0;
|
||||
uint8_t reportReceptionVc = 0;
|
||||
uint16_t sourceSequenceCount = 0;
|
||||
MessageQueueIF* tmQueue = nullptr;
|
||||
MessageQueueIF* storageQueue = nullptr;
|
||||
|
||||
StorageManagerIF* tmStore = nullptr;
|
||||
uint32_t messageDepth = 0;
|
||||
|
||||
ReturnValue_t handlePacket(TmTcMessage* message);
|
||||
};
|
||||
|
Reference in New Issue
Block a user