few commands implemented for the ploc supervisor

This commit is contained in:
Jakob.Meier
2021-07-13 08:32:14 +02:00
parent 1a88ef7e8a
commit ea2260a61d
27 changed files with 1456 additions and 234 deletions

View File

@ -21,15 +21,17 @@ debugging. */
#define OBSW_ADD_TEST_CODE 1
#define OBSW_ADD_TEST_PST 1
#define OBSW_ADD_GPS 0
#define OBSW_ADD_STAR_TRACKER 0
#define TEST_LIBGPIOD 0
#define TEST_RADIATION_SENSOR_HANDLER 0
#define TEST_SUS_HANDLER 1
#define TEST_SUS_HANDLER 0
#define TEST_PLOC_HANDLER 0
#define TEST_CCSDS_BRIDGE 0
#define PERFORM_PTME_TEST 0
#define ADD_PLOC_SUPERVISOR 1
#define TE0720 0
#define TE0720 1
#define TE0720_HEATER_TEST 0
#define P60DOCK_DEBUG 0
@ -45,7 +47,8 @@ debugging. */
#define DEBUG_RTD 1
#define IMTQ_DEBUG 1
#define RW_DEBUG 0
#define START_TRACKER_DEBUG 1
#define START_TRACKER_DEBUG 0
#define PLOC_MPSOC_DEBUG 1
// Leave at one as the BSP is linux. Used by the ADIS16507 device handler
#define OBSW_ADIS16507_LINUX_COM_IF 1

View File

@ -1,7 +1,7 @@
/**
* @brief Auto-generated event translation file. Contains 92 translations.
* @brief Auto-generated event translation file. Contains 96 translations.
* @details
* Generated on: 2021-06-29 16:20:09
* Generated on: 2021-07-12 15:20:38
*/
#include "translateEvents.h"
@ -97,6 +97,10 @@ const char *SELF_TEST_MTM_RANGE_FAILURE_STRING = "SELF_TEST_MTM_RANGE_FAILURE";
const char *SELF_TEST_COIL_CURRENT_FAILURE_STRING = "SELF_TEST_COIL_CURRENT_FAILURE";
const char *INVALID_ERROR_BYTE_STRING = "INVALID_ERROR_BYTE";
const char *ERROR_STATE_STRING = "ERROR_STATE";
const char *SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING = "SUPV_MEMORY_READ_RPT_CRC_FAILURE";
const char *SUPV_ACK_FAILURE_STRING = "SUPV_ACK_FAILURE";
const char *SUPV_EXE_FAILURE_STRING = "SUPV_EXE_FAILURE";
const char *SUPV_CRC_FAILURE_EVENT_STRING = "SUPV_CRC_FAILURE_EVENT";
const char * translateEvents(Event event) {
switch( (event & 0xffff) ) {
@ -284,6 +288,14 @@ const char * translateEvents(Event event) {
return INVALID_ERROR_BYTE_STRING;
case(11301):
return ERROR_STATE_STRING;
case(11501):
return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING;
case(11502):
return SUPV_ACK_FAILURE_STRING;
case(11503):
return SUPV_EXE_FAILURE_STRING;
case(11504):
return SUPV_CRC_FAILURE_EVENT_STRING;
default:
return "UNKNOWN_EVENT";
}

View File

@ -1,8 +1,8 @@
/**
* @brief Auto-generated object translation file.
* @details
* Contains 100 translations.
* Generated on: 2021-06-29 16:19:57
* Contains 102 translations.
* Generated on: 2021-07-10 16:22:55
*/
#include "translateObjects.h"
@ -10,6 +10,10 @@ const char *P60DOCK_TEST_TASK_STRING = "P60DOCK_TEST_TASK";
const char *CORE_CONTROLLER_STRING = "CORE_CONTROLLER";
const char *ACS_CONTROLLER_STRING = "ACS_CONTROLLER";
const char *THERMAL_CONTROLLER_STRING = "THERMAL_CONTROLLER";
const char *RW1_STRING = "RW1";
const char *RW2_STRING = "RW2";
const char *RW3_STRING = "RW3";
const char *RW4_STRING = "RW4";
const char *MGM_0_LIS3_HANDLER_STRING = "MGM_0_LIS3_HANDLER";
const char *GYRO_0_ADIS_HANDLER_STRING = "GYRO_0_ADIS_HANDLER";
const char *SUS_1_STRING = "SUS_1";
@ -31,20 +35,18 @@ const char *MGM_2_LIS3_HANDLER_STRING = "MGM_2_LIS3_HANDLER";
const char *GYRO_2_ADIS_HANDLER_STRING = "GYRO_2_ADIS_HANDLER";
const char *MGM_3_RM3100_HANDLER_STRING = "MGM_3_RM3100_HANDLER";
const char *GYRO_3_L3G_HANDLER_STRING = "GYRO_3_L3G_HANDLER";
const char *START_TRACKER_STRING = "START_TRACKER";
const char *GPS0_HANDLER_STRING = "GPS0_HANDLER";
const char *GPS1_HANDLER_STRING = "GPS1_HANDLER";
const char *IMTQ_HANDLER_STRING = "IMTQ_HANDLER";
const char *PCDU_HANDLER_STRING = "PCDU_HANDLER";
const char *RW1_STRING = "RW1";
const char *RW2_STRING = "RW2";
const char *RW3_STRING = "RW3";
const char *RW4_STRING = "RW4";
const char *P60DOCK_HANDLER_STRING = "P60DOCK_HANDLER";
const char *PDU1_HANDLER_STRING = "PDU1_HANDLER";
const char *PDU2_HANDLER_STRING = "PDU2_HANDLER";
const char *ACU_HANDLER_STRING = "ACU_HANDLER";
const char *RAD_SENSOR_STRING = "RAD_SENSOR";
const char *PLOC_HANDLER_STRING = "PLOC_HANDLER";
const char *PLOC_MPSOC_HANDLER_STRING = "PLOC_MPSOC_HANDLER";
const char *PLOC_SUPERVISOR_HANDLER_STRING = "PLOC_SUPERVISOR_HANDLER";
const char *SOLAR_ARRAY_DEPL_HANDLER_STRING = "SOLAR_ARRAY_DEPL_HANDLER";
const char *HEATER_HANDLER_STRING = "HEATER_HANDLER";
const char *TMP1075_HANDLER_1_STRING = "TMP1075_HANDLER_1";
@ -117,6 +119,14 @@ const char* translateObject(object_id_t object) {
return ACS_CONTROLLER_STRING;
case 0x43400001:
return THERMAL_CONTROLLER_STRING;
case 0x44120001:
return RW1_STRING;
case 0x44120002:
return RW2_STRING;
case 0x44120003:
return RW3_STRING;
case 0x44120004:
return RW4_STRING;
case 0x44120006:
return MGM_0_LIS3_HANDLER_STRING;
case 0x44120010:
@ -159,6 +169,8 @@ const char* translateObject(object_id_t object) {
return MGM_3_RM3100_HANDLER_STRING;
case 0x44120313:
return GYRO_3_L3G_HANDLER_STRING;
case 0x44130001:
return START_TRACKER_STRING;
case 0x44130045:
return GPS0_HANDLER_STRING;
case 0x44130146:
@ -167,14 +179,6 @@ const char* translateObject(object_id_t object) {
return IMTQ_HANDLER_STRING;
case 0x442000A1:
return PCDU_HANDLER_STRING;
case 0x44210001:
return RW1_STRING;
case 0x44210002:
return RW2_STRING;
case 0x44210003:
return RW3_STRING;
case 0x44210004:
return RW4_STRING;
case 0x44250000:
return P60DOCK_HANDLER_STRING;
case 0x44250001:
@ -186,7 +190,9 @@ const char* translateObject(object_id_t object) {
case 0x443200A5:
return RAD_SENSOR_STRING;
case 0x44330015:
return PLOC_HANDLER_STRING;
return PLOC_MPSOC_HANDLER_STRING;
case 0x44330016:
return PLOC_SUPERVISOR_HANDLER_STRING;
case 0x444100A2:
return SOLAR_ARRAY_DEPL_HANDLER_STRING;
case 0x444100A4:

View File

@ -449,7 +449,7 @@ ReturnValue_t pst::pstUart(FixedTimeslotTaskIF *thisSequence) {
// Length of a communication cycle
uint32_t length = thisSequence->getPeriodMs();
thisSequence->addSlot(objects::PLOC_HANDLER, length * 0,
thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION);
@ -460,7 +460,7 @@ ReturnValue_t pst::pstUart(FixedTimeslotTaskIF *thisSequence) {
DeviceHandlerIF::PERFORM_OPERATION);
#endif
thisSequence->addSlot(objects::PLOC_HANDLER, length * 0.2,
thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0.2,
DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0.2,
DeviceHandlerIF::SEND_WRITE);
@ -471,7 +471,7 @@ ReturnValue_t pst::pstUart(FixedTimeslotTaskIF *thisSequence) {
DeviceHandlerIF::SEND_WRITE);
#endif
thisSequence->addSlot(objects::PLOC_HANDLER, length * 0.4,
thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0.4,
DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0.4,
DeviceHandlerIF::GET_WRITE);
@ -482,7 +482,7 @@ ReturnValue_t pst::pstUart(FixedTimeslotTaskIF *thisSequence) {
DeviceHandlerIF::GET_WRITE);
#endif
thisSequence->addSlot(objects::PLOC_HANDLER, length * 0.6,
thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0.6,
DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0.6,
DeviceHandlerIF::SEND_READ);
@ -493,7 +493,7 @@ ReturnValue_t pst::pstUart(FixedTimeslotTaskIF *thisSequence) {
DeviceHandlerIF::SEND_READ);
#endif
thisSequence->addSlot(objects::PLOC_HANDLER, length * 0.8,
thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0.8,
DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::SYRLINKS_HK_HANDLER, length * 0.8,
DeviceHandlerIF::GET_READ);
@ -504,11 +504,13 @@ ReturnValue_t pst::pstUart(FixedTimeslotTaskIF *thisSequence) {
DeviceHandlerIF::GET_READ);
#endif
#if OBSW_ADD_STAR_TRACKER == 1
thisSequence->addSlot(objects::START_TRACKER, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::START_TRACKER, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::START_TRACKER, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::START_TRACKER, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::START_TRACKER, length * 0.8, DeviceHandlerIF::GET_READ);
#endif
if (thisSequence->checkSequence() != HasReturnvaluesIF::RETURN_OK) {
sif::error << "UART PST initialization failed" << std::endl;
@ -676,16 +678,16 @@ ReturnValue_t pst::pstTest(FixedTimeslotTaskIF* thisSequence) {
return HasReturnvaluesIF::RETURN_OK;
}
#if TE7020 == 1
#if TE0720 == 1
ReturnValue_t pst::pollingSequenceTE0720(FixedTimeslotTaskIF *thisSequence) {
uint32_t length = thisSequence->getPeriodMs();
#if TEST_PLOC_HANDLER == 1
thisSequence->addSlot(objects::PLOC_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::PLOC_HANDLER, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::PLOC_HANDLER, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::PLOC_HANDLER, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::PLOC_HANDLER, length * 0.8, DeviceHandlerIF::GET_READ);
#if TEST_PLOC_MPSOC_HANDLER == 1
thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0.6, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0.8, DeviceHandlerIF::GET_READ);
#endif
#if TEST_RADIATION_SENSOR_HANDLER == 1
@ -719,6 +721,14 @@ ReturnValue_t pst::pollingSequenceTE0720(FixedTimeslotTaskIF *thisSequence) {
thisSequence->addSlot(objects::SUS_1, length * 0.915, DeviceHandlerIF::GET_READ);
#endif
#if ADD_PLOC_SUPERVISOR == 1
thisSequence->addSlot(objects::PLOC_SUPERVISOR_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
thisSequence->addSlot(objects::PLOC_SUPERVISOR_HANDLER, length * 0.2, DeviceHandlerIF::SEND_WRITE);
thisSequence->addSlot(objects::PLOC_SUPERVISOR_HANDLER, length * 0.4, DeviceHandlerIF::GET_WRITE);
thisSequence->addSlot(objects::PLOC_SUPERVISOR_HANDLER, length * 0.7, DeviceHandlerIF::SEND_READ);
thisSequence->addSlot(objects::PLOC_SUPERVISOR_HANDLER, length * 0.8, DeviceHandlerIF::GET_READ);
#endif
if (thisSequence->checkSequence() != HasReturnvaluesIF::RETURN_OK) {
sif::error << "Initialization of TE0720 PST failed" << std::endl;
return HasReturnvaluesIF::RETURN_FAILED;

View File

@ -55,7 +55,7 @@ ReturnValue_t pstI2c(FixedTimeslotTaskIF* thisSequence);
*/
ReturnValue_t pstTest(FixedTimeslotTaskIF* thisSequence);
#if TE7020 == 1
#if TE0720 == 1
/**
* @brief This polling sequence will be created when the software is compiled for the TE0720.
*/