relax sus fdir

This commit is contained in:
Robin Müller 2023-06-13 07:48:32 +02:00
parent de35764ede
commit 196823b2e0
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
17 changed files with 56 additions and 21 deletions

View File

@ -18,6 +18,14 @@ will consitute of a breaking change warranting a new major release:
# [v4.0.0] to be released
# [v3.1.0] to be released
## Changed
- Relaxed SUS FDIR. The devices have shown to be glitchy in orbit, but still see to deliver
sensible raw values most of the time. Some further testing is necessary, but some changes in the
code should cause the SUS devices to remain healthy for now.
# [v3.0.0] to be released
## Changed

View File

@ -1,7 +1,7 @@
/**
* @brief Auto-generated event translation file. Contains 295 translations.
* @brief Auto-generated event translation file. Contains 296 translations.
* @details
* Generated on: 2023-05-17 17:15:34
* Generated on: 2023-06-13 07:42:34
*/
#include "translateEvents.h"
@ -300,6 +300,7 @@ const char *DUMP_NOK_CANCELLED_STRING = "DUMP_NOK_CANCELLED";
const char *DUMP_MISC_CANCELLED_STRING = "DUMP_MISC_CANCELLED";
const char *DUMP_HK_CANCELLED_STRING = "DUMP_HK_CANCELLED";
const char *DUMP_CFDP_CANCELLED_STRING = "DUMP_CFDP_CANCELLED";
const char *TEMPERATURE_IS_ALL_ONES_STRING = "TEMPERATURE_IS_ALL_ONES";
const char *translateEvents(Event event) {
switch ((event & 0xFFFF)) {
@ -893,6 +894,8 @@ const char *translateEvents(Event event) {
return DUMP_HK_CANCELLED_STRING;
case (14314):
return DUMP_CFDP_CANCELLED_STRING;
case (14500):
return TEMPERATURE_IS_ALL_ONES_STRING;
default:
return "UNKNOWN_EVENT";
}

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file.
* @details
* Contains 171 translations.
* Generated on: 2023-05-17 17:15:34
* Generated on: 2023-06-13 07:42:34
*/
#include "translateObjects.h"

View File

@ -40,6 +40,7 @@ enum : uint8_t {
COM_SUBSYSTEM = 142,
PERSISTENT_TM_STORE = 143,
SYRLINKS_COM = 144,
SUS_HANDLER = 145,
COMMON_SUBSYSTEM_ID_END
};

View File

@ -294,3 +294,4 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
14312;0x37e8;DUMP_MISC_CANCELLED;LOW;P1: Number of dumped packets. P2: Total dumped bytes.;mission/persistentTmStoreDefs.h
14313;0x37e9;DUMP_HK_CANCELLED;LOW;P1: Number of dumped packets. P2: Total dumped bytes.;mission/persistentTmStoreDefs.h
14314;0x37ea;DUMP_CFDP_CANCELLED;LOW;P1: Number of dumped packets. P2: Total dumped bytes.;mission/persistentTmStoreDefs.h
14500;0x38a4;TEMPERATURE_IS_ALL_ONES;LOW;No description;mission/acs/SusHandler.h

1 Event ID (dec) Event ID (hex) Name Severity Description File Path
294 14312 0x37e8 DUMP_MISC_CANCELLED LOW P1: Number of dumped packets. P2: Total dumped bytes. mission/persistentTmStoreDefs.h
295 14313 0x37e9 DUMP_HK_CANCELLED LOW P1: Number of dumped packets. P2: Total dumped bytes. mission/persistentTmStoreDefs.h
296 14314 0x37ea DUMP_CFDP_CANCELLED LOW P1: Number of dumped packets. P2: Total dumped bytes. mission/persistentTmStoreDefs.h
297 14500 0x38a4 TEMPERATURE_IS_ALL_ONES LOW No description mission/acs/SusHandler.h

View File

@ -60,3 +60,4 @@
142;COM_SUBSYSTEM
143;PERSISTENT_TM_STORE
144;SYRLINKS_COM
145;SUS_HANDLER

1 22 MEMORY
60 142 COM_SUBSYSTEM
61 143 PERSISTENT_TM_STORE
62 144 SYRLINKS_COM
63 145 SUS_HANDLER

View File

@ -294,3 +294,4 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
14312;0x37e8;DUMP_MISC_CANCELLED;LOW;P1: Number of dumped packets. P2: Total dumped bytes.;mission/persistentTmStoreDefs.h
14313;0x37e9;DUMP_HK_CANCELLED;LOW;P1: Number of dumped packets. P2: Total dumped bytes.;mission/persistentTmStoreDefs.h
14314;0x37ea;DUMP_CFDP_CANCELLED;LOW;P1: Number of dumped packets. P2: Total dumped bytes.;mission/persistentTmStoreDefs.h
14500;0x38a4;TEMPERATURE_IS_ALL_ONES;LOW;No description;mission/acs/SusHandler.h

1 Event ID (dec) Event ID (hex) Name Severity Description File Path
294 14312 0x37e8 DUMP_MISC_CANCELLED LOW P1: Number of dumped packets. P2: Total dumped bytes. mission/persistentTmStoreDefs.h
295 14313 0x37e9 DUMP_HK_CANCELLED LOW P1: Number of dumped packets. P2: Total dumped bytes. mission/persistentTmStoreDefs.h
296 14314 0x37ea DUMP_CFDP_CANCELLED LOW P1: Number of dumped packets. P2: Total dumped bytes. mission/persistentTmStoreDefs.h
297 14500 0x38a4 TEMPERATURE_IS_ALL_ONES LOW No description mission/acs/SusHandler.h

View File

@ -60,3 +60,4 @@
142;COM_SUBSYSTEM
143;PERSISTENT_TM_STORE
144;SYRLINKS_COM
145;SUS_HANDLER

1 22 MEMORY
60 142 COM_SUBSYSTEM
61 143 PERSISTENT_TM_STORE
62 144 SYRLINKS_COM
63 145 SUS_HANDLER

View File

@ -1,7 +1,7 @@
/**
* @brief Auto-generated event translation file. Contains 295 translations.
* @brief Auto-generated event translation file. Contains 296 translations.
* @details
* Generated on: 2023-05-17 17:15:34
* Generated on: 2023-06-13 07:42:34
*/
#include "translateEvents.h"
@ -300,6 +300,7 @@ const char *DUMP_NOK_CANCELLED_STRING = "DUMP_NOK_CANCELLED";
const char *DUMP_MISC_CANCELLED_STRING = "DUMP_MISC_CANCELLED";
const char *DUMP_HK_CANCELLED_STRING = "DUMP_HK_CANCELLED";
const char *DUMP_CFDP_CANCELLED_STRING = "DUMP_CFDP_CANCELLED";
const char *TEMPERATURE_IS_ALL_ONES_STRING = "TEMPERATURE_IS_ALL_ONES";
const char *translateEvents(Event event) {
switch ((event & 0xFFFF)) {
@ -893,6 +894,8 @@ const char *translateEvents(Event event) {
return DUMP_HK_CANCELLED_STRING;
case (14314):
return DUMP_CFDP_CANCELLED_STRING;
case (14500):
return TEMPERATURE_IS_ALL_ONES_STRING;
default:
return "UNKNOWN_EVENT";
}

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file.
* @details
* Contains 175 translations.
* Generated on: 2023-05-17 17:15:34
* Generated on: 2023-06-13 07:42:34
*/
#include "translateObjects.h"

View File

@ -172,16 +172,12 @@ ReturnValue_t SusPolling::handleSusPolling() {
susDevs[idx].ownReply.tempRaw = ((rawReply[0] & 0x0f) << 8) | rawReply[1];
// Reply is all ones. Sensor is probably off or faulty when
// it should not be.
if (susDevs[idx].ownReply.tempRaw == 0x0fff) {
susDevs[idx].replyResult = returnvalue::FAILED;
} else {
susDevs[idx].replyResult = returnvalue::OK;
for (unsigned chIdx = 0; chIdx < 6; chIdx++) {
susDevs[idx].ownReply.channelsRaw[chIdx] =
(rawReply[chIdx * 2 + 2] << 8) | rawReply[chIdx * 2 + 3];
}
susDevs[idx].ownReply.dataWasSet = true;
susDevs[idx].replyResult = returnvalue::OK;
for (unsigned chIdx = 0; chIdx < 6; chIdx++) {
susDevs[idx].ownReply.channelsRaw[chIdx] =
(rawReply[chIdx * 2 + 2] << 8) | rawReply[chIdx * 2 + 3];
}
susDevs[idx].ownReply.dataWasSet = true;
}
}
return OK;

View File

@ -1,7 +1,7 @@
/**
* @brief Auto-generated event translation file. Contains 295 translations.
* @brief Auto-generated event translation file. Contains 296 translations.
* @details
* Generated on: 2023-05-17 17:15:34
* Generated on: 2023-06-13 07:42:34
*/
#include "translateEvents.h"
@ -300,6 +300,7 @@ const char *DUMP_NOK_CANCELLED_STRING = "DUMP_NOK_CANCELLED";
const char *DUMP_MISC_CANCELLED_STRING = "DUMP_MISC_CANCELLED";
const char *DUMP_HK_CANCELLED_STRING = "DUMP_HK_CANCELLED";
const char *DUMP_CFDP_CANCELLED_STRING = "DUMP_CFDP_CANCELLED";
const char *TEMPERATURE_IS_ALL_ONES_STRING = "TEMPERATURE_IS_ALL_ONES";
const char *translateEvents(Event event) {
switch ((event & 0xFFFF)) {
@ -893,6 +894,8 @@ const char *translateEvents(Event event) {
return DUMP_HK_CANCELLED_STRING;
case (14314):
return DUMP_CFDP_CANCELLED_STRING;
case (14500):
return TEMPERATURE_IS_ALL_ONES_STRING;
default:
return "UNKNOWN_EVENT";
}

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file.
* @details
* Contains 175 translations.
* Generated on: 2023-05-17 17:15:34
* Generated on: 2023-06-13 07:42:34
*/
#include "translateObjects.h"

View File

@ -87,6 +87,21 @@ ReturnValue_t SusHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8
commandExecuted = true;
}
PoolReadGuard pg(&dataset);
// In a previous stricter FDIR variant, this was considered faulty communication and was already
// handled in the communication interface. However, the SUS devices probably glitch in orbit,
// so the FDIR was relaxed. The fault case check previously used now only leads to the dataset
// being marked invalid, shifting more responsibility of determining and setting SUS devices
// faulty to the operator.
// UPDATE: Step1: First determine how often and whether this happens at all
if (reply->tempRaw == 0xfff) {
if (faultyDataEventCd.hasTimedOut()) {
triggerEvent(TEMPERATURE_IS_ALL_ONES);
faultyDataEventCd.resetTimer();
}
// dataset.setValidity(false, true);
// return returnvalue::OK;
}
dataset.setValidity(true, true);
dataset.tempC = max1227::getTemperature(reply->tempRaw);
std::memcpy(dataset.channels.value, reply->channelsRaw, sizeof(reply->channelsRaw));

View File

@ -15,7 +15,9 @@ class SusHandler : public DeviceHandlerBase {
static constexpr DeviceCommandId_t REPLY = 0x77;
static const uint8_t INTERFACE_ID = CLASS_ID::SUS_HANDLER;
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::SUS_BOARD_ASS;
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::SUS_HANDLER;
static constexpr Event TEMPERATURE_IS_ALL_ONES = event::makeEvent(SUBSYSTEM_ID, 0, severity::LOW);
SusHandler(uint32_t objectId, uint8_t susIdx, object_id_t deviceCommunication,
CookieIF *comCookie);
@ -43,6 +45,7 @@ class SusHandler : public DeviceHandlerBase {
LocalPoolDataSetBase *getDataSetHandle(sid_t sid) override;
private:
Countdown faultyDataEventCd = Countdown(60000);
susMax1227::SusDataset dataset;
acs::SusRequest request{};
uint8_t susIdx;

View File

@ -3,7 +3,6 @@
#include <cmath>
class ActuatorCmd {
public:
ActuatorCmd();

2
tmtc

@ -1 +1 @@
Subproject commit 6182369e4f40872c5c26e59be25d5fa79339176a
Subproject commit 00205f0e759970dda3bdd06150bbe85297f9d176