COM error event

This commit is contained in:
Robin Müller 2023-07-13 21:09:27 +02:00
parent 7870a2015e
commit 9a451e3d5f
Signed by: muellerr
GPG Key ID: A649FB78196E3849
14 changed files with 48 additions and 14 deletions

View File

@ -1,7 +1,7 @@
/** /**
* @brief Auto-generated event translation file. Contains 299 translations. * @brief Auto-generated event translation file. Contains 300 translations.
* @details * @details
* Generated on: 2023-07-07 12:06:06 * Generated on: 2023-07-13 21:09:02
*/ */
#include "translateEvents.h" #include "translateEvents.h"
@ -139,6 +139,7 @@ const char *ERROR_STATE_STRING = "ERROR_STATE";
const char *RESET_OCCURED_STRING = "RESET_OCCURED"; const char *RESET_OCCURED_STRING = "RESET_OCCURED";
const char *BOOTING_FIRMWARE_FAILED_EVENT_STRING = "BOOTING_FIRMWARE_FAILED_EVENT"; const char *BOOTING_FIRMWARE_FAILED_EVENT_STRING = "BOOTING_FIRMWARE_FAILED_EVENT";
const char *BOOTING_BOOTLOADER_FAILED_EVENT_STRING = "BOOTING_BOOTLOADER_FAILED_EVENT"; const char *BOOTING_BOOTLOADER_FAILED_EVENT_STRING = "BOOTING_BOOTLOADER_FAILED_EVENT";
const char *COM_ERROR_REPLY_RECEIVED_STRING = "COM_ERROR_REPLY_RECEIVED";
const char *SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING = "SUPV_MEMORY_READ_RPT_CRC_FAILURE"; const char *SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING = "SUPV_MEMORY_READ_RPT_CRC_FAILURE";
const char *SUPV_UNKNOWN_TM_STRING = "SUPV_UNKNOWN_TM"; const char *SUPV_UNKNOWN_TM_STRING = "SUPV_UNKNOWN_TM";
const char *SUPV_UNINIMPLEMENTED_TM_STRING = "SUPV_UNINIMPLEMENTED_TM"; const char *SUPV_UNINIMPLEMENTED_TM_STRING = "SUPV_UNINIMPLEMENTED_TM";
@ -575,6 +576,8 @@ const char *translateEvents(Event event) {
return BOOTING_FIRMWARE_FAILED_EVENT_STRING; return BOOTING_FIRMWARE_FAILED_EVENT_STRING;
case (11902): case (11902):
return BOOTING_BOOTLOADER_FAILED_EVENT_STRING; return BOOTING_BOOTLOADER_FAILED_EVENT_STRING;
case (11903):
return COM_ERROR_REPLY_RECEIVED_STRING;
case (12001): case (12001):
return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING; return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING;
case (12002): case (12002):

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file. * @brief Auto-generated object translation file.
* @details * @details
* Contains 171 translations. * Contains 171 translations.
* Generated on: 2023-07-07 12:06:06 * Generated on: 2023-07-13 21:09:02
*/ */
#include "translateObjects.h" #include "translateObjects.h"

View File

@ -133,6 +133,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
11802;0x2e1a;RESET_OCCURED;LOW;No description;mission/acs/rwHelpers.h 11802;0x2e1a;RESET_OCCURED;LOW;No description;mission/acs/rwHelpers.h
11901;0x2e7d;BOOTING_FIRMWARE_FAILED_EVENT;LOW;Failed to boot firmware;mission/acs/str/StarTrackerHandler.h 11901;0x2e7d;BOOTING_FIRMWARE_FAILED_EVENT;LOW;Failed to boot firmware;mission/acs/str/StarTrackerHandler.h
11902;0x2e7e;BOOTING_BOOTLOADER_FAILED_EVENT;LOW;Failed to boot star tracker into bootloader mode;mission/acs/str/StarTrackerHandler.h 11902;0x2e7e;BOOTING_BOOTLOADER_FAILED_EVENT;LOW;Failed to boot star tracker into bootloader mode;mission/acs/str/StarTrackerHandler.h
11903;0x2e7f;COM_ERROR_REPLY_RECEIVED;LOW;Received COM error. P1: Communication Error ID (datasheet p32);mission/acs/str/StarTrackerHandler.h
12001;0x2ee1;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;linux/payload/PlocSupervisorHandler.h 12001;0x2ee1;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;linux/payload/PlocSupervisorHandler.h
12002;0x2ee2;SUPV_UNKNOWN_TM;LOW;Unhandled event. P1: APID, P2: Service ID;linux/payload/PlocSupervisorHandler.h 12002;0x2ee2;SUPV_UNKNOWN_TM;LOW;Unhandled event. P1: APID, P2: Service ID;linux/payload/PlocSupervisorHandler.h
12003;0x2ee3;SUPV_UNINIMPLEMENTED_TM;LOW;No description;linux/payload/PlocSupervisorHandler.h 12003;0x2ee3;SUPV_UNINIMPLEMENTED_TM;LOW;No description;linux/payload/PlocSupervisorHandler.h

1 Event ID (dec) Event ID (hex) Name Severity Description File Path
133 11802 0x2e1a RESET_OCCURED LOW No description mission/acs/rwHelpers.h
134 11901 0x2e7d BOOTING_FIRMWARE_FAILED_EVENT LOW Failed to boot firmware mission/acs/str/StarTrackerHandler.h
135 11902 0x2e7e BOOTING_BOOTLOADER_FAILED_EVENT LOW Failed to boot star tracker into bootloader mode mission/acs/str/StarTrackerHandler.h
136 11903 0x2e7f COM_ERROR_REPLY_RECEIVED LOW Received COM error. P1: Communication Error ID (datasheet p32) mission/acs/str/StarTrackerHandler.h
137 12001 0x2ee1 SUPV_MEMORY_READ_RPT_CRC_FAILURE LOW PLOC supervisor crc failure in telemetry packet linux/payload/PlocSupervisorHandler.h
138 12002 0x2ee2 SUPV_UNKNOWN_TM LOW Unhandled event. P1: APID, P2: Service ID linux/payload/PlocSupervisorHandler.h
139 12003 0x2ee3 SUPV_UNINIMPLEMENTED_TM LOW No description linux/payload/PlocSupervisorHandler.h

View File

@ -133,6 +133,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
11802;0x2e1a;RESET_OCCURED;LOW;No description;mission/acs/rwHelpers.h 11802;0x2e1a;RESET_OCCURED;LOW;No description;mission/acs/rwHelpers.h
11901;0x2e7d;BOOTING_FIRMWARE_FAILED_EVENT;LOW;Failed to boot firmware;mission/acs/str/StarTrackerHandler.h 11901;0x2e7d;BOOTING_FIRMWARE_FAILED_EVENT;LOW;Failed to boot firmware;mission/acs/str/StarTrackerHandler.h
11902;0x2e7e;BOOTING_BOOTLOADER_FAILED_EVENT;LOW;Failed to boot star tracker into bootloader mode;mission/acs/str/StarTrackerHandler.h 11902;0x2e7e;BOOTING_BOOTLOADER_FAILED_EVENT;LOW;Failed to boot star tracker into bootloader mode;mission/acs/str/StarTrackerHandler.h
11903;0x2e7f;COM_ERROR_REPLY_RECEIVED;LOW;Received COM error. P1: Communication Error ID (datasheet p32);mission/acs/str/StarTrackerHandler.h
12001;0x2ee1;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;linux/payload/PlocSupervisorHandler.h 12001;0x2ee1;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;linux/payload/PlocSupervisorHandler.h
12002;0x2ee2;SUPV_UNKNOWN_TM;LOW;Unhandled event. P1: APID, P2: Service ID;linux/payload/PlocSupervisorHandler.h 12002;0x2ee2;SUPV_UNKNOWN_TM;LOW;Unhandled event. P1: APID, P2: Service ID;linux/payload/PlocSupervisorHandler.h
12003;0x2ee3;SUPV_UNINIMPLEMENTED_TM;LOW;No description;linux/payload/PlocSupervisorHandler.h 12003;0x2ee3;SUPV_UNINIMPLEMENTED_TM;LOW;No description;linux/payload/PlocSupervisorHandler.h

1 Event ID (dec) Event ID (hex) Name Severity Description File Path
133 11802 0x2e1a RESET_OCCURED LOW No description mission/acs/rwHelpers.h
134 11901 0x2e7d BOOTING_FIRMWARE_FAILED_EVENT LOW Failed to boot firmware mission/acs/str/StarTrackerHandler.h
135 11902 0x2e7e BOOTING_BOOTLOADER_FAILED_EVENT LOW Failed to boot star tracker into bootloader mode mission/acs/str/StarTrackerHandler.h
136 11903 0x2e7f COM_ERROR_REPLY_RECEIVED LOW Received COM error. P1: Communication Error ID (datasheet p32) mission/acs/str/StarTrackerHandler.h
137 12001 0x2ee1 SUPV_MEMORY_READ_RPT_CRC_FAILURE LOW PLOC supervisor crc failure in telemetry packet linux/payload/PlocSupervisorHandler.h
138 12002 0x2ee2 SUPV_UNKNOWN_TM LOW Unhandled event. P1: APID, P2: Service ID linux/payload/PlocSupervisorHandler.h
139 12003 0x2ee3 SUPV_UNINIMPLEMENTED_TM LOW No description linux/payload/PlocSupervisorHandler.h

View File

@ -1,7 +1,7 @@
/** /**
* @brief Auto-generated event translation file. Contains 299 translations. * @brief Auto-generated event translation file. Contains 300 translations.
* @details * @details
* Generated on: 2023-07-07 12:06:06 * Generated on: 2023-07-13 21:09:02
*/ */
#include "translateEvents.h" #include "translateEvents.h"
@ -139,6 +139,7 @@ const char *ERROR_STATE_STRING = "ERROR_STATE";
const char *RESET_OCCURED_STRING = "RESET_OCCURED"; const char *RESET_OCCURED_STRING = "RESET_OCCURED";
const char *BOOTING_FIRMWARE_FAILED_EVENT_STRING = "BOOTING_FIRMWARE_FAILED_EVENT"; const char *BOOTING_FIRMWARE_FAILED_EVENT_STRING = "BOOTING_FIRMWARE_FAILED_EVENT";
const char *BOOTING_BOOTLOADER_FAILED_EVENT_STRING = "BOOTING_BOOTLOADER_FAILED_EVENT"; const char *BOOTING_BOOTLOADER_FAILED_EVENT_STRING = "BOOTING_BOOTLOADER_FAILED_EVENT";
const char *COM_ERROR_REPLY_RECEIVED_STRING = "COM_ERROR_REPLY_RECEIVED";
const char *SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING = "SUPV_MEMORY_READ_RPT_CRC_FAILURE"; const char *SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING = "SUPV_MEMORY_READ_RPT_CRC_FAILURE";
const char *SUPV_UNKNOWN_TM_STRING = "SUPV_UNKNOWN_TM"; const char *SUPV_UNKNOWN_TM_STRING = "SUPV_UNKNOWN_TM";
const char *SUPV_UNINIMPLEMENTED_TM_STRING = "SUPV_UNINIMPLEMENTED_TM"; const char *SUPV_UNINIMPLEMENTED_TM_STRING = "SUPV_UNINIMPLEMENTED_TM";
@ -575,6 +576,8 @@ const char *translateEvents(Event event) {
return BOOTING_FIRMWARE_FAILED_EVENT_STRING; return BOOTING_FIRMWARE_FAILED_EVENT_STRING;
case (11902): case (11902):
return BOOTING_BOOTLOADER_FAILED_EVENT_STRING; return BOOTING_BOOTLOADER_FAILED_EVENT_STRING;
case (11903):
return COM_ERROR_REPLY_RECEIVED_STRING;
case (12001): case (12001):
return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING; return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING;
case (12002): case (12002):

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file. * @brief Auto-generated object translation file.
* @details * @details
* Contains 175 translations. * Contains 175 translations.
* Generated on: 2023-07-07 12:06:06 * Generated on: 2023-07-13 21:09:02
*/ */
#include "translateObjects.h" #include "translateObjects.h"

View File

@ -24,7 +24,7 @@ extern "C" {
using namespace returnvalue; using namespace returnvalue;
static constexpr bool PACKET_WIRETAPPING = false; static constexpr bool PACKET_WIRETAPPING = true;
StrComHandler::StrComHandler(object_id_t objectId) : SystemObject(objectId) { StrComHandler::StrComHandler(object_id_t objectId) : SystemObject(objectId) {
lock = MutexFactory::instance()->createMutex(); lock = MutexFactory::instance()->createMutex();

View File

@ -1,7 +1,7 @@
/** /**
* @brief Auto-generated event translation file. Contains 299 translations. * @brief Auto-generated event translation file. Contains 300 translations.
* @details * @details
* Generated on: 2023-07-07 12:06:06 * Generated on: 2023-07-13 21:09:02
*/ */
#include "translateEvents.h" #include "translateEvents.h"
@ -139,6 +139,7 @@ const char *ERROR_STATE_STRING = "ERROR_STATE";
const char *RESET_OCCURED_STRING = "RESET_OCCURED"; const char *RESET_OCCURED_STRING = "RESET_OCCURED";
const char *BOOTING_FIRMWARE_FAILED_EVENT_STRING = "BOOTING_FIRMWARE_FAILED_EVENT"; const char *BOOTING_FIRMWARE_FAILED_EVENT_STRING = "BOOTING_FIRMWARE_FAILED_EVENT";
const char *BOOTING_BOOTLOADER_FAILED_EVENT_STRING = "BOOTING_BOOTLOADER_FAILED_EVENT"; const char *BOOTING_BOOTLOADER_FAILED_EVENT_STRING = "BOOTING_BOOTLOADER_FAILED_EVENT";
const char *COM_ERROR_REPLY_RECEIVED_STRING = "COM_ERROR_REPLY_RECEIVED";
const char *SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING = "SUPV_MEMORY_READ_RPT_CRC_FAILURE"; const char *SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING = "SUPV_MEMORY_READ_RPT_CRC_FAILURE";
const char *SUPV_UNKNOWN_TM_STRING = "SUPV_UNKNOWN_TM"; const char *SUPV_UNKNOWN_TM_STRING = "SUPV_UNKNOWN_TM";
const char *SUPV_UNINIMPLEMENTED_TM_STRING = "SUPV_UNINIMPLEMENTED_TM"; const char *SUPV_UNINIMPLEMENTED_TM_STRING = "SUPV_UNINIMPLEMENTED_TM";
@ -575,6 +576,8 @@ const char *translateEvents(Event event) {
return BOOTING_FIRMWARE_FAILED_EVENT_STRING; return BOOTING_FIRMWARE_FAILED_EVENT_STRING;
case (11902): case (11902):
return BOOTING_BOOTLOADER_FAILED_EVENT_STRING; return BOOTING_BOOTLOADER_FAILED_EVENT_STRING;
case (11903):
return COM_ERROR_REPLY_RECEIVED_STRING;
case (12001): case (12001):
return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING; return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING;
case (12002): case (12002):

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file. * @brief Auto-generated object translation file.
* @details * @details
* Contains 175 translations. * Contains 175 translations.
* Generated on: 2023-07-07 12:06:06 * Generated on: 2023-07-13 21:09:02
*/ */
#include "translateObjects.h" #include "translateObjects.h"

View File

@ -880,13 +880,20 @@ ReturnValue_t StarTrackerHandler::scanForReply(const uint8_t* start, size_t rema
*foundLen = remainingSize; *foundLen = remainingSize;
return returnvalue::OK; return returnvalue::OK;
} }
if (remainingSize < 3) { if (remainingSize < 2) {
sif::error << "StarTrackerHandler: Reply packet with length less than 3 is invalid" sif::error << "StarTrackerHandler: Reply packet with length " << remainingSize
<< " less than "
"2 is invalid"
<< std::endl; << std::endl;
return returnvalue::FAILED; return returnvalue::FAILED;
} }
switch (startracker::getReplyFrameType(start)) { switch (startracker::getReplyFrameType(start)) {
case TMTC_COMM_ERROR: {
*foundLen = remainingSize;
triggerEvent(COM_ERROR_REPLY_RECEIVED, start[1]);
break;
}
case TMTC_ACTIONREPLY: { case TMTC_ACTIONREPLY: {
*foundLen = remainingSize; *foundLen = remainingSize;
return scanForActionReply(startracker::getId(start), foundId); return scanForActionReply(startracker::getId(start), foundId);

View File

@ -144,6 +144,8 @@ class StarTrackerHandler : public DeviceHandlerBase {
static const Event BOOTING_FIRMWARE_FAILED_EVENT = MAKE_EVENT(1, severity::LOW); static const Event BOOTING_FIRMWARE_FAILED_EVENT = MAKE_EVENT(1, severity::LOW);
//! [EXPORT] : [COMMENT] Failed to boot star tracker into bootloader mode //! [EXPORT] : [COMMENT] Failed to boot star tracker into bootloader mode
static const Event BOOTING_BOOTLOADER_FAILED_EVENT = MAKE_EVENT(2, severity::LOW); static const Event BOOTING_BOOTLOADER_FAILED_EVENT = MAKE_EVENT(2, severity::LOW);
//! [EXPORT] : [COMMENT] Received COM error. P1: Communication Error ID (datasheet p32)
static constexpr Event COM_ERROR_REPLY_RECEIVED = MAKE_EVENT(3, severity::LOW);
static const uint8_t STATUS_OFFSET = 2; static const uint8_t STATUS_OFFSET = 2;
static const uint8_t PARAMS_OFFSET = 2; static const uint8_t PARAMS_OFFSET = 2;

View File

@ -443,6 +443,21 @@ static const uint32_t secret[16]{
REGION_12_SECRET, REGION_13_SECRET, REGION_14_SECRET, REGION_15_SECRET}; REGION_12_SECRET, REGION_13_SECRET, REGION_14_SECRET, REGION_15_SECRET};
} // namespace region_secrets } // namespace region_secrets
namespace comError {
enum Id {
BAD_CRC = 1,
UNKNOWN_TM_ID = 2,
UNKNOWN_PARAM_ID = 3,
UNKNOWN_ACTION_REQ = 4,
INVALID_TM_SIZE = 5,
INVALID_PARAM_SIZE = 6,
INVALID_ACTION_REQ_SIZE = 7,
FRAME_TOO_SHORT = 8,
INVALID_FRAME_TYPE = 9,
UNKNOWN_ERROR = 10
};
}
enum class FlashSections : uint8_t { enum class FlashSections : uint8_t {
BOOTLOADER_SECTION = 0, BOOTLOADER_SECTION = 0,
MAIN_FIRMWARE_SECTION = 1, MAIN_FIRMWARE_SECTION = 1,

View File

@ -957,6 +957,5 @@ ReturnValue_t AutoThreshold::createCommand(uint8_t* buffer) {
return result; return result;
} }
addfloat(param, buffer + offset); addfloat(param, buffer + offset);
offset += 4;
return returnvalue::OK; return returnvalue::OK;
} }

2
tmtc

@ -1 +1 @@
Subproject commit c6e2e2de49e3d49fed1b5a43a94528c0c4aceafe Subproject commit 380a02ee94b0413744ba82f08397c1f354bd0c0e