1
0
forked from fsfw/fsfw

Merge branch 'development' into mueller/cmake-init

This commit is contained in:
2020-12-09 10:07:22 +01:00
144 changed files with 6623 additions and 2432 deletions

View File

@ -1,7 +1,7 @@
#include "../monitoring/LimitViolationReporter.h"
#include "../monitoring/MonitoringMessageContent.h"
#include "../objectmanager/ObjectManagerIF.h"
#include "Fuse.h"
#include "../power/Fuse.h"
#include "../serialize/SerialFixedArrayListAdapter.h"
#include "../ipc/QueueFactory.h"
@ -12,7 +12,7 @@ Fuse::Fuse(object_id_t fuseObjectId, uint8_t fuseId, VariableIds ids,
SystemObject(fuseObjectId), oldFuseState(0), fuseId(fuseId), powerIF(
NULL), currentLimit(fuseObjectId, 1, ids.pidCurrent, confirmationCount,
maxCurrent, FUSE_CURRENT_HIGH), powerMonitor(fuseObjectId, 2,
DataPool::poolIdAndPositionToPid(ids.poolIdPower, 0),
GlobalDataPool::poolIdAndPositionToPid(ids.poolIdPower, 0),
confirmationCount), set(), voltage(ids.pidVoltage, &set), current(
ids.pidCurrent, &set), state(ids.pidState, &set), power(
ids.poolIdPower, &set, PoolVariableIF::VAR_READ_WRITE), commandQueue(
@ -109,7 +109,7 @@ size_t Fuse::getSerializedSize() const {
}
ReturnValue_t Fuse::deSerialize(const uint8_t** buffer, size_t* size,
Endianness streamEndianness) {
Endianness streamEndianness) {
ReturnValue_t result = RETURN_FAILED;
for (DeviceList::iterator iter = devices.begin(); iter != devices.end();
iter++) {

View File

@ -1,12 +1,13 @@
#ifndef FUSE_H_
#define FUSE_H_
#include "../datapool/DataSet.h"
#include "../datapool/PIDReader.h"
#include "../datapoolglob/GlobalDataSet.h"
#include "../datapoolglob/GlobalPoolVariable.h"
#include "../datapoolglob/PIDReader.h"
#include "../devicehandlers/HealthDevice.h"
#include "../monitoring/AbsLimitMonitor.h"
#include "PowerComponentIF.h"
#include "PowerSwitchIF.h"
#include "../power/PowerComponentIF.h"
#include "../power/PowerSwitchIF.h"
#include "../returnvalues/HasReturnvaluesIF.h"
#include "../parameters/ParameterHelper.h"
#include <list>
@ -32,10 +33,10 @@ public:
};
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PCDU_1;
static const Event FUSE_CURRENT_HIGH = MAKE_EVENT(1, SEVERITY::LOW); //!< PSS detected that current on a fuse is totally out of bounds.
static const Event FUSE_WENT_OFF = MAKE_EVENT(2, SEVERITY::LOW); //!< PSS detected a fuse that went off.
static const Event POWER_ABOVE_HIGH_LIMIT = MAKE_EVENT(4, SEVERITY::LOW); //!< PSS detected a fuse that violates its limits.
static const Event POWER_BELOW_LOW_LIMIT = MAKE_EVENT(5, SEVERITY::LOW); //!< PSS detected a fuse that violates its limits.
static const Event FUSE_CURRENT_HIGH = MAKE_EVENT(1, severity::LOW); //!< PSS detected that current on a fuse is totally out of bounds.
static const Event FUSE_WENT_OFF = MAKE_EVENT(2, severity::LOW); //!< PSS detected a fuse that went off.
static const Event POWER_ABOVE_HIGH_LIMIT = MAKE_EVENT(4, severity::LOW); //!< PSS detected a fuse that violates its limits.
static const Event POWER_BELOW_LOW_LIMIT = MAKE_EVENT(5, severity::LOW); //!< PSS detected a fuse that violates its limits.
typedef std::list<PowerComponentIF*> DeviceList;
Fuse(object_id_t fuseObjectId, uint8_t fuseId, VariableIds ids,
@ -84,12 +85,12 @@ private:
};
PowerMonitor powerMonitor;
DataSet set;
GlobDataSet set;
PIDReader<float> voltage;
PIDReader<float> current;
PIDReader<uint8_t> state;
db_float_t power;
MessageQueueIF *commandQueue;
gp_float_t power;
MessageQueueIF* commandQueue;
ParameterHelper parameterHelper;
HealthHelper healthHelper;
static object_id_t powerSwitchId;

View File

@ -1,9 +1,9 @@
#ifndef POWERSENSOR_H_
#define POWERSENSOR_H_
#include "../datapool/DataSet.h"
#include "../datapool/PIDReader.h"
#include "../datapool/PoolVariable.h"
#include "../datapoolglob/GlobalDataSet.h"
#include "../datapoolglob/GlobalPoolVariable.h"
#include "../datapoolglob/PIDReader.h"
#include "../devicehandlers/HealthDevice.h"
#include "../monitoring/LimitMonitor.h"
#include "../parameters/ParameterHelper.h"
@ -53,12 +53,12 @@ private:
MessageQueueIF* commandQueue;
ParameterHelper parameterHelper;
HealthHelper healthHelper;
DataSet set;
GlobDataSet set;
//Variables in
PIDReader<float> current;
PIDReader<float> voltage;
//Variables out
db_float_t power;
gp_float_t power;
static const uint8_t MODULE_ID_CURRENT = 1;
static const uint8_t MODULE_ID_VOLTAGE = 2;

View File

@ -32,7 +32,7 @@ public:
static const ReturnValue_t FUSE_ON = MAKE_RETURN_CODE(3);
static const ReturnValue_t FUSE_OFF = MAKE_RETURN_CODE(4);
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PCDU_2;
static const Event SWITCH_WENT_OFF = MAKE_EVENT(0, SEVERITY::LOW); //!< Someone detected that a switch went off which shouldn't. Severity: Low, Parameter1: switchId1, Parameter2: switchId2
static const Event SWITCH_WENT_OFF = MAKE_EVENT(0, severity::LOW); //!< Someone detected that a switch went off which shouldn't. Severity: Low, Parameter1: switchId1, Parameter2: switchId2
/**
* send a direct command to the Power Unit to enable/disable the specified switch.
*