Merge remote-tracking branch 'origin/develop' into feature_watchdog_extension
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
commit
7a8816e49a
@ -27,7 +27,16 @@ will consitute of a breaking change warranting a new major release:
|
|||||||
debugging images 2 minutes to start the watchdog without the watch functionality.
|
debugging images 2 minutes to start the watchdog without the watch functionality.
|
||||||
- The SD card prefix is now set earlier inside the `CoreController` constructor
|
- The SD card prefix is now set earlier inside the `CoreController` constructor
|
||||||
- The watchdog handling was moved outside the `CoreController` into the main loop.
|
- The watchdog handling was moved outside the `CoreController` into the main loop.
|
||||||
|
- Moved polling of all SPI parts to the same PST.
|
||||||
|
|
||||||
|
# [v1.33.0]
|
||||||
|
|
||||||
|
eive-tmtc: v2.16.2
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
- Move ACS board polling to separate worker thread.
|
- Move ACS board polling to separate worker thread.
|
||||||
|
- Move SUS board polling to separate worker thread.
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
cmake_minimum_required(VERSION 3.13)
|
cmake_minimum_required(VERSION 3.13)
|
||||||
|
|
||||||
set(OBSW_VERSION_MAJOR 1)
|
set(OBSW_VERSION_MAJOR 1)
|
||||||
set(OBSW_VERSION_MINOR 32)
|
set(OBSW_VERSION_MINOR 33)
|
||||||
set(OBSW_VERSION_REVISION 0)
|
set(OBSW_VERSION_REVISION 0)
|
||||||
|
|
||||||
# set(CMAKE_VERBOSE TRUE)
|
# set(CMAKE_VERBOSE TRUE)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated event translation file. Contains 263 translations.
|
* @brief Auto-generated event translation file. Contains 267 translations.
|
||||||
* @details
|
* @details
|
||||||
* Generated on: 2023-02-24 16:57:00
|
* Generated on: 2023-03-01 18:34:32
|
||||||
*/
|
*/
|
||||||
#include "translateEvents.h"
|
#include "translateEvents.h"
|
||||||
|
|
||||||
@ -158,6 +158,8 @@ const char *LOST_BIT_LOCK_PDEC_STRING = "LOST_BIT_LOCK_PDEC";
|
|||||||
const char *TOO_MANY_IRQS_STRING = "TOO_MANY_IRQS";
|
const char *TOO_MANY_IRQS_STRING = "TOO_MANY_IRQS";
|
||||||
const char *POLL_SYSCALL_ERROR_PDEC_STRING = "POLL_SYSCALL_ERROR_PDEC";
|
const char *POLL_SYSCALL_ERROR_PDEC_STRING = "POLL_SYSCALL_ERROR_PDEC";
|
||||||
const char *WRITE_SYSCALL_ERROR_PDEC_STRING = "WRITE_SYSCALL_ERROR_PDEC";
|
const char *WRITE_SYSCALL_ERROR_PDEC_STRING = "WRITE_SYSCALL_ERROR_PDEC";
|
||||||
|
const char *PDEC_RESET_FAILED_STRING = "PDEC_RESET_FAILED";
|
||||||
|
const char *OPEN_IRQ_FILE_FAILED_STRING = "OPEN_IRQ_FILE_FAILED";
|
||||||
const char *IMAGE_UPLOAD_FAILED_STRING = "IMAGE_UPLOAD_FAILED";
|
const char *IMAGE_UPLOAD_FAILED_STRING = "IMAGE_UPLOAD_FAILED";
|
||||||
const char *IMAGE_DOWNLOAD_FAILED_STRING = "IMAGE_DOWNLOAD_FAILED";
|
const char *IMAGE_DOWNLOAD_FAILED_STRING = "IMAGE_DOWNLOAD_FAILED";
|
||||||
const char *IMAGE_UPLOAD_SUCCESSFUL_STRING = "IMAGE_UPLOAD_SUCCESSFUL";
|
const char *IMAGE_UPLOAD_SUCCESSFUL_STRING = "IMAGE_UPLOAD_SUCCESSFUL";
|
||||||
@ -255,7 +257,6 @@ const char *REBOOT_HW_STRING = "REBOOT_HW";
|
|||||||
const char *NO_SD_CARD_ACTIVE_STRING = "NO_SD_CARD_ACTIVE";
|
const char *NO_SD_CARD_ACTIVE_STRING = "NO_SD_CARD_ACTIVE";
|
||||||
const char *VERSION_INFO_STRING = "VERSION_INFO";
|
const char *VERSION_INFO_STRING = "VERSION_INFO";
|
||||||
const char *CURRENT_IMAGE_INFO_STRING = "CURRENT_IMAGE_INFO";
|
const char *CURRENT_IMAGE_INFO_STRING = "CURRENT_IMAGE_INFO";
|
||||||
const char *POSSIBLE_FILE_CORRUPTION_STRING = "POSSIBLE_FILE_CORRUPTION";
|
|
||||||
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
|
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
|
||||||
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
|
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
|
||||||
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
|
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
|
||||||
@ -263,6 +264,9 @@ const char *PLOC_OVERHEATING_STRING = "PLOC_OVERHEATING";
|
|||||||
const char *OBC_OVERHEATING_STRING = "OBC_OVERHEATING";
|
const char *OBC_OVERHEATING_STRING = "OBC_OVERHEATING";
|
||||||
const char *HPA_OVERHEATING_STRING = "HPA_OVERHEATING";
|
const char *HPA_OVERHEATING_STRING = "HPA_OVERHEATING";
|
||||||
const char *PLPCDU_OVERHEATING_STRING = "PLPCDU_OVERHEATING";
|
const char *PLPCDU_OVERHEATING_STRING = "PLPCDU_OVERHEATING";
|
||||||
|
const char *TX_TIMER_EXPIRED_STRING = "TX_TIMER_EXPIRED";
|
||||||
|
const char *BIT_LOCK_TX_ON_STRING = "BIT_LOCK_TX_ON";
|
||||||
|
const char *POSSIBLE_FILE_CORRUPTION_STRING = "POSSIBLE_FILE_CORRUPTION";
|
||||||
|
|
||||||
const char *translateEvents(Event event) {
|
const char *translateEvents(Event event) {
|
||||||
switch ((event & 0xFFFF)) {
|
switch ((event & 0xFFFF)) {
|
||||||
@ -572,6 +576,10 @@ const char *translateEvents(Event event) {
|
|||||||
return POLL_SYSCALL_ERROR_PDEC_STRING;
|
return POLL_SYSCALL_ERROR_PDEC_STRING;
|
||||||
case (12409):
|
case (12409):
|
||||||
return WRITE_SYSCALL_ERROR_PDEC_STRING;
|
return WRITE_SYSCALL_ERROR_PDEC_STRING;
|
||||||
|
case (12410):
|
||||||
|
return PDEC_RESET_FAILED_STRING;
|
||||||
|
case (12411):
|
||||||
|
return OPEN_IRQ_FILE_FAILED_STRING;
|
||||||
case (12500):
|
case (12500):
|
||||||
return IMAGE_UPLOAD_FAILED_STRING;
|
return IMAGE_UPLOAD_FAILED_STRING;
|
||||||
case (12501):
|
case (12501):
|
||||||
@ -767,21 +775,25 @@ const char *translateEvents(Event event) {
|
|||||||
case (14006):
|
case (14006):
|
||||||
return CURRENT_IMAGE_INFO_STRING;
|
return CURRENT_IMAGE_INFO_STRING;
|
||||||
case (14100):
|
case (14100):
|
||||||
return POSSIBLE_FILE_CORRUPTION_STRING;
|
|
||||||
case (14200):
|
|
||||||
return NO_VALID_SENSOR_TEMPERATURE_STRING;
|
return NO_VALID_SENSOR_TEMPERATURE_STRING;
|
||||||
case (14201):
|
case (14101):
|
||||||
return NO_HEALTHY_HEATER_AVAILABLE_STRING;
|
return NO_HEALTHY_HEATER_AVAILABLE_STRING;
|
||||||
case (14202):
|
case (14102):
|
||||||
return SYRLINKS_OVERHEATING_STRING;
|
return SYRLINKS_OVERHEATING_STRING;
|
||||||
case (14203):
|
case (14103):
|
||||||
return PLOC_OVERHEATING_STRING;
|
return PLOC_OVERHEATING_STRING;
|
||||||
case (14204):
|
case (14104):
|
||||||
return OBC_OVERHEATING_STRING;
|
return OBC_OVERHEATING_STRING;
|
||||||
case (14205):
|
case (14105):
|
||||||
return HPA_OVERHEATING_STRING;
|
return HPA_OVERHEATING_STRING;
|
||||||
case (14206):
|
case (14106):
|
||||||
return PLPCDU_OVERHEATING_STRING;
|
return PLPCDU_OVERHEATING_STRING;
|
||||||
|
case (14201):
|
||||||
|
return TX_TIMER_EXPIRED_STRING;
|
||||||
|
case (14202):
|
||||||
|
return BIT_LOCK_TX_ON_STRING;
|
||||||
|
case (14300):
|
||||||
|
return POSSIBLE_FILE_CORRUPTION_STRING;
|
||||||
default:
|
default:
|
||||||
return "UNKNOWN_EVENT";
|
return "UNKNOWN_EVENT";
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated object translation file.
|
* @brief Auto-generated object translation file.
|
||||||
* @details
|
* @details
|
||||||
* Contains 154 translations.
|
* Contains 157 translations.
|
||||||
* Generated on: 2023-02-24 16:57:00
|
* Generated on: 2023-03-01 18:34:32
|
||||||
*/
|
*/
|
||||||
#include "translateObjects.h"
|
#include "translateObjects.h"
|
||||||
|
|
||||||
@ -85,8 +85,11 @@ const char *SYRLINKS_HANDLER_STRING = "SYRLINKS_HANDLER";
|
|||||||
const char *ARDUINO_COM_IF_STRING = "ARDUINO_COM_IF";
|
const char *ARDUINO_COM_IF_STRING = "ARDUINO_COM_IF";
|
||||||
const char *DUMMY_COM_IF_STRING = "DUMMY_COM_IF";
|
const char *DUMMY_COM_IF_STRING = "DUMMY_COM_IF";
|
||||||
const char *SCEX_UART_READER_STRING = "SCEX_UART_READER";
|
const char *SCEX_UART_READER_STRING = "SCEX_UART_READER";
|
||||||
const char *SPI_RTD_COM_IF_STRING = "SPI_RTD_COM_IF";
|
|
||||||
const char *UART_COM_IF_STRING = "UART_COM_IF";
|
const char *UART_COM_IF_STRING = "UART_COM_IF";
|
||||||
|
const char *ACS_BOARD_POLLING_TASK_STRING = "ACS_BOARD_POLLING_TASK";
|
||||||
|
const char *RW_POLLING_TASK_STRING = "RW_POLLING_TASK";
|
||||||
|
const char *SPI_RTD_COM_IF_STRING = "SPI_RTD_COM_IF";
|
||||||
|
const char *SUS_POLLING_TASK_STRING = "SUS_POLLING_TASK";
|
||||||
const char *CCSDS_PACKET_DISTRIBUTOR_STRING = "CCSDS_PACKET_DISTRIBUTOR";
|
const char *CCSDS_PACKET_DISTRIBUTOR_STRING = "CCSDS_PACKET_DISTRIBUTOR";
|
||||||
const char *PUS_PACKET_DISTRIBUTOR_STRING = "PUS_PACKET_DISTRIBUTOR";
|
const char *PUS_PACKET_DISTRIBUTOR_STRING = "PUS_PACKET_DISTRIBUTOR";
|
||||||
const char *TCP_TMTC_SERVER_STRING = "TCP_TMTC_SERVER";
|
const char *TCP_TMTC_SERVER_STRING = "TCP_TMTC_SERVER";
|
||||||
@ -321,10 +324,16 @@ const char *translateObject(object_id_t object) {
|
|||||||
return DUMMY_COM_IF_STRING;
|
return DUMMY_COM_IF_STRING;
|
||||||
case 0x49010006:
|
case 0x49010006:
|
||||||
return SCEX_UART_READER_STRING;
|
return SCEX_UART_READER_STRING;
|
||||||
case 0x49020006:
|
|
||||||
return SPI_RTD_COM_IF_STRING;
|
|
||||||
case 0x49030003:
|
case 0x49030003:
|
||||||
return UART_COM_IF_STRING;
|
return UART_COM_IF_STRING;
|
||||||
|
case 0x49060004:
|
||||||
|
return ACS_BOARD_POLLING_TASK_STRING;
|
||||||
|
case 0x49060005:
|
||||||
|
return RW_POLLING_TASK_STRING;
|
||||||
|
case 0x49060006:
|
||||||
|
return SPI_RTD_COM_IF_STRING;
|
||||||
|
case 0x49060007:
|
||||||
|
return SUS_POLLING_TASK_STRING;
|
||||||
case 0x50000100:
|
case 0x50000100:
|
||||||
return CCSDS_PACKET_DISTRIBUTOR_STRING;
|
return CCSDS_PACKET_DISTRIBUTOR_STRING;
|
||||||
case 0x50000200:
|
case 0x50000200:
|
||||||
|
@ -1181,6 +1181,9 @@ ReturnValue_t CoreController::handleProtInfoUpdateLine(std::string nextLine) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
wordIdx++;
|
wordIdx++;
|
||||||
|
if(wordIdx >= 10) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -220,6 +220,15 @@ void scheduling::initTasks() {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if OBSW_ADD_SUN_SENSORS == 1
|
||||||
|
PeriodicTaskIF* susPolling = factory->createPeriodicTask(
|
||||||
|
"SUS_POLLING_TASK", 85, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
|
||||||
|
result = susPolling->addComponent(objects::SUS_POLLING_TASK);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("SUS_POLLING_TASK", objects::SUS_POLLING_TASK);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
PeriodicTaskIF* acsSysTask = factory->createPeriodicTask(
|
PeriodicTaskIF* acsSysTask = factory->createPeriodicTask(
|
||||||
"ACS_SYS_TASK", 55, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
|
"ACS_SYS_TASK", 55, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
|
||||||
static_cast<void>(acsSysTask);
|
static_cast<void>(acsSysTask);
|
||||||
@ -366,6 +375,9 @@ void scheduling::initTasks() {
|
|||||||
#if OBSW_ADD_MGT == 1
|
#if OBSW_ADD_MGT == 1
|
||||||
imtqPolling->startTask();
|
imtqPolling->startTask();
|
||||||
#endif
|
#endif
|
||||||
|
#if OBSW_ADD_SUN_SENSORS == 1
|
||||||
|
susPolling->startTask();
|
||||||
|
#endif
|
||||||
|
|
||||||
taskStarter(pstTasks, "PST task vector");
|
taskStarter(pstTasks, "PST task vector");
|
||||||
taskStarter(pusTasks, "PUS task vector");
|
taskStarter(pusTasks, "PUS task vector");
|
||||||
|
@ -19,8 +19,8 @@ class LocalParameterHandler : public NVMParameterBase {
|
|||||||
* @brief Constructor
|
* @brief Constructor
|
||||||
*
|
*
|
||||||
* @param sdRelativeName Absolute name of json file relative to mount
|
* @param sdRelativeName Absolute name of json file relative to mount
|
||||||
* directory of SD card.
|
* directory
|
||||||
* E.g. conf/example.json
|
* of SD card. E.g. conf/example.json
|
||||||
* @param sdcMan Pointer to SD card manager
|
* @param sdcMan Pointer to SD card manager
|
||||||
*/
|
*/
|
||||||
LocalParameterHandler(std::string sdRelativeName, SdCardMountedIF* sdcMan);
|
LocalParameterHandler(std::string sdRelativeName, SdCardMountedIF* sdcMan);
|
||||||
|
@ -55,7 +55,7 @@ static constexpr uint32_t MAX_PUS_FUNNEL_QUEUE_DEPTH = 100;
|
|||||||
static constexpr uint32_t MAX_STORED_CMDS_UDP = 120;
|
static constexpr uint32_t MAX_STORED_CMDS_UDP = 120;
|
||||||
static constexpr uint32_t MAX_STORED_CMDS_TCP = 150;
|
static constexpr uint32_t MAX_STORED_CMDS_TCP = 150;
|
||||||
|
|
||||||
namespace acs {
|
namespace spiSched {
|
||||||
|
|
||||||
static constexpr uint32_t SCHED_BLOCK_1_SUS_READ_MS = 15;
|
static constexpr uint32_t SCHED_BLOCK_1_SUS_READ_MS = 15;
|
||||||
static constexpr uint32_t SCHED_BLOCK_2_SENSOR_READ_MS = 30;
|
static constexpr uint32_t SCHED_BLOCK_2_SENSOR_READ_MS = 30;
|
||||||
@ -65,6 +65,8 @@ static constexpr uint32_t SCHED_BLOCK_5_ACTUATOR_MS = 55;
|
|||||||
static constexpr uint32_t SCHED_BLOCK_6_IMTQ_BLOCK_2_MS = 95;
|
static constexpr uint32_t SCHED_BLOCK_6_IMTQ_BLOCK_2_MS = 95;
|
||||||
static constexpr uint32_t SCHED_BLOCK_RTD = 150;
|
static constexpr uint32_t SCHED_BLOCK_RTD = 150;
|
||||||
static constexpr uint32_t SCHED_BLOCK_7_RW_READ_MS = 300;
|
static constexpr uint32_t SCHED_BLOCK_7_RW_READ_MS = 300;
|
||||||
|
static constexpr uint32_t SCHED_BLOCK_8_PLPCDU_MS = 320;
|
||||||
|
static constexpr uint32_t SCHED_BLOCK_9_RAD_SENS_MS = 340;
|
||||||
|
|
||||||
// 15 ms for FM
|
// 15 ms for FM
|
||||||
static constexpr float SCHED_BLOCK_1_PERIOD = static_cast<float>(SCHED_BLOCK_1_SUS_READ_MS) / 400.0;
|
static constexpr float SCHED_BLOCK_1_PERIOD = static_cast<float>(SCHED_BLOCK_1_SUS_READ_MS) / 400.0;
|
||||||
@ -76,8 +78,10 @@ static constexpr float SCHED_BLOCK_4_PERIOD = static_cast<float>(SCHED_BLOCK_4_A
|
|||||||
static constexpr float SCHED_BLOCK_5_PERIOD = static_cast<float>(SCHED_BLOCK_5_ACTUATOR_MS) / 400.0;
|
static constexpr float SCHED_BLOCK_5_PERIOD = static_cast<float>(SCHED_BLOCK_5_ACTUATOR_MS) / 400.0;
|
||||||
static constexpr float SCHED_BLOCK_6_PERIOD =
|
static constexpr float SCHED_BLOCK_6_PERIOD =
|
||||||
static_cast<float>(SCHED_BLOCK_6_IMTQ_BLOCK_2_MS) / 400.0;
|
static_cast<float>(SCHED_BLOCK_6_IMTQ_BLOCK_2_MS) / 400.0;
|
||||||
static constexpr float SCHED_BLOCK_7_PERIOD = static_cast<float>(SCHED_BLOCK_7_RW_READ_MS) / 400.0;
|
|
||||||
static constexpr float SCHED_BLOCK_RTD_PERIOD = static_cast<float>(SCHED_BLOCK_RTD) / 400.0;
|
static constexpr float SCHED_BLOCK_RTD_PERIOD = static_cast<float>(SCHED_BLOCK_RTD) / 400.0;
|
||||||
|
static constexpr float SCHED_BLOCK_7_PERIOD = static_cast<float>(SCHED_BLOCK_7_RW_READ_MS) / 400.0;
|
||||||
|
static constexpr float SCHED_BLOCK_8_PERIOD = static_cast<float>(SCHED_BLOCK_8_PLPCDU_MS) / 400.0;
|
||||||
|
static constexpr float SCHED_BLOCK_9_PERIOD = static_cast<float>(SCHED_BLOCK_9_RAD_SENS_MS) / 400.0;
|
||||||
|
|
||||||
} // namespace acs
|
} // namespace acs
|
||||||
|
|
||||||
|
@ -126,6 +126,7 @@ enum commonObjects : uint32_t {
|
|||||||
ACS_BOARD_POLLING_TASK = 0x49060004,
|
ACS_BOARD_POLLING_TASK = 0x49060004,
|
||||||
RW_POLLING_TASK = 0x49060005,
|
RW_POLLING_TASK = 0x49060005,
|
||||||
SPI_RTD_COM_IF = 0x49060006,
|
SPI_RTD_COM_IF = 0x49060006,
|
||||||
|
SUS_POLLING_TASK = 0x49060007,
|
||||||
|
|
||||||
// 0x60 for other stuff
|
// 0x60 for other stuff
|
||||||
HEATER_0_PLOC_PROC_BRD = 0x60000000,
|
HEATER_0_PLOC_PROC_BRD = 0x60000000,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <fsfw/controller/ExtendedControllerBase.h>
|
#include <fsfw/controller/ExtendedControllerBase.h>
|
||||||
#include <mission/devices/devicedefinitions/SusDefinitions.h>
|
#include <mission/devices/devicedefinitions/susMax1227Helpers.h>
|
||||||
|
|
||||||
class CoreControllerDummy : public ExtendedControllerBase {
|
class CoreControllerDummy : public ExtendedControllerBase {
|
||||||
public:
|
public:
|
||||||
|
@ -35,8 +35,9 @@ uint32_t SusDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return
|
|||||||
|
|
||||||
ReturnValue_t SusDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
ReturnValue_t SusDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
LocalDataPoolManager &poolManager) {
|
LocalDataPoolManager &poolManager) {
|
||||||
localDataPoolMap.emplace(SUS::SusPoolIds::TEMPERATURE_C, new PoolEntry<float>({0}, 1, true));
|
localDataPoolMap.emplace(susMax1227::SusPoolIds::TEMPERATURE_C,
|
||||||
localDataPoolMap.emplace(SUS::SusPoolIds::CHANNEL_VEC,
|
new PoolEntry<float>({0}, 1, true));
|
||||||
|
localDataPoolMap.emplace(susMax1227::SusPoolIds::CHANNEL_VEC,
|
||||||
new PoolEntry<uint16_t>({2603, 781, 2760, 2048, 4056, 0}, true));
|
new PoolEntry<uint16_t>({2603, 781, 2760, 2048, 4056, 0}, true));
|
||||||
|
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
#define DUMMIES_SUSDUMMY_H_
|
#define DUMMIES_SUSDUMMY_H_
|
||||||
|
|
||||||
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
||||||
|
#include <mission/devices/devicedefinitions/susMax1227Helpers.h>
|
||||||
#include "mission/devices/devicedefinitions/SusDefinitions.h"
|
|
||||||
|
|
||||||
class SusDummy : public DeviceHandlerBase {
|
class SusDummy : public DeviceHandlerBase {
|
||||||
public:
|
public:
|
||||||
@ -17,7 +16,7 @@ class SusDummy : public DeviceHandlerBase {
|
|||||||
virtual ~SusDummy();
|
virtual ~SusDummy();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SUS::SusDataset susSet;
|
susMax1227::SusDataset susSet;
|
||||||
void doStartUp() override;
|
void doStartUp() override;
|
||||||
void doShutDown() override;
|
void doShutDown() override;
|
||||||
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
|
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
|
||||||
|
@ -151,7 +151,9 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
|||||||
12406;0x3076;LOST_BIT_LOCK_PDEC;INFO;Lost bit lock;linux/ipcore/PdecHandler.h
|
12406;0x3076;LOST_BIT_LOCK_PDEC;INFO;Lost bit lock;linux/ipcore/PdecHandler.h
|
||||||
12407;0x3077;TOO_MANY_IRQS;MEDIUM;Too many IRQs over the time window of one second. P1: Allowed TCs;linux/ipcore/PdecHandler.h
|
12407;0x3077;TOO_MANY_IRQS;MEDIUM;Too many IRQs over the time window of one second. P1: Allowed TCs;linux/ipcore/PdecHandler.h
|
||||||
12408;0x3078;POLL_SYSCALL_ERROR_PDEC;MEDIUM;No description;linux/ipcore/PdecHandler.h
|
12408;0x3078;POLL_SYSCALL_ERROR_PDEC;MEDIUM;No description;linux/ipcore/PdecHandler.h
|
||||||
12409;0x3079;WRITE_SYSCALL_ERROR_PDEC;MEDIUM;No description;linux/ipcore/PdecHandler.h
|
12409;0x3079;WRITE_SYSCALL_ERROR_PDEC;HIGH;No description;linux/ipcore/PdecHandler.h
|
||||||
|
12410;0x307a;PDEC_RESET_FAILED;HIGH;Failed to pull PDEC reset to low;linux/ipcore/PdecHandler.h
|
||||||
|
12411;0x307b;OPEN_IRQ_FILE_FAILED;HIGH;Failed to open the IRQ uio file;linux/ipcore/PdecHandler.h
|
||||||
12500;0x30d4;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;linux/devices/startracker/StrHelper.h
|
12500;0x30d4;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;linux/devices/startracker/StrHelper.h
|
||||||
12501;0x30d5;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;linux/devices/startracker/StrHelper.h
|
12501;0x30d5;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;linux/devices/startracker/StrHelper.h
|
||||||
12502;0x30d6;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;linux/devices/startracker/StrHelper.h
|
12502;0x30d6;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;linux/devices/startracker/StrHelper.h
|
||||||
@ -254,11 +256,13 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
|||||||
14004;0x36b4;NO_SD_CARD_ACTIVE;HIGH;No SD card was active. Core controller will attempt to re-initialize a SD card.;bsp_q7s/core/CoreController.h
|
14004;0x36b4;NO_SD_CARD_ACTIVE;HIGH;No SD card was active. Core controller will attempt to re-initialize a SD card.;bsp_q7s/core/CoreController.h
|
||||||
14005;0x36b5;VERSION_INFO;INFO;P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash P2: First four letters of Git SHA is the last byte of P1 is set.;bsp_q7s/core/CoreController.h
|
14005;0x36b5;VERSION_INFO;INFO;P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash P2: First four letters of Git SHA is the last byte of P1 is set.;bsp_q7s/core/CoreController.h
|
||||||
14006;0x36b6;CURRENT_IMAGE_INFO;INFO;P1: Current Chip, P2: Current Copy;bsp_q7s/core/CoreController.h
|
14006;0x36b6;CURRENT_IMAGE_INFO;INFO;P1: Current Chip, P2: Current Copy;bsp_q7s/core/CoreController.h
|
||||||
14100;0x3714;POSSIBLE_FILE_CORRUPTION;LOW;P1: Result code of TM packet parser. P2: Timestamp of possibly corrupt file as a unix timestamp.;mission/tmtc/PersistentTmStore.h
|
14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/ThermalController.h
|
||||||
14200;0x3778;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/ThermalController.h
|
14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/ThermalController.h
|
||||||
14201;0x3779;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/ThermalController.h
|
14102;0x3716;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
||||||
14202;0x377a;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
14103;0x3717;PLOC_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
||||||
14203;0x377b;PLOC_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
14104;0x3718;OBC_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
||||||
14204;0x377c;OBC_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
14105;0x3719;HPA_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
||||||
14205;0x377d;HPA_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
14106;0x371a;PLPCDU_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
||||||
14206;0x377e;PLPCDU_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
14201;0x3779;TX_TIMER_EXPIRED;INFO;The transmit timer to protect the Syrlinks expired P1: The current timer value;mission/system/objects/ComSubsystem.h
|
||||||
|
14202;0x377a;BIT_LOCK_TX_ON;INFO;Transmitter will be turned on due to detection of bitlock;mission/system/objects/ComSubsystem.h
|
||||||
|
14300;0x37dc;POSSIBLE_FILE_CORRUPTION;LOW;P1: Result code of TM packet parser. P2: Timestamp of possibly corrupt file as a unix timestamp.;mission/tmtc/PersistentTmStore.h
|
||||||
|
|
@ -77,8 +77,11 @@
|
|||||||
0x49000001;ARDUINO_COM_IF
|
0x49000001;ARDUINO_COM_IF
|
||||||
0x49000002;DUMMY_COM_IF
|
0x49000002;DUMMY_COM_IF
|
||||||
0x49010006;SCEX_UART_READER
|
0x49010006;SCEX_UART_READER
|
||||||
0x49020006;SPI_RTD_COM_IF
|
|
||||||
0x49030003;UART_COM_IF
|
0x49030003;UART_COM_IF
|
||||||
|
0x49060004;ACS_BOARD_POLLING_TASK
|
||||||
|
0x49060005;RW_POLLING_TASK
|
||||||
|
0x49060006;SPI_RTD_COM_IF
|
||||||
|
0x49060007;SUS_POLLING_TASK
|
||||||
0x50000100;CCSDS_PACKET_DISTRIBUTOR
|
0x50000100;CCSDS_PACKET_DISTRIBUTOR
|
||||||
0x50000200;PUS_PACKET_DISTRIBUTOR
|
0x50000200;PUS_PACKET_DISTRIBUTOR
|
||||||
0x50000300;TCP_TMTC_SERVER
|
0x50000300;TCP_TMTC_SERVER
|
||||||
|
|
@ -20,8 +20,8 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
|||||||
0x52b5;RWHA_NoReply;Reaction wheel only responds with empty frames.;181;RW_HANDLER;mission/devices/devicedefinitions/rwHelpers.h
|
0x52b5;RWHA_NoReply;Reaction wheel only responds with empty frames.;181;RW_HANDLER;mission/devices/devicedefinitions/rwHelpers.h
|
||||||
0x52b6;RWHA_NoStartMarker;Expected a start marker as first byte;182;RW_HANDLER;mission/devices/devicedefinitions/rwHelpers.h
|
0x52b6;RWHA_NoStartMarker;Expected a start marker as first byte;182;RW_HANDLER;mission/devices/devicedefinitions/rwHelpers.h
|
||||||
0x52b7;RWHA_SpiReadTimeout;Timeout when reading reply;183;RW_HANDLER;mission/devices/devicedefinitions/rwHelpers.h
|
0x52b7;RWHA_SpiReadTimeout;Timeout when reading reply;183;RW_HANDLER;mission/devices/devicedefinitions/rwHelpers.h
|
||||||
0x58a0;SUSS_ErrorUnlockMutex;No description;160;SUS_HANDLER;mission/devices/SusHandler.h
|
0x58a0;SUSS_ErrorUnlockMutex;No description;160;SUS_HANDLER;mission/devices/LegacySusHandler.h
|
||||||
0x58a1;SUSS_ErrorLockMutex;No description;161;SUS_HANDLER;mission/devices/SusHandler.h
|
0x58a1;SUSS_ErrorLockMutex;No description;161;SUS_HANDLER;mission/devices/LegacySusHandler.h
|
||||||
0x66a0;SADPL_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
0x66a0;SADPL_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
||||||
0x66a1;SADPL_InvalidRampTime;Action Message with invalid ramp time was received.;161;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
0x66a1;SADPL_InvalidRampTime;Action Message with invalid ramp time was received.;161;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
||||||
0x66a2;SADPL_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
0x66a2;SADPL_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
||||||
|
|
@ -151,7 +151,9 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
|||||||
12406;0x3076;LOST_BIT_LOCK_PDEC;INFO;Lost bit lock;linux/ipcore/PdecHandler.h
|
12406;0x3076;LOST_BIT_LOCK_PDEC;INFO;Lost bit lock;linux/ipcore/PdecHandler.h
|
||||||
12407;0x3077;TOO_MANY_IRQS;MEDIUM;Too many IRQs over the time window of one second. P1: Allowed TCs;linux/ipcore/PdecHandler.h
|
12407;0x3077;TOO_MANY_IRQS;MEDIUM;Too many IRQs over the time window of one second. P1: Allowed TCs;linux/ipcore/PdecHandler.h
|
||||||
12408;0x3078;POLL_SYSCALL_ERROR_PDEC;MEDIUM;No description;linux/ipcore/PdecHandler.h
|
12408;0x3078;POLL_SYSCALL_ERROR_PDEC;MEDIUM;No description;linux/ipcore/PdecHandler.h
|
||||||
12409;0x3079;WRITE_SYSCALL_ERROR_PDEC;MEDIUM;No description;linux/ipcore/PdecHandler.h
|
12409;0x3079;WRITE_SYSCALL_ERROR_PDEC;HIGH;No description;linux/ipcore/PdecHandler.h
|
||||||
|
12410;0x307a;PDEC_RESET_FAILED;HIGH;Failed to pull PDEC reset to low;linux/ipcore/PdecHandler.h
|
||||||
|
12411;0x307b;OPEN_IRQ_FILE_FAILED;HIGH;Failed to open the IRQ uio file;linux/ipcore/PdecHandler.h
|
||||||
12500;0x30d4;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;linux/devices/startracker/StrHelper.h
|
12500;0x30d4;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;linux/devices/startracker/StrHelper.h
|
||||||
12501;0x30d5;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;linux/devices/startracker/StrHelper.h
|
12501;0x30d5;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;linux/devices/startracker/StrHelper.h
|
||||||
12502;0x30d6;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;linux/devices/startracker/StrHelper.h
|
12502;0x30d6;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;linux/devices/startracker/StrHelper.h
|
||||||
@ -254,11 +256,13 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
|||||||
14004;0x36b4;NO_SD_CARD_ACTIVE;HIGH;No SD card was active. Core controller will attempt to re-initialize a SD card.;bsp_q7s/core/CoreController.h
|
14004;0x36b4;NO_SD_CARD_ACTIVE;HIGH;No SD card was active. Core controller will attempt to re-initialize a SD card.;bsp_q7s/core/CoreController.h
|
||||||
14005;0x36b5;VERSION_INFO;INFO;P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash P2: First four letters of Git SHA is the last byte of P1 is set.;bsp_q7s/core/CoreController.h
|
14005;0x36b5;VERSION_INFO;INFO;P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash P2: First four letters of Git SHA is the last byte of P1 is set.;bsp_q7s/core/CoreController.h
|
||||||
14006;0x36b6;CURRENT_IMAGE_INFO;INFO;P1: Current Chip, P2: Current Copy;bsp_q7s/core/CoreController.h
|
14006;0x36b6;CURRENT_IMAGE_INFO;INFO;P1: Current Chip, P2: Current Copy;bsp_q7s/core/CoreController.h
|
||||||
14100;0x3714;POSSIBLE_FILE_CORRUPTION;LOW;P1: Result code of TM packet parser. P2: Timestamp of possibly corrupt file as a unix timestamp.;mission/tmtc/PersistentTmStore.h
|
14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/ThermalController.h
|
||||||
14200;0x3778;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/ThermalController.h
|
14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/ThermalController.h
|
||||||
14201;0x3779;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/ThermalController.h
|
14102;0x3716;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
||||||
14202;0x377a;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
14103;0x3717;PLOC_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
||||||
14203;0x377b;PLOC_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
14104;0x3718;OBC_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
||||||
14204;0x377c;OBC_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
14105;0x3719;HPA_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
||||||
14205;0x377d;HPA_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
14106;0x371a;PLPCDU_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
||||||
14206;0x377e;PLPCDU_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
14201;0x3779;TX_TIMER_EXPIRED;INFO;The transmit timer to protect the Syrlinks expired P1: The current timer value;mission/system/objects/ComSubsystem.h
|
||||||
|
14202;0x377a;BIT_LOCK_TX_ON;INFO;Transmitter will be turned on due to detection of bitlock;mission/system/objects/ComSubsystem.h
|
||||||
|
14300;0x37dc;POSSIBLE_FILE_CORRUPTION;LOW;P1: Result code of TM packet parser. P2: Timestamp of possibly corrupt file as a unix timestamp.;mission/tmtc/PersistentTmStore.h
|
||||||
|
|
@ -77,11 +77,13 @@
|
|||||||
0x49010005;GPIO_IF
|
0x49010005;GPIO_IF
|
||||||
0x49010006;SCEX_UART_READER
|
0x49010006;SCEX_UART_READER
|
||||||
0x49020004;SPI_MAIN_COM_IF
|
0x49020004;SPI_MAIN_COM_IF
|
||||||
0x49020005;RW_POLLING_TASK
|
|
||||||
0x49020006;SPI_RTD_COM_IF
|
|
||||||
0x49030003;UART_COM_IF
|
0x49030003;UART_COM_IF
|
||||||
0x49040002;I2C_COM_IF
|
0x49040002;I2C_COM_IF
|
||||||
0x49050001;CSP_COM_IF
|
0x49050001;CSP_COM_IF
|
||||||
|
0x49060004;ACS_BOARD_POLLING_TASK
|
||||||
|
0x49060005;RW_POLLING_TASK
|
||||||
|
0x49060006;SPI_RTD_COM_IF
|
||||||
|
0x49060007;SUS_POLLING_TASK
|
||||||
0x50000100;CCSDS_PACKET_DISTRIBUTOR
|
0x50000100;CCSDS_PACKET_DISTRIBUTOR
|
||||||
0x50000200;PUS_PACKET_DISTRIBUTOR
|
0x50000200;PUS_PACKET_DISTRIBUTOR
|
||||||
0x50000300;TCP_TMTC_SERVER
|
0x50000300;TCP_TMTC_SERVER
|
||||||
|
|
@ -20,8 +20,8 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
|||||||
0x52b5;RWHA_NoReply;Reaction wheel only responds with empty frames.;181;RW_HANDLER;mission/devices/devicedefinitions/rwHelpers.h
|
0x52b5;RWHA_NoReply;Reaction wheel only responds with empty frames.;181;RW_HANDLER;mission/devices/devicedefinitions/rwHelpers.h
|
||||||
0x52b6;RWHA_NoStartMarker;Expected a start marker as first byte;182;RW_HANDLER;mission/devices/devicedefinitions/rwHelpers.h
|
0x52b6;RWHA_NoStartMarker;Expected a start marker as first byte;182;RW_HANDLER;mission/devices/devicedefinitions/rwHelpers.h
|
||||||
0x52b7;RWHA_SpiReadTimeout;Timeout when reading reply;183;RW_HANDLER;mission/devices/devicedefinitions/rwHelpers.h
|
0x52b7;RWHA_SpiReadTimeout;Timeout when reading reply;183;RW_HANDLER;mission/devices/devicedefinitions/rwHelpers.h
|
||||||
0x58a0;SUSS_ErrorUnlockMutex;No description;160;SUS_HANDLER;mission/devices/SusHandler.h
|
0x58a0;SUSS_ErrorUnlockMutex;No description;160;SUS_HANDLER;mission/devices/LegacySusHandler.h
|
||||||
0x58a1;SUSS_ErrorLockMutex;No description;161;SUS_HANDLER;mission/devices/SusHandler.h
|
0x58a1;SUSS_ErrorLockMutex;No description;161;SUS_HANDLER;mission/devices/LegacySusHandler.h
|
||||||
0x66a0;SADPL_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
0x66a0;SADPL_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
||||||
0x66a1;SADPL_InvalidRampTime;Action Message with invalid ramp time was received.;161;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
0x66a1;SADPL_InvalidRampTime;Action Message with invalid ramp time was received.;161;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
||||||
0x66a2;SADPL_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
0x66a2;SADPL_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
||||||
@ -474,19 +474,20 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
|||||||
0x1d03;ATC_IllegalApplicationData;No description;3;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
0x1d03;ATC_IllegalApplicationData;No description;3;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
||||||
0x1d04;ATC_SendTmFailed;No description;4;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
0x1d04;ATC_SendTmFailed;No description;4;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
||||||
0x1d05;ATC_Timeout;No description;5;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
0x1d05;ATC_Timeout;No description;5;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
||||||
0x7000;SCBU_KeyNotFound;No description;0;SCRATCH_BUFFER;bsp_q7s/memory/scratchApi.h
|
0x7100;SCBU_KeyNotFound;No description;0;SCRATCH_BUFFER;bsp_q7s/memory/scratchApi.h
|
||||||
|
0x6f00;LPH_SdNotReady;No description;0;LOCAL_PARAM_HANDLER;bsp_q7s/memory/LocalParameterHandler.h
|
||||||
0x64a0;FSHLP_SdNotMounted;SD card specified with path string not mounted;160;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h
|
0x64a0;FSHLP_SdNotMounted;SD card specified with path string not mounted;160;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h
|
||||||
0x64a1;FSHLP_FileNotExists;Specified file does not exist on filesystem;161;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h
|
0x64a1;FSHLP_FileNotExists;Specified file does not exist on filesystem;161;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h
|
||||||
0x6f00;SDMA_OpOngoing;No description;0;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
0x6e00;SDMA_OpOngoing;No description;0;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6f01;SDMA_AlreadyOn;No description;1;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
0x6e01;SDMA_AlreadyOn;No description;1;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6f02;SDMA_AlreadyMounted;No description;2;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
0x6e02;SDMA_AlreadyMounted;No description;2;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6f03;SDMA_AlreadyOff;No description;3;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
0x6e03;SDMA_AlreadyOff;No description;3;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6f0a;SDMA_StatusFileNexists;No description;10;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
0x6e0a;SDMA_StatusFileNexists;No description;10;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6f0b;SDMA_StatusFileFormatInvalid;No description;11;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
0x6e0b;SDMA_StatusFileFormatInvalid;No description;11;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6f0c;SDMA_MountError;No description;12;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
0x6e0c;SDMA_MountError;No description;12;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6f0d;SDMA_UnmountError;No description;13;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
0x6e0d;SDMA_UnmountError;No description;13;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6f0e;SDMA_SystemCallError;No description;14;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
0x6e0e;SDMA_SystemCallError;No description;14;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6f0f;SDMA_PopenCallError;No description;15;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
0x6e0f;SDMA_PopenCallError;No description;15;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x65a0;PLMPHLP_FileClosedAccidentally;File accidentally close;160;PLOC_MPSOC_HELPER;linux/devices/ploc/PlocMPSoCHelper.h
|
0x65a0;PLMPHLP_FileClosedAccidentally;File accidentally close;160;PLOC_MPSOC_HELPER;linux/devices/ploc/PlocMPSoCHelper.h
|
||||||
0x5ea0;PLMEMDUMP_MramAddressTooHigh;The capacity of the MRAM amounts to 512 kB. Thus the maximum address must not be higher than 0x7d000.;160;PLOC_MEMORY_DUMPER;linux/devices/ploc/PlocMemoryDumper.h
|
0x5ea0;PLMEMDUMP_MramAddressTooHigh;The capacity of the MRAM amounts to 512 kB. Thus the maximum address must not be higher than 0x7d000.;160;PLOC_MEMORY_DUMPER;linux/devices/ploc/PlocMemoryDumper.h
|
||||||
0x5ea1;PLMEMDUMP_MramInvalidAddressCombination;The specified end address is lower than the start address;161;PLOC_MEMORY_DUMPER;linux/devices/ploc/PlocMemoryDumper.h
|
0x5ea1;PLMEMDUMP_MramInvalidAddressCombination;The specified end address is lower than the start address;161;PLOC_MEMORY_DUMPER;linux/devices/ploc/PlocMemoryDumper.h
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated event translation file. Contains 263 translations.
|
* @brief Auto-generated event translation file. Contains 267 translations.
|
||||||
* @details
|
* @details
|
||||||
* Generated on: 2023-02-24 16:57:00
|
* Generated on: 2023-03-01 18:34:32
|
||||||
*/
|
*/
|
||||||
#include "translateEvents.h"
|
#include "translateEvents.h"
|
||||||
|
|
||||||
@ -158,6 +158,8 @@ const char *LOST_BIT_LOCK_PDEC_STRING = "LOST_BIT_LOCK_PDEC";
|
|||||||
const char *TOO_MANY_IRQS_STRING = "TOO_MANY_IRQS";
|
const char *TOO_MANY_IRQS_STRING = "TOO_MANY_IRQS";
|
||||||
const char *POLL_SYSCALL_ERROR_PDEC_STRING = "POLL_SYSCALL_ERROR_PDEC";
|
const char *POLL_SYSCALL_ERROR_PDEC_STRING = "POLL_SYSCALL_ERROR_PDEC";
|
||||||
const char *WRITE_SYSCALL_ERROR_PDEC_STRING = "WRITE_SYSCALL_ERROR_PDEC";
|
const char *WRITE_SYSCALL_ERROR_PDEC_STRING = "WRITE_SYSCALL_ERROR_PDEC";
|
||||||
|
const char *PDEC_RESET_FAILED_STRING = "PDEC_RESET_FAILED";
|
||||||
|
const char *OPEN_IRQ_FILE_FAILED_STRING = "OPEN_IRQ_FILE_FAILED";
|
||||||
const char *IMAGE_UPLOAD_FAILED_STRING = "IMAGE_UPLOAD_FAILED";
|
const char *IMAGE_UPLOAD_FAILED_STRING = "IMAGE_UPLOAD_FAILED";
|
||||||
const char *IMAGE_DOWNLOAD_FAILED_STRING = "IMAGE_DOWNLOAD_FAILED";
|
const char *IMAGE_DOWNLOAD_FAILED_STRING = "IMAGE_DOWNLOAD_FAILED";
|
||||||
const char *IMAGE_UPLOAD_SUCCESSFUL_STRING = "IMAGE_UPLOAD_SUCCESSFUL";
|
const char *IMAGE_UPLOAD_SUCCESSFUL_STRING = "IMAGE_UPLOAD_SUCCESSFUL";
|
||||||
@ -255,7 +257,6 @@ const char *REBOOT_HW_STRING = "REBOOT_HW";
|
|||||||
const char *NO_SD_CARD_ACTIVE_STRING = "NO_SD_CARD_ACTIVE";
|
const char *NO_SD_CARD_ACTIVE_STRING = "NO_SD_CARD_ACTIVE";
|
||||||
const char *VERSION_INFO_STRING = "VERSION_INFO";
|
const char *VERSION_INFO_STRING = "VERSION_INFO";
|
||||||
const char *CURRENT_IMAGE_INFO_STRING = "CURRENT_IMAGE_INFO";
|
const char *CURRENT_IMAGE_INFO_STRING = "CURRENT_IMAGE_INFO";
|
||||||
const char *POSSIBLE_FILE_CORRUPTION_STRING = "POSSIBLE_FILE_CORRUPTION";
|
|
||||||
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
|
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
|
||||||
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
|
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
|
||||||
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
|
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
|
||||||
@ -263,6 +264,9 @@ const char *PLOC_OVERHEATING_STRING = "PLOC_OVERHEATING";
|
|||||||
const char *OBC_OVERHEATING_STRING = "OBC_OVERHEATING";
|
const char *OBC_OVERHEATING_STRING = "OBC_OVERHEATING";
|
||||||
const char *HPA_OVERHEATING_STRING = "HPA_OVERHEATING";
|
const char *HPA_OVERHEATING_STRING = "HPA_OVERHEATING";
|
||||||
const char *PLPCDU_OVERHEATING_STRING = "PLPCDU_OVERHEATING";
|
const char *PLPCDU_OVERHEATING_STRING = "PLPCDU_OVERHEATING";
|
||||||
|
const char *TX_TIMER_EXPIRED_STRING = "TX_TIMER_EXPIRED";
|
||||||
|
const char *BIT_LOCK_TX_ON_STRING = "BIT_LOCK_TX_ON";
|
||||||
|
const char *POSSIBLE_FILE_CORRUPTION_STRING = "POSSIBLE_FILE_CORRUPTION";
|
||||||
|
|
||||||
const char *translateEvents(Event event) {
|
const char *translateEvents(Event event) {
|
||||||
switch ((event & 0xFFFF)) {
|
switch ((event & 0xFFFF)) {
|
||||||
@ -572,6 +576,10 @@ const char *translateEvents(Event event) {
|
|||||||
return POLL_SYSCALL_ERROR_PDEC_STRING;
|
return POLL_SYSCALL_ERROR_PDEC_STRING;
|
||||||
case (12409):
|
case (12409):
|
||||||
return WRITE_SYSCALL_ERROR_PDEC_STRING;
|
return WRITE_SYSCALL_ERROR_PDEC_STRING;
|
||||||
|
case (12410):
|
||||||
|
return PDEC_RESET_FAILED_STRING;
|
||||||
|
case (12411):
|
||||||
|
return OPEN_IRQ_FILE_FAILED_STRING;
|
||||||
case (12500):
|
case (12500):
|
||||||
return IMAGE_UPLOAD_FAILED_STRING;
|
return IMAGE_UPLOAD_FAILED_STRING;
|
||||||
case (12501):
|
case (12501):
|
||||||
@ -767,21 +775,25 @@ const char *translateEvents(Event event) {
|
|||||||
case (14006):
|
case (14006):
|
||||||
return CURRENT_IMAGE_INFO_STRING;
|
return CURRENT_IMAGE_INFO_STRING;
|
||||||
case (14100):
|
case (14100):
|
||||||
return POSSIBLE_FILE_CORRUPTION_STRING;
|
|
||||||
case (14200):
|
|
||||||
return NO_VALID_SENSOR_TEMPERATURE_STRING;
|
return NO_VALID_SENSOR_TEMPERATURE_STRING;
|
||||||
case (14201):
|
case (14101):
|
||||||
return NO_HEALTHY_HEATER_AVAILABLE_STRING;
|
return NO_HEALTHY_HEATER_AVAILABLE_STRING;
|
||||||
case (14202):
|
case (14102):
|
||||||
return SYRLINKS_OVERHEATING_STRING;
|
return SYRLINKS_OVERHEATING_STRING;
|
||||||
case (14203):
|
case (14103):
|
||||||
return PLOC_OVERHEATING_STRING;
|
return PLOC_OVERHEATING_STRING;
|
||||||
case (14204):
|
case (14104):
|
||||||
return OBC_OVERHEATING_STRING;
|
return OBC_OVERHEATING_STRING;
|
||||||
case (14205):
|
case (14105):
|
||||||
return HPA_OVERHEATING_STRING;
|
return HPA_OVERHEATING_STRING;
|
||||||
case (14206):
|
case (14106):
|
||||||
return PLPCDU_OVERHEATING_STRING;
|
return PLPCDU_OVERHEATING_STRING;
|
||||||
|
case (14201):
|
||||||
|
return TX_TIMER_EXPIRED_STRING;
|
||||||
|
case (14202):
|
||||||
|
return BIT_LOCK_TX_ON_STRING;
|
||||||
|
case (14300):
|
||||||
|
return POSSIBLE_FILE_CORRUPTION_STRING;
|
||||||
default:
|
default:
|
||||||
return "UNKNOWN_EVENT";
|
return "UNKNOWN_EVENT";
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated object translation file.
|
* @brief Auto-generated object translation file.
|
||||||
* @details
|
* @details
|
||||||
* Contains 159 translations.
|
* Contains 161 translations.
|
||||||
* Generated on: 2023-02-24 16:57:00
|
* Generated on: 2023-03-01 18:34:32
|
||||||
*/
|
*/
|
||||||
#include "translateObjects.h"
|
#include "translateObjects.h"
|
||||||
|
|
||||||
@ -85,11 +85,13 @@ const char *ARDUINO_COM_IF_STRING = "ARDUINO_COM_IF";
|
|||||||
const char *GPIO_IF_STRING = "GPIO_IF";
|
const char *GPIO_IF_STRING = "GPIO_IF";
|
||||||
const char *SCEX_UART_READER_STRING = "SCEX_UART_READER";
|
const char *SCEX_UART_READER_STRING = "SCEX_UART_READER";
|
||||||
const char *SPI_MAIN_COM_IF_STRING = "SPI_MAIN_COM_IF";
|
const char *SPI_MAIN_COM_IF_STRING = "SPI_MAIN_COM_IF";
|
||||||
const char *RW_POLLING_TASK_STRING = "RW_POLLING_TASK";
|
|
||||||
const char *SPI_RTD_COM_IF_STRING = "SPI_RTD_COM_IF";
|
|
||||||
const char *UART_COM_IF_STRING = "UART_COM_IF";
|
const char *UART_COM_IF_STRING = "UART_COM_IF";
|
||||||
const char *I2C_COM_IF_STRING = "I2C_COM_IF";
|
const char *I2C_COM_IF_STRING = "I2C_COM_IF";
|
||||||
const char *CSP_COM_IF_STRING = "CSP_COM_IF";
|
const char *CSP_COM_IF_STRING = "CSP_COM_IF";
|
||||||
|
const char *ACS_BOARD_POLLING_TASK_STRING = "ACS_BOARD_POLLING_TASK";
|
||||||
|
const char *RW_POLLING_TASK_STRING = "RW_POLLING_TASK";
|
||||||
|
const char *SPI_RTD_COM_IF_STRING = "SPI_RTD_COM_IF";
|
||||||
|
const char *SUS_POLLING_TASK_STRING = "SUS_POLLING_TASK";
|
||||||
const char *CCSDS_PACKET_DISTRIBUTOR_STRING = "CCSDS_PACKET_DISTRIBUTOR";
|
const char *CCSDS_PACKET_DISTRIBUTOR_STRING = "CCSDS_PACKET_DISTRIBUTOR";
|
||||||
const char *PUS_PACKET_DISTRIBUTOR_STRING = "PUS_PACKET_DISTRIBUTOR";
|
const char *PUS_PACKET_DISTRIBUTOR_STRING = "PUS_PACKET_DISTRIBUTOR";
|
||||||
const char *TCP_TMTC_SERVER_STRING = "TCP_TMTC_SERVER";
|
const char *TCP_TMTC_SERVER_STRING = "TCP_TMTC_SERVER";
|
||||||
@ -326,16 +328,20 @@ const char *translateObject(object_id_t object) {
|
|||||||
return SCEX_UART_READER_STRING;
|
return SCEX_UART_READER_STRING;
|
||||||
case 0x49020004:
|
case 0x49020004:
|
||||||
return SPI_MAIN_COM_IF_STRING;
|
return SPI_MAIN_COM_IF_STRING;
|
||||||
case 0x49020005:
|
|
||||||
return RW_POLLING_TASK_STRING;
|
|
||||||
case 0x49020006:
|
|
||||||
return SPI_RTD_COM_IF_STRING;
|
|
||||||
case 0x49030003:
|
case 0x49030003:
|
||||||
return UART_COM_IF_STRING;
|
return UART_COM_IF_STRING;
|
||||||
case 0x49040002:
|
case 0x49040002:
|
||||||
return I2C_COM_IF_STRING;
|
return I2C_COM_IF_STRING;
|
||||||
case 0x49050001:
|
case 0x49050001:
|
||||||
return CSP_COM_IF_STRING;
|
return CSP_COM_IF_STRING;
|
||||||
|
case 0x49060004:
|
||||||
|
return ACS_BOARD_POLLING_TASK_STRING;
|
||||||
|
case 0x49060005:
|
||||||
|
return RW_POLLING_TASK_STRING;
|
||||||
|
case 0x49060006:
|
||||||
|
return SPI_RTD_COM_IF_STRING;
|
||||||
|
case 0x49060007:
|
||||||
|
return SUS_POLLING_TASK_STRING;
|
||||||
case 0x50000100:
|
case 0x50000100:
|
||||||
return CCSDS_PACKET_DISTRIBUTOR_STRING;
|
return CCSDS_PACKET_DISTRIBUTOR_STRING;
|
||||||
case 0x50000200:
|
case 0x50000200:
|
||||||
|
@ -10,8 +10,10 @@
|
|||||||
#include <fsfw_hal/linux/spi/SpiCookie.h>
|
#include <fsfw_hal/linux/spi/SpiCookie.h>
|
||||||
#include <linux/callbacks/gpioCallbacks.h>
|
#include <linux/callbacks/gpioCallbacks.h>
|
||||||
#include <linux/devices/Max31865RtdPolling.h>
|
#include <linux/devices/Max31865RtdPolling.h>
|
||||||
|
#include <linux/devices/SusPolling.h>
|
||||||
#include <mission/controller/AcsController.h>
|
#include <mission/controller/AcsController.h>
|
||||||
#include <mission/core/GenericFactory.h>
|
#include <mission/core/GenericFactory.h>
|
||||||
|
#include <mission/devices/LegacySusHandler.h>
|
||||||
#include <mission/devices/Max31865EiveHandler.h>
|
#include <mission/devices/Max31865EiveHandler.h>
|
||||||
#include <mission/devices/ScexDeviceHandler.h>
|
#include <mission/devices/ScexDeviceHandler.h>
|
||||||
#include <mission/devices/SusHandler.h>
|
#include <mission/devices/SusHandler.h>
|
||||||
@ -33,6 +35,7 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
|||||||
PowerSwitchIF& pwrSwitcher, std::string spiDev,
|
PowerSwitchIF& pwrSwitcher, std::string spiDev,
|
||||||
bool swap0And6) {
|
bool swap0And6) {
|
||||||
using namespace gpio;
|
using namespace gpio;
|
||||||
|
new SusPolling(objects::SUS_POLLING_TASK, *spiComIF, *gpioComIF);
|
||||||
GpioCookie* gpioCookieSus = new GpioCookie();
|
GpioCookie* gpioCookieSus = new GpioCookie();
|
||||||
GpioCallback* susgpio = nullptr;
|
GpioCallback* susgpio = nullptr;
|
||||||
|
|
||||||
@ -78,99 +81,100 @@ void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiCo
|
|||||||
#if OBSW_ADD_SUN_SENSORS == 1
|
#if OBSW_ADD_SUN_SENSORS == 1
|
||||||
SusFdir* fdir = nullptr;
|
SusFdir* fdir = nullptr;
|
||||||
std::array<SusHandler*, 12> susHandlers = {};
|
std::array<SusHandler*, 12> susHandlers = {};
|
||||||
SpiCookie* spiCookie = new SpiCookie(addresses::SUS_0, gpioIds::CS_SUS_0, SUS::MAX_CMD_SIZE,
|
SpiCookie* spiCookie =
|
||||||
|
new SpiCookie(addresses::SUS_0, gpioIds::CS_SUS_0, susMax1227::MAX_CMD_SIZE,
|
||||||
spi::SUS_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
spi::SUS_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
||||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::SUS_CS_TIMEOUT);
|
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::SUS_CS_TIMEOUT);
|
||||||
susHandlers[0] =
|
susHandlers[0] =
|
||||||
new SusHandler(objects::SUS_0_N_LOC_XFYFZM_PT_XF, 0, objects::SPI_MAIN_COM_IF, spiCookie);
|
new SusHandler(objects::SUS_0_N_LOC_XFYFZM_PT_XF, 0, objects::SUS_POLLING_TASK, spiCookie);
|
||||||
fdir = new SusFdir(objects::SUS_0_N_LOC_XFYFZM_PT_XF);
|
fdir = new SusFdir(objects::SUS_0_N_LOC_XFYFZM_PT_XF);
|
||||||
susHandlers[0]->setCustomFdir(fdir);
|
susHandlers[0]->setCustomFdir(fdir);
|
||||||
|
|
||||||
spiCookie = new SpiCookie(addresses::SUS_1, gpioIds::CS_SUS_1, SUS::MAX_CMD_SIZE,
|
spiCookie = new SpiCookie(addresses::SUS_1, gpioIds::CS_SUS_1, susMax1227::MAX_CMD_SIZE,
|
||||||
spi::SUS_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
spi::SUS_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
||||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::SUS_CS_TIMEOUT);
|
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::SUS_CS_TIMEOUT);
|
||||||
susHandlers[1] =
|
susHandlers[1] =
|
||||||
new SusHandler(objects::SUS_1_N_LOC_XBYFZM_PT_XB, 1, objects::SPI_MAIN_COM_IF, spiCookie);
|
new SusHandler(objects::SUS_1_N_LOC_XBYFZM_PT_XB, 1, objects::SUS_POLLING_TASK, spiCookie);
|
||||||
fdir = new SusFdir(objects::SUS_1_N_LOC_XBYFZM_PT_XB);
|
fdir = new SusFdir(objects::SUS_1_N_LOC_XBYFZM_PT_XB);
|
||||||
susHandlers[1]->setCustomFdir(fdir);
|
susHandlers[1]->setCustomFdir(fdir);
|
||||||
|
|
||||||
spiCookie = new SpiCookie(addresses::SUS_2, gpioIds::CS_SUS_2, SUS::MAX_CMD_SIZE,
|
spiCookie = new SpiCookie(addresses::SUS_2, gpioIds::CS_SUS_2, susMax1227::MAX_CMD_SIZE,
|
||||||
spi::SUS_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
spi::SUS_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
||||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::SUS_CS_TIMEOUT);
|
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::SUS_CS_TIMEOUT);
|
||||||
susHandlers[2] =
|
susHandlers[2] =
|
||||||
new SusHandler(objects::SUS_2_N_LOC_XFYBZB_PT_YB, 2, objects::SPI_MAIN_COM_IF, spiCookie);
|
new SusHandler(objects::SUS_2_N_LOC_XFYBZB_PT_YB, 2, objects::SUS_POLLING_TASK, spiCookie);
|
||||||
fdir = new SusFdir(objects::SUS_2_N_LOC_XFYBZB_PT_YB);
|
fdir = new SusFdir(objects::SUS_2_N_LOC_XFYBZB_PT_YB);
|
||||||
susHandlers[2]->setCustomFdir(fdir);
|
susHandlers[2]->setCustomFdir(fdir);
|
||||||
|
|
||||||
spiCookie = new SpiCookie(addresses::SUS_3, gpioIds::CS_SUS_3, SUS::MAX_CMD_SIZE,
|
spiCookie = new SpiCookie(addresses::SUS_3, gpioIds::CS_SUS_3, susMax1227::MAX_CMD_SIZE,
|
||||||
spi::SUS_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
spi::SUS_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
||||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::SUS_CS_TIMEOUT);
|
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::SUS_CS_TIMEOUT);
|
||||||
susHandlers[3] =
|
susHandlers[3] =
|
||||||
new SusHandler(objects::SUS_3_N_LOC_XFYBZF_PT_YF, 3, objects::SPI_MAIN_COM_IF, spiCookie);
|
new SusHandler(objects::SUS_3_N_LOC_XFYBZF_PT_YF, 3, objects::SUS_POLLING_TASK, spiCookie);
|
||||||
fdir = new SusFdir(objects::SUS_3_N_LOC_XFYBZF_PT_YF);
|
fdir = new SusFdir(objects::SUS_3_N_LOC_XFYBZF_PT_YF);
|
||||||
susHandlers[3]->setCustomFdir(fdir);
|
susHandlers[3]->setCustomFdir(fdir);
|
||||||
|
|
||||||
spiCookie = new SpiCookie(addresses::SUS_4, gpioIds::CS_SUS_4, SUS::MAX_CMD_SIZE,
|
spiCookie = new SpiCookie(addresses::SUS_4, gpioIds::CS_SUS_4, susMax1227::MAX_CMD_SIZE,
|
||||||
spi::SUS_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
spi::SUS_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
||||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::SUS_CS_TIMEOUT);
|
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::SUS_CS_TIMEOUT);
|
||||||
susHandlers[4] =
|
susHandlers[4] =
|
||||||
new SusHandler(objects::SUS_4_N_LOC_XMYFZF_PT_ZF, 4, objects::SPI_MAIN_COM_IF, spiCookie);
|
new SusHandler(objects::SUS_4_N_LOC_XMYFZF_PT_ZF, 4, objects::SUS_POLLING_TASK, spiCookie);
|
||||||
fdir = new SusFdir(objects::SUS_4_N_LOC_XMYFZF_PT_ZF);
|
fdir = new SusFdir(objects::SUS_4_N_LOC_XMYFZF_PT_ZF);
|
||||||
susHandlers[4]->setCustomFdir(fdir);
|
susHandlers[4]->setCustomFdir(fdir);
|
||||||
|
|
||||||
spiCookie = new SpiCookie(addresses::SUS_5, gpioIds::CS_SUS_5, SUS::MAX_CMD_SIZE,
|
spiCookie = new SpiCookie(addresses::SUS_5, gpioIds::CS_SUS_5, susMax1227::MAX_CMD_SIZE,
|
||||||
spi::SUS_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
spi::SUS_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
||||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::SUS_CS_TIMEOUT);
|
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::SUS_CS_TIMEOUT);
|
||||||
susHandlers[5] =
|
susHandlers[5] =
|
||||||
new SusHandler(objects::SUS_5_N_LOC_XFYMZB_PT_ZB, 5, objects::SPI_MAIN_COM_IF, spiCookie);
|
new SusHandler(objects::SUS_5_N_LOC_XFYMZB_PT_ZB, 5, objects::SUS_POLLING_TASK, spiCookie);
|
||||||
fdir = new SusFdir(objects::SUS_5_N_LOC_XFYMZB_PT_ZB);
|
fdir = new SusFdir(objects::SUS_5_N_LOC_XFYMZB_PT_ZB);
|
||||||
susHandlers[5]->setCustomFdir(fdir);
|
susHandlers[5]->setCustomFdir(fdir);
|
||||||
|
|
||||||
spiCookie = new SpiCookie(addresses::SUS_6, gpioIds::CS_SUS_6, SUS::MAX_CMD_SIZE,
|
spiCookie = new SpiCookie(addresses::SUS_6, gpioIds::CS_SUS_6, susMax1227::MAX_CMD_SIZE,
|
||||||
spi::SUS_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
spi::SUS_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
||||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::SUS_CS_TIMEOUT);
|
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::SUS_CS_TIMEOUT);
|
||||||
susHandlers[6] =
|
susHandlers[6] =
|
||||||
new SusHandler(objects::SUS_6_R_LOC_XFYBZM_PT_XF, 6, objects::SPI_MAIN_COM_IF, spiCookie);
|
new SusHandler(objects::SUS_6_R_LOC_XFYBZM_PT_XF, 6, objects::SUS_POLLING_TASK, spiCookie);
|
||||||
fdir = new SusFdir(objects::SUS_6_R_LOC_XFYBZM_PT_XF);
|
fdir = new SusFdir(objects::SUS_6_R_LOC_XFYBZM_PT_XF);
|
||||||
susHandlers[6]->setCustomFdir(fdir);
|
susHandlers[6]->setCustomFdir(fdir);
|
||||||
|
|
||||||
spiCookie = new SpiCookie(addresses::SUS_7, gpioIds::CS_SUS_7, SUS::MAX_CMD_SIZE,
|
spiCookie = new SpiCookie(addresses::SUS_7, gpioIds::CS_SUS_7, susMax1227::MAX_CMD_SIZE,
|
||||||
spi::SUS_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
spi::SUS_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
||||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::SUS_CS_TIMEOUT);
|
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::SUS_CS_TIMEOUT);
|
||||||
susHandlers[7] =
|
susHandlers[7] =
|
||||||
new SusHandler(objects::SUS_7_R_LOC_XBYBZM_PT_XB, 7, objects::SPI_MAIN_COM_IF, spiCookie);
|
new SusHandler(objects::SUS_7_R_LOC_XBYBZM_PT_XB, 7, objects::SUS_POLLING_TASK, spiCookie);
|
||||||
fdir = new SusFdir(objects::SUS_7_R_LOC_XBYBZM_PT_XB);
|
fdir = new SusFdir(objects::SUS_7_R_LOC_XBYBZM_PT_XB);
|
||||||
susHandlers[7]->setCustomFdir(fdir);
|
susHandlers[7]->setCustomFdir(fdir);
|
||||||
|
|
||||||
spiCookie = new SpiCookie(addresses::SUS_8, gpioIds::CS_SUS_8, SUS::MAX_CMD_SIZE,
|
spiCookie = new SpiCookie(addresses::SUS_8, gpioIds::CS_SUS_8, susMax1227::MAX_CMD_SIZE,
|
||||||
spi::SUS_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
spi::SUS_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
||||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::SUS_CS_TIMEOUT);
|
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::SUS_CS_TIMEOUT);
|
||||||
susHandlers[8] =
|
susHandlers[8] =
|
||||||
new SusHandler(objects::SUS_8_R_LOC_XBYBZB_PT_YB, 8, objects::SPI_MAIN_COM_IF, spiCookie);
|
new SusHandler(objects::SUS_8_R_LOC_XBYBZB_PT_YB, 8, objects::SUS_POLLING_TASK, spiCookie);
|
||||||
fdir = new SusFdir(objects::SUS_8_R_LOC_XBYBZB_PT_YB);
|
fdir = new SusFdir(objects::SUS_8_R_LOC_XBYBZB_PT_YB);
|
||||||
susHandlers[8]->setCustomFdir(fdir);
|
susHandlers[8]->setCustomFdir(fdir);
|
||||||
|
|
||||||
spiCookie = new SpiCookie(addresses::SUS_9, gpioIds::CS_SUS_9, SUS::MAX_CMD_SIZE,
|
spiCookie = new SpiCookie(addresses::SUS_9, gpioIds::CS_SUS_9, susMax1227::MAX_CMD_SIZE,
|
||||||
spi::SUS_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
spi::SUS_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
||||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::SUS_CS_TIMEOUT);
|
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::SUS_CS_TIMEOUT);
|
||||||
susHandlers[9] =
|
susHandlers[9] =
|
||||||
new SusHandler(objects::SUS_9_R_LOC_XBYBZB_PT_YF, 9, objects::SPI_MAIN_COM_IF, spiCookie);
|
new SusHandler(objects::SUS_9_R_LOC_XBYBZB_PT_YF, 9, objects::SUS_POLLING_TASK, spiCookie);
|
||||||
fdir = new SusFdir(objects::SUS_9_R_LOC_XBYBZB_PT_YF);
|
fdir = new SusFdir(objects::SUS_9_R_LOC_XBYBZB_PT_YF);
|
||||||
susHandlers[9]->setCustomFdir(fdir);
|
susHandlers[9]->setCustomFdir(fdir);
|
||||||
|
|
||||||
spiCookie = new SpiCookie(addresses::SUS_10, gpioIds::CS_SUS_10, SUS::MAX_CMD_SIZE,
|
spiCookie = new SpiCookie(addresses::SUS_10, gpioIds::CS_SUS_10, susMax1227::MAX_CMD_SIZE,
|
||||||
spi::SUS_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
spi::SUS_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
||||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::SUS_CS_TIMEOUT);
|
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::SUS_CS_TIMEOUT);
|
||||||
susHandlers[10] =
|
susHandlers[10] =
|
||||||
new SusHandler(objects::SUS_10_N_LOC_XMYBZF_PT_ZF, 10, objects::SPI_MAIN_COM_IF, spiCookie);
|
new SusHandler(objects::SUS_10_N_LOC_XMYBZF_PT_ZF, 10, objects::SUS_POLLING_TASK, spiCookie);
|
||||||
fdir = new SusFdir(objects::SUS_10_N_LOC_XMYBZF_PT_ZF);
|
fdir = new SusFdir(objects::SUS_10_N_LOC_XMYBZF_PT_ZF);
|
||||||
susHandlers[10]->setCustomFdir(fdir);
|
susHandlers[10]->setCustomFdir(fdir);
|
||||||
|
|
||||||
spiCookie = new SpiCookie(addresses::SUS_11, gpioIds::CS_SUS_11, SUS::MAX_CMD_SIZE,
|
spiCookie = new SpiCookie(addresses::SUS_11, gpioIds::CS_SUS_11, susMax1227::MAX_CMD_SIZE,
|
||||||
spi::SUS_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
spi::SUS_MAX_1227_MODE, spi::SUS_MAX1227_SPI_FREQ);
|
||||||
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::SUS_CS_TIMEOUT);
|
spiCookie->setMutexParams(MutexIF::TimeoutType::WAITING, spi::SUS_CS_TIMEOUT);
|
||||||
susHandlers[11] =
|
susHandlers[11] =
|
||||||
new SusHandler(objects::SUS_11_R_LOC_XBYMZB_PT_ZB, 11, objects::SPI_MAIN_COM_IF, spiCookie);
|
new SusHandler(objects::SUS_11_R_LOC_XBYMZB_PT_ZB, 11, objects::SUS_POLLING_TASK, spiCookie);
|
||||||
fdir = new SusFdir(objects::SUS_11_R_LOC_XBYMZB_PT_ZB);
|
fdir = new SusFdir(objects::SUS_11_R_LOC_XBYMZB_PT_ZB);
|
||||||
susHandlers[11]->setCustomFdir(fdir);
|
susHandlers[11]->setCustomFdir(fdir);
|
||||||
|
|
||||||
|
@ -24,7 +24,6 @@ class AcsBoardPolling : public SystemObject,
|
|||||||
MutexIF* ipcLock;
|
MutexIF* ipcLock;
|
||||||
SemaphoreIF* semaphore;
|
SemaphoreIF* semaphore;
|
||||||
std::array<uint8_t, 32> cmdBuf;
|
std::array<uint8_t, 32> cmdBuf;
|
||||||
std::array<uint8_t, 32> replyBuf;
|
|
||||||
|
|
||||||
struct DevBase {
|
struct DevBase {
|
||||||
SpiCookie* cookie = nullptr;
|
SpiCookie* cookie = nullptr;
|
||||||
|
@ -7,6 +7,7 @@ target_sources(
|
|||||||
PRIVATE Max31865RtdPolling.cpp
|
PRIVATE Max31865RtdPolling.cpp
|
||||||
ScexUartReader.cpp
|
ScexUartReader.cpp
|
||||||
ImtqPollingTask.cpp
|
ImtqPollingTask.cpp
|
||||||
|
SusPolling.cpp
|
||||||
ScexDleParser.cpp
|
ScexDleParser.cpp
|
||||||
ScexHelper.cpp
|
ScexHelper.cpp
|
||||||
RwPollingTask.cpp
|
RwPollingTask.cpp
|
||||||
|
220
linux/devices/SusPolling.cpp
Normal file
220
linux/devices/SusPolling.cpp
Normal file
@ -0,0 +1,220 @@
|
|||||||
|
#include "SusPolling.h"
|
||||||
|
|
||||||
|
#include <fsfw/tasks/SemaphoreFactory.h>
|
||||||
|
#include <fsfw/tasks/TaskFactory.h>
|
||||||
|
#include <fsfw/timemanager/Stopwatch.h>
|
||||||
|
#include <fsfw_hal/linux/spi/SpiCookie.h>
|
||||||
|
#include <mission/controller/acs/AcsParameters.h>
|
||||||
|
#include <mission/devices/max1227.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include "mission/devices/devicedefinitions/susMax1227Helpers.h"
|
||||||
|
|
||||||
|
using namespace returnvalue;
|
||||||
|
|
||||||
|
SusPolling::SusPolling(object_id_t objectId, SpiComIF& spiComIF, GpioIF& gpioIF)
|
||||||
|
: SystemObject(objectId), spiComIF(spiComIF), gpioIF(gpioIF) {
|
||||||
|
semaphore = SemaphoreFactory::instance()->createBinarySemaphore();
|
||||||
|
semaphore->acquire();
|
||||||
|
ipcLock = MutexFactory::instance()->createMutex();
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t SusPolling::performOperation(uint8_t operationCode) {
|
||||||
|
while (true) {
|
||||||
|
ipcLock->lockMutex();
|
||||||
|
state = InternalState::IDLE;
|
||||||
|
ipcLock->unlockMutex();
|
||||||
|
semaphore->acquire();
|
||||||
|
// Give SUS handlers a chance to submit all requests.
|
||||||
|
TaskFactory::delayTask(2);
|
||||||
|
{
|
||||||
|
// Takes 4-5 ms in debug mode.
|
||||||
|
// Stopwatch watch;
|
||||||
|
handleSusPolling();
|
||||||
|
}
|
||||||
|
// Protection against tardy tasks unlocking the thread again immediately.
|
||||||
|
TaskFactory::delayTask(20);
|
||||||
|
}
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t SusPolling::initialize() { return OK; }
|
||||||
|
|
||||||
|
ReturnValue_t SusPolling::initializeInterface(CookieIF* cookie) {
|
||||||
|
auto* spiCookie = dynamic_cast<SpiCookie*>(cookie);
|
||||||
|
if (spiCookie == nullptr) {
|
||||||
|
return FAILED;
|
||||||
|
}
|
||||||
|
int susIdx = addressToIndex(spiCookie->getSpiAddress());
|
||||||
|
if (susIdx < 0) {
|
||||||
|
return FAILED;
|
||||||
|
}
|
||||||
|
susDevs[susIdx].cookie = spiCookie;
|
||||||
|
return spiComIF.initializeInterface(cookie);
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t SusPolling::sendMessage(CookieIF* cookie, const uint8_t* sendData, size_t sendLen) {
|
||||||
|
auto* spiCookie = dynamic_cast<SpiCookie*>(cookie);
|
||||||
|
if (spiCookie == nullptr) {
|
||||||
|
return FAILED;
|
||||||
|
}
|
||||||
|
int susIdx = addressToIndex(spiCookie->getSpiAddress());
|
||||||
|
if (susIdx < 0) {
|
||||||
|
return FAILED;
|
||||||
|
}
|
||||||
|
if (sendLen != sizeof(acs::SusRequest)) {
|
||||||
|
return FAILED;
|
||||||
|
}
|
||||||
|
const auto* susReq = reinterpret_cast<const acs::SusRequest*>(sendData);
|
||||||
|
MutexGuard mg(ipcLock);
|
||||||
|
if (susDevs[susIdx].mode != susReq->mode) {
|
||||||
|
if (susReq->mode == acs::SimpleSensorMode::NORMAL) {
|
||||||
|
susDevs[susIdx].performStartup = true;
|
||||||
|
} else {
|
||||||
|
susDevs[susIdx].ownReply.cfgWasSet = false;
|
||||||
|
susDevs[susIdx].ownReply.dataWasSet = false;
|
||||||
|
}
|
||||||
|
susDevs[susIdx].mode = susReq->mode;
|
||||||
|
}
|
||||||
|
if (state == InternalState::IDLE) {
|
||||||
|
state = InternalState::BUSY;
|
||||||
|
semaphore->release();
|
||||||
|
}
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t SusPolling::getSendSuccess(CookieIF* cookie) { return OK; }
|
||||||
|
|
||||||
|
ReturnValue_t SusPolling::requestReceiveMessage(CookieIF* cookie, size_t requestLen) { return OK; }
|
||||||
|
|
||||||
|
ReturnValue_t SusPolling::readReceivedMessage(CookieIF* cookie, uint8_t** buffer, size_t* size) {
|
||||||
|
auto* spiCookie = dynamic_cast<SpiCookie*>(cookie);
|
||||||
|
if (spiCookie == nullptr) {
|
||||||
|
return FAILED;
|
||||||
|
}
|
||||||
|
int susIdx = addressToIndex(spiCookie->getSpiAddress());
|
||||||
|
if (susIdx < 0) {
|
||||||
|
return FAILED;
|
||||||
|
}
|
||||||
|
MutexGuard mg(ipcLock);
|
||||||
|
std::memcpy(&susDevs[susIdx].readerReply, &susDevs[susIdx].ownReply, sizeof(acs::SusReply));
|
||||||
|
*buffer = reinterpret_cast<uint8_t*>(&susDevs[susIdx].readerReply);
|
||||||
|
*size = sizeof(acs::SusReply);
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t SusPolling::handleSusPolling() {
|
||||||
|
ReturnValue_t result;
|
||||||
|
acs::SimpleSensorMode modes[12];
|
||||||
|
bool performStartups[12]{};
|
||||||
|
bool cfgsWereSet[12]{};
|
||||||
|
uint8_t idx = 0;
|
||||||
|
{
|
||||||
|
MutexGuard mg(ipcLock);
|
||||||
|
for (idx = 0; idx < 12; idx++) {
|
||||||
|
modes[idx] = susDevs[idx].mode;
|
||||||
|
performStartups[idx] = susDevs[idx].performStartup;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (idx = 0; idx < 12; idx++) {
|
||||||
|
if (modes[idx] == acs::SimpleSensorMode::NORMAL) {
|
||||||
|
if (performStartups[idx]) {
|
||||||
|
// Startup handling.
|
||||||
|
cmdBuf[0] = susMax1227::SETUP_INT_CLOKED;
|
||||||
|
result = spiComIF.sendMessage(susDevs[idx].cookie, cmdBuf.data(), 1);
|
||||||
|
if (result != OK) {
|
||||||
|
susDevs[idx].replyResult = result;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
MutexGuard mg(ipcLock);
|
||||||
|
susDevs[idx].ownReply.cfgWasSet = true;
|
||||||
|
cfgsWereSet[idx] = true;
|
||||||
|
susDevs[idx].performStartup = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (idx = 0; idx < 12; idx++) {
|
||||||
|
if (modes[idx] == acs::SimpleSensorMode::NORMAL and cfgsWereSet[idx]) {
|
||||||
|
// Regular sensor polling.
|
||||||
|
cmdBuf[0] = max1227::buildResetByte(true);
|
||||||
|
cmdBuf[1] = susMax1227::CONVERSION;
|
||||||
|
result = spiComIF.sendMessage(susDevs[idx].cookie, cmdBuf.data(), 2);
|
||||||
|
if (result != OK) {
|
||||||
|
susDevs[idx].replyResult = result;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Internal conversion time is 3.5 us
|
||||||
|
usleep(4);
|
||||||
|
|
||||||
|
for (idx = 0; idx < 12; idx++) {
|
||||||
|
if (modes[idx] == acs::SimpleSensorMode::NORMAL and cfgsWereSet[idx]) {
|
||||||
|
std::memset(cmdBuf.data(), 0, susMax1227::SIZE_READ_INT_CONVERSIONS);
|
||||||
|
result = spiComIF.sendMessage(susDevs[idx].cookie, cmdBuf.data(),
|
||||||
|
susMax1227::SIZE_READ_INT_CONVERSIONS);
|
||||||
|
if (result != OK) {
|
||||||
|
susDevs[idx].replyResult = result;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
result = spiComIF.readReceivedMessage(susDevs[idx].cookie, &rawReply, &dummy);
|
||||||
|
if (result != OK) {
|
||||||
|
susDevs[idx].replyResult = result;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
MutexGuard mg(ipcLock);
|
||||||
|
susDevs[idx].ownReply.tempRaw = ((rawReply[0] & 0x0f) << 8) | rawReply[1];
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
int SusPolling::addressToIndex(address_t addr) {
|
||||||
|
switch (addr) {
|
||||||
|
case (addresses::SUS_0):
|
||||||
|
return 0;
|
||||||
|
break;
|
||||||
|
case (addresses::SUS_1):
|
||||||
|
return 1;
|
||||||
|
break;
|
||||||
|
case (addresses::SUS_2):
|
||||||
|
return 2;
|
||||||
|
break;
|
||||||
|
case (addresses::SUS_3):
|
||||||
|
return 3;
|
||||||
|
break;
|
||||||
|
case (addresses::SUS_4):
|
||||||
|
return 4;
|
||||||
|
break;
|
||||||
|
case (addresses::SUS_5):
|
||||||
|
return 5;
|
||||||
|
break;
|
||||||
|
case (addresses::SUS_6):
|
||||||
|
return 6;
|
||||||
|
break;
|
||||||
|
case (addresses::SUS_7):
|
||||||
|
return 7;
|
||||||
|
break;
|
||||||
|
case (addresses::SUS_8):
|
||||||
|
return 8;
|
||||||
|
break;
|
||||||
|
case (addresses::SUS_9):
|
||||||
|
return 9;
|
||||||
|
break;
|
||||||
|
case (addresses::SUS_10):
|
||||||
|
return 10;
|
||||||
|
break;
|
||||||
|
case (addresses::SUS_11):
|
||||||
|
return 11;
|
||||||
|
break;
|
||||||
|
default: {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
52
linux/devices/SusPolling.h
Normal file
52
linux/devices/SusPolling.h
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
#ifndef LINUX_DEVICES_SUSPOLLING_H_
|
||||||
|
#define LINUX_DEVICES_SUSPOLLING_H_
|
||||||
|
|
||||||
|
#include <fsfw/devicehandlers/DeviceCommunicationIF.h>
|
||||||
|
#include <fsfw/objectmanager/SystemObject.h>
|
||||||
|
#include <fsfw/tasks/ExecutableObjectIF.h>
|
||||||
|
#include <fsfw/tasks/SemaphoreIF.h>
|
||||||
|
#include <fsfw_hal/linux/spi/SpiComIF.h>
|
||||||
|
|
||||||
|
#include "devices/addresses.h"
|
||||||
|
#include "mission/devices/devicedefinitions/acsPolling.h"
|
||||||
|
|
||||||
|
class SusPolling : public SystemObject, public ExecutableObjectIF, public DeviceCommunicationIF {
|
||||||
|
public:
|
||||||
|
SusPolling(object_id_t objectId, SpiComIF& spiComIF, GpioIF& gpioIF);
|
||||||
|
|
||||||
|
ReturnValue_t performOperation(uint8_t operationCode) override;
|
||||||
|
ReturnValue_t initialize() override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
enum class InternalState { IDLE, BUSY } state = InternalState::IDLE;
|
||||||
|
|
||||||
|
struct SusDev {
|
||||||
|
SpiCookie* cookie = nullptr;
|
||||||
|
bool performStartup = false;
|
||||||
|
acs::SimpleSensorMode mode = acs::SimpleSensorMode::OFF;
|
||||||
|
ReturnValue_t replyResult = returnvalue::OK;
|
||||||
|
acs::SusReply ownReply{};
|
||||||
|
acs::SusReply readerReply{};
|
||||||
|
};
|
||||||
|
|
||||||
|
MutexIF* ipcLock;
|
||||||
|
SemaphoreIF* semaphore;
|
||||||
|
uint8_t* rawReply = nullptr;
|
||||||
|
size_t dummy = 0;
|
||||||
|
SpiComIF& spiComIF;
|
||||||
|
GpioIF& gpioIF;
|
||||||
|
|
||||||
|
std::array<SusDev, 12> susDevs;
|
||||||
|
std::array<uint8_t, 32> cmdBuf;
|
||||||
|
|
||||||
|
ReturnValue_t initializeInterface(CookieIF* cookie) override;
|
||||||
|
ReturnValue_t sendMessage(CookieIF* cookie, const uint8_t* sendData, size_t sendLen) override;
|
||||||
|
ReturnValue_t getSendSuccess(CookieIF* cookie) override;
|
||||||
|
ReturnValue_t requestReceiveMessage(CookieIF* cookie, size_t requestLen) override;
|
||||||
|
ReturnValue_t readReceivedMessage(CookieIF* cookie, uint8_t** buffer, size_t* size) override;
|
||||||
|
|
||||||
|
ReturnValue_t handleSusPolling();
|
||||||
|
static int addressToIndex(address_t addr);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* LINUX_DEVICES_SUSPOLLING_H_ */
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated event translation file. Contains 263 translations.
|
* @brief Auto-generated event translation file. Contains 267 translations.
|
||||||
* @details
|
* @details
|
||||||
* Generated on: 2023-02-24 16:57:00
|
* Generated on: 2023-03-01 18:34:32
|
||||||
*/
|
*/
|
||||||
#include "translateEvents.h"
|
#include "translateEvents.h"
|
||||||
|
|
||||||
@ -158,6 +158,8 @@ const char *LOST_BIT_LOCK_PDEC_STRING = "LOST_BIT_LOCK_PDEC";
|
|||||||
const char *TOO_MANY_IRQS_STRING = "TOO_MANY_IRQS";
|
const char *TOO_MANY_IRQS_STRING = "TOO_MANY_IRQS";
|
||||||
const char *POLL_SYSCALL_ERROR_PDEC_STRING = "POLL_SYSCALL_ERROR_PDEC";
|
const char *POLL_SYSCALL_ERROR_PDEC_STRING = "POLL_SYSCALL_ERROR_PDEC";
|
||||||
const char *WRITE_SYSCALL_ERROR_PDEC_STRING = "WRITE_SYSCALL_ERROR_PDEC";
|
const char *WRITE_SYSCALL_ERROR_PDEC_STRING = "WRITE_SYSCALL_ERROR_PDEC";
|
||||||
|
const char *PDEC_RESET_FAILED_STRING = "PDEC_RESET_FAILED";
|
||||||
|
const char *OPEN_IRQ_FILE_FAILED_STRING = "OPEN_IRQ_FILE_FAILED";
|
||||||
const char *IMAGE_UPLOAD_FAILED_STRING = "IMAGE_UPLOAD_FAILED";
|
const char *IMAGE_UPLOAD_FAILED_STRING = "IMAGE_UPLOAD_FAILED";
|
||||||
const char *IMAGE_DOWNLOAD_FAILED_STRING = "IMAGE_DOWNLOAD_FAILED";
|
const char *IMAGE_DOWNLOAD_FAILED_STRING = "IMAGE_DOWNLOAD_FAILED";
|
||||||
const char *IMAGE_UPLOAD_SUCCESSFUL_STRING = "IMAGE_UPLOAD_SUCCESSFUL";
|
const char *IMAGE_UPLOAD_SUCCESSFUL_STRING = "IMAGE_UPLOAD_SUCCESSFUL";
|
||||||
@ -255,7 +257,6 @@ const char *REBOOT_HW_STRING = "REBOOT_HW";
|
|||||||
const char *NO_SD_CARD_ACTIVE_STRING = "NO_SD_CARD_ACTIVE";
|
const char *NO_SD_CARD_ACTIVE_STRING = "NO_SD_CARD_ACTIVE";
|
||||||
const char *VERSION_INFO_STRING = "VERSION_INFO";
|
const char *VERSION_INFO_STRING = "VERSION_INFO";
|
||||||
const char *CURRENT_IMAGE_INFO_STRING = "CURRENT_IMAGE_INFO";
|
const char *CURRENT_IMAGE_INFO_STRING = "CURRENT_IMAGE_INFO";
|
||||||
const char *POSSIBLE_FILE_CORRUPTION_STRING = "POSSIBLE_FILE_CORRUPTION";
|
|
||||||
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
|
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
|
||||||
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
|
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
|
||||||
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
|
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
|
||||||
@ -263,6 +264,9 @@ const char *PLOC_OVERHEATING_STRING = "PLOC_OVERHEATING";
|
|||||||
const char *OBC_OVERHEATING_STRING = "OBC_OVERHEATING";
|
const char *OBC_OVERHEATING_STRING = "OBC_OVERHEATING";
|
||||||
const char *HPA_OVERHEATING_STRING = "HPA_OVERHEATING";
|
const char *HPA_OVERHEATING_STRING = "HPA_OVERHEATING";
|
||||||
const char *PLPCDU_OVERHEATING_STRING = "PLPCDU_OVERHEATING";
|
const char *PLPCDU_OVERHEATING_STRING = "PLPCDU_OVERHEATING";
|
||||||
|
const char *TX_TIMER_EXPIRED_STRING = "TX_TIMER_EXPIRED";
|
||||||
|
const char *BIT_LOCK_TX_ON_STRING = "BIT_LOCK_TX_ON";
|
||||||
|
const char *POSSIBLE_FILE_CORRUPTION_STRING = "POSSIBLE_FILE_CORRUPTION";
|
||||||
|
|
||||||
const char *translateEvents(Event event) {
|
const char *translateEvents(Event event) {
|
||||||
switch ((event & 0xFFFF)) {
|
switch ((event & 0xFFFF)) {
|
||||||
@ -572,6 +576,10 @@ const char *translateEvents(Event event) {
|
|||||||
return POLL_SYSCALL_ERROR_PDEC_STRING;
|
return POLL_SYSCALL_ERROR_PDEC_STRING;
|
||||||
case (12409):
|
case (12409):
|
||||||
return WRITE_SYSCALL_ERROR_PDEC_STRING;
|
return WRITE_SYSCALL_ERROR_PDEC_STRING;
|
||||||
|
case (12410):
|
||||||
|
return PDEC_RESET_FAILED_STRING;
|
||||||
|
case (12411):
|
||||||
|
return OPEN_IRQ_FILE_FAILED_STRING;
|
||||||
case (12500):
|
case (12500):
|
||||||
return IMAGE_UPLOAD_FAILED_STRING;
|
return IMAGE_UPLOAD_FAILED_STRING;
|
||||||
case (12501):
|
case (12501):
|
||||||
@ -767,21 +775,25 @@ const char *translateEvents(Event event) {
|
|||||||
case (14006):
|
case (14006):
|
||||||
return CURRENT_IMAGE_INFO_STRING;
|
return CURRENT_IMAGE_INFO_STRING;
|
||||||
case (14100):
|
case (14100):
|
||||||
return POSSIBLE_FILE_CORRUPTION_STRING;
|
|
||||||
case (14200):
|
|
||||||
return NO_VALID_SENSOR_TEMPERATURE_STRING;
|
return NO_VALID_SENSOR_TEMPERATURE_STRING;
|
||||||
case (14201):
|
case (14101):
|
||||||
return NO_HEALTHY_HEATER_AVAILABLE_STRING;
|
return NO_HEALTHY_HEATER_AVAILABLE_STRING;
|
||||||
case (14202):
|
case (14102):
|
||||||
return SYRLINKS_OVERHEATING_STRING;
|
return SYRLINKS_OVERHEATING_STRING;
|
||||||
case (14203):
|
case (14103):
|
||||||
return PLOC_OVERHEATING_STRING;
|
return PLOC_OVERHEATING_STRING;
|
||||||
case (14204):
|
case (14104):
|
||||||
return OBC_OVERHEATING_STRING;
|
return OBC_OVERHEATING_STRING;
|
||||||
case (14205):
|
case (14105):
|
||||||
return HPA_OVERHEATING_STRING;
|
return HPA_OVERHEATING_STRING;
|
||||||
case (14206):
|
case (14106):
|
||||||
return PLPCDU_OVERHEATING_STRING;
|
return PLPCDU_OVERHEATING_STRING;
|
||||||
|
case (14201):
|
||||||
|
return TX_TIMER_EXPIRED_STRING;
|
||||||
|
case (14202):
|
||||||
|
return BIT_LOCK_TX_ON_STRING;
|
||||||
|
case (14300):
|
||||||
|
return POSSIBLE_FILE_CORRUPTION_STRING;
|
||||||
default:
|
default:
|
||||||
return "UNKNOWN_EVENT";
|
return "UNKNOWN_EVENT";
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated object translation file.
|
* @brief Auto-generated object translation file.
|
||||||
* @details
|
* @details
|
||||||
* Contains 159 translations.
|
* Contains 161 translations.
|
||||||
* Generated on: 2023-02-24 16:57:00
|
* Generated on: 2023-03-01 18:34:32
|
||||||
*/
|
*/
|
||||||
#include "translateObjects.h"
|
#include "translateObjects.h"
|
||||||
|
|
||||||
@ -85,11 +85,13 @@ const char *ARDUINO_COM_IF_STRING = "ARDUINO_COM_IF";
|
|||||||
const char *GPIO_IF_STRING = "GPIO_IF";
|
const char *GPIO_IF_STRING = "GPIO_IF";
|
||||||
const char *SCEX_UART_READER_STRING = "SCEX_UART_READER";
|
const char *SCEX_UART_READER_STRING = "SCEX_UART_READER";
|
||||||
const char *SPI_MAIN_COM_IF_STRING = "SPI_MAIN_COM_IF";
|
const char *SPI_MAIN_COM_IF_STRING = "SPI_MAIN_COM_IF";
|
||||||
const char *RW_POLLING_TASK_STRING = "RW_POLLING_TASK";
|
|
||||||
const char *SPI_RTD_COM_IF_STRING = "SPI_RTD_COM_IF";
|
|
||||||
const char *UART_COM_IF_STRING = "UART_COM_IF";
|
const char *UART_COM_IF_STRING = "UART_COM_IF";
|
||||||
const char *I2C_COM_IF_STRING = "I2C_COM_IF";
|
const char *I2C_COM_IF_STRING = "I2C_COM_IF";
|
||||||
const char *CSP_COM_IF_STRING = "CSP_COM_IF";
|
const char *CSP_COM_IF_STRING = "CSP_COM_IF";
|
||||||
|
const char *ACS_BOARD_POLLING_TASK_STRING = "ACS_BOARD_POLLING_TASK";
|
||||||
|
const char *RW_POLLING_TASK_STRING = "RW_POLLING_TASK";
|
||||||
|
const char *SPI_RTD_COM_IF_STRING = "SPI_RTD_COM_IF";
|
||||||
|
const char *SUS_POLLING_TASK_STRING = "SUS_POLLING_TASK";
|
||||||
const char *CCSDS_PACKET_DISTRIBUTOR_STRING = "CCSDS_PACKET_DISTRIBUTOR";
|
const char *CCSDS_PACKET_DISTRIBUTOR_STRING = "CCSDS_PACKET_DISTRIBUTOR";
|
||||||
const char *PUS_PACKET_DISTRIBUTOR_STRING = "PUS_PACKET_DISTRIBUTOR";
|
const char *PUS_PACKET_DISTRIBUTOR_STRING = "PUS_PACKET_DISTRIBUTOR";
|
||||||
const char *TCP_TMTC_SERVER_STRING = "TCP_TMTC_SERVER";
|
const char *TCP_TMTC_SERVER_STRING = "TCP_TMTC_SERVER";
|
||||||
@ -326,16 +328,20 @@ const char *translateObject(object_id_t object) {
|
|||||||
return SCEX_UART_READER_STRING;
|
return SCEX_UART_READER_STRING;
|
||||||
case 0x49020004:
|
case 0x49020004:
|
||||||
return SPI_MAIN_COM_IF_STRING;
|
return SPI_MAIN_COM_IF_STRING;
|
||||||
case 0x49020005:
|
|
||||||
return RW_POLLING_TASK_STRING;
|
|
||||||
case 0x49020006:
|
|
||||||
return SPI_RTD_COM_IF_STRING;
|
|
||||||
case 0x49030003:
|
case 0x49030003:
|
||||||
return UART_COM_IF_STRING;
|
return UART_COM_IF_STRING;
|
||||||
case 0x49040002:
|
case 0x49040002:
|
||||||
return I2C_COM_IF_STRING;
|
return I2C_COM_IF_STRING;
|
||||||
case 0x49050001:
|
case 0x49050001:
|
||||||
return CSP_COM_IF_STRING;
|
return CSP_COM_IF_STRING;
|
||||||
|
case 0x49060004:
|
||||||
|
return ACS_BOARD_POLLING_TASK_STRING;
|
||||||
|
case 0x49060005:
|
||||||
|
return RW_POLLING_TASK_STRING;
|
||||||
|
case 0x49060006:
|
||||||
|
return SPI_RTD_COM_IF_STRING;
|
||||||
|
case 0x49060007:
|
||||||
|
return SUS_POLLING_TASK_STRING;
|
||||||
case 0x50000100:
|
case 0x50000100:
|
||||||
return CCSDS_PACKET_DISTRIBUTOR_STRING;
|
return CCSDS_PACKET_DISTRIBUTOR_STRING;
|
||||||
case 0x50000200:
|
case 0x50000200:
|
||||||
|
@ -105,8 +105,7 @@ class PdecHandler : public SystemObject,
|
|||||||
//! [EXPORT] : [COMMENT] Failed to pull PDEC reset to low
|
//! [EXPORT] : [COMMENT] Failed to pull PDEC reset to low
|
||||||
static constexpr Event PDEC_RESET_FAILED = event::makeEvent(SUBSYSTEM_ID, 10, severity::HIGH);
|
static constexpr Event PDEC_RESET_FAILED = event::makeEvent(SUBSYSTEM_ID, 10, severity::HIGH);
|
||||||
//! [EXPORT] : [COMMENT] Failed to open the IRQ uio file
|
//! [EXPORT] : [COMMENT] Failed to open the IRQ uio file
|
||||||
static constexpr Event OPEN_IRQ_FILE_FAILED =
|
static constexpr Event OPEN_IRQ_FILE_FAILED = event::makeEvent(SUBSYSTEM_ID, 11, severity::HIGH);
|
||||||
event::makeEvent(SUBSYSTEM_ID, 11, severity::HIGH);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const uint8_t INTERFACE_ID = CLASS_ID::PDEC_HANDLER;
|
static const uint8_t INTERFACE_ID = CLASS_ID::PDEC_HANDLER;
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
#include <fsfw/parameters/ReceivesParameterMessagesIF.h>
|
#include <fsfw/parameters/ReceivesParameterMessagesIF.h>
|
||||||
#include <fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h>
|
#include <fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h>
|
||||||
#include <fsfw_hal/devicehandlers/MgmRM3100Handler.h>
|
#include <fsfw_hal/devicehandlers/MgmRM3100Handler.h>
|
||||||
#include <mission/devices/devicedefinitions/SusDefinitions.h>
|
|
||||||
#include <mission/devices/devicedefinitions/imtqHelpers.h>
|
#include <mission/devices/devicedefinitions/imtqHelpers.h>
|
||||||
#include <mission/devices/devicedefinitions/rwHelpers.h>
|
#include <mission/devices/devicedefinitions/rwHelpers.h>
|
||||||
|
#include <mission/devices/devicedefinitions/susMax1227Helpers.h>
|
||||||
#include <mission/trace.h>
|
#include <mission/trace.h>
|
||||||
|
|
||||||
#include "acs/ActuatorCmd.h"
|
#include "acs/ActuatorCmd.h"
|
||||||
|
@ -474,8 +474,8 @@ void ThermalController::copySus() {
|
|||||||
{
|
{
|
||||||
PoolReadGuard pg0(&susSet0, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
PoolReadGuard pg0(&susSet0, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
||||||
if (pg0.getReadResult() == returnvalue::OK) {
|
if (pg0.getReadResult() == returnvalue::OK) {
|
||||||
susTemperatures.sus_0_n_loc_xfyfzm_pt_xf.value = susSet0.temperatureCelcius.value;
|
susTemperatures.sus_0_n_loc_xfyfzm_pt_xf.value = susSet0.tempC.value;
|
||||||
susTemperatures.sus_0_n_loc_xfyfzm_pt_xf.setValid(susSet0.temperatureCelcius.isValid());
|
susTemperatures.sus_0_n_loc_xfyfzm_pt_xf.setValid(susSet0.tempC.isValid());
|
||||||
if (not susTemperatures.sus_0_n_loc_xfyfzm_pt_xf.isValid()) {
|
if (not susTemperatures.sus_0_n_loc_xfyfzm_pt_xf.isValid()) {
|
||||||
susTemperatures.sus_0_n_loc_xfyfzm_pt_xf.value = INVALID_TEMPERATURE;
|
susTemperatures.sus_0_n_loc_xfyfzm_pt_xf.value = INVALID_TEMPERATURE;
|
||||||
}
|
}
|
||||||
@ -485,8 +485,8 @@ void ThermalController::copySus() {
|
|||||||
{
|
{
|
||||||
PoolReadGuard pg1(&susSet1, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
PoolReadGuard pg1(&susSet1, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
||||||
if (pg1.getReadResult() == returnvalue::OK) {
|
if (pg1.getReadResult() == returnvalue::OK) {
|
||||||
susTemperatures.sus_6_r_loc_xfybzm_pt_xf.value = susSet1.temperatureCelcius.value;
|
susTemperatures.sus_6_r_loc_xfybzm_pt_xf.value = susSet1.tempC.value;
|
||||||
susTemperatures.sus_6_r_loc_xfybzm_pt_xf.setValid(susSet1.temperatureCelcius.isValid());
|
susTemperatures.sus_6_r_loc_xfybzm_pt_xf.setValid(susSet1.tempC.isValid());
|
||||||
if (not susTemperatures.sus_6_r_loc_xfybzm_pt_xf.isValid()) {
|
if (not susTemperatures.sus_6_r_loc_xfybzm_pt_xf.isValid()) {
|
||||||
susTemperatures.sus_6_r_loc_xfybzm_pt_xf.value = INVALID_TEMPERATURE;
|
susTemperatures.sus_6_r_loc_xfybzm_pt_xf.value = INVALID_TEMPERATURE;
|
||||||
}
|
}
|
||||||
@ -496,8 +496,8 @@ void ThermalController::copySus() {
|
|||||||
{
|
{
|
||||||
PoolReadGuard pg2(&susSet2, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
PoolReadGuard pg2(&susSet2, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
||||||
if (pg2.getReadResult() == returnvalue::OK) {
|
if (pg2.getReadResult() == returnvalue::OK) {
|
||||||
susTemperatures.sus_1_n_loc_xbyfzm_pt_xb.value = susSet2.temperatureCelcius.value;
|
susTemperatures.sus_1_n_loc_xbyfzm_pt_xb.value = susSet2.tempC.value;
|
||||||
susTemperatures.sus_1_n_loc_xbyfzm_pt_xb.setValid(susSet2.temperatureCelcius.isValid());
|
susTemperatures.sus_1_n_loc_xbyfzm_pt_xb.setValid(susSet2.tempC.isValid());
|
||||||
if (not susTemperatures.sus_1_n_loc_xbyfzm_pt_xb.isValid()) {
|
if (not susTemperatures.sus_1_n_loc_xbyfzm_pt_xb.isValid()) {
|
||||||
susTemperatures.sus_1_n_loc_xbyfzm_pt_xb.value = INVALID_TEMPERATURE;
|
susTemperatures.sus_1_n_loc_xbyfzm_pt_xb.value = INVALID_TEMPERATURE;
|
||||||
}
|
}
|
||||||
@ -507,8 +507,8 @@ void ThermalController::copySus() {
|
|||||||
{
|
{
|
||||||
PoolReadGuard pg3(&susSet3, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
PoolReadGuard pg3(&susSet3, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
||||||
if (pg3.getReadResult() == returnvalue::OK) {
|
if (pg3.getReadResult() == returnvalue::OK) {
|
||||||
susTemperatures.sus_7_r_loc_xbybzm_pt_xb.value = susSet3.temperatureCelcius.value;
|
susTemperatures.sus_7_r_loc_xbybzm_pt_xb.value = susSet3.tempC.value;
|
||||||
susTemperatures.sus_7_r_loc_xbybzm_pt_xb.setValid(susSet3.temperatureCelcius.isValid());
|
susTemperatures.sus_7_r_loc_xbybzm_pt_xb.setValid(susSet3.tempC.isValid());
|
||||||
if (not susTemperatures.sus_7_r_loc_xbybzm_pt_xb.isValid()) {
|
if (not susTemperatures.sus_7_r_loc_xbybzm_pt_xb.isValid()) {
|
||||||
susTemperatures.sus_7_r_loc_xbybzm_pt_xb.value = INVALID_TEMPERATURE;
|
susTemperatures.sus_7_r_loc_xbybzm_pt_xb.value = INVALID_TEMPERATURE;
|
||||||
}
|
}
|
||||||
@ -518,8 +518,8 @@ void ThermalController::copySus() {
|
|||||||
{
|
{
|
||||||
PoolReadGuard pg4(&susSet4, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
PoolReadGuard pg4(&susSet4, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
||||||
if (pg4.getReadResult() == returnvalue::OK) {
|
if (pg4.getReadResult() == returnvalue::OK) {
|
||||||
susTemperatures.sus_2_n_loc_xfybzb_pt_yb.value = susSet4.temperatureCelcius.value;
|
susTemperatures.sus_2_n_loc_xfybzb_pt_yb.value = susSet4.tempC.value;
|
||||||
susTemperatures.sus_2_n_loc_xfybzb_pt_yb.setValid(susSet4.temperatureCelcius.isValid());
|
susTemperatures.sus_2_n_loc_xfybzb_pt_yb.setValid(susSet4.tempC.isValid());
|
||||||
if (not susTemperatures.sus_2_n_loc_xfybzb_pt_yb.isValid()) {
|
if (not susTemperatures.sus_2_n_loc_xfybzb_pt_yb.isValid()) {
|
||||||
susTemperatures.sus_2_n_loc_xfybzb_pt_yb.value = INVALID_TEMPERATURE;
|
susTemperatures.sus_2_n_loc_xfybzb_pt_yb.value = INVALID_TEMPERATURE;
|
||||||
}
|
}
|
||||||
@ -529,8 +529,8 @@ void ThermalController::copySus() {
|
|||||||
{
|
{
|
||||||
PoolReadGuard pg5(&susSet5, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
PoolReadGuard pg5(&susSet5, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
||||||
if (pg5.getReadResult() == returnvalue::OK) {
|
if (pg5.getReadResult() == returnvalue::OK) {
|
||||||
susTemperatures.sus_8_r_loc_xbybzb_pt_yb.value = susSet5.temperatureCelcius.value;
|
susTemperatures.sus_8_r_loc_xbybzb_pt_yb.value = susSet5.tempC.value;
|
||||||
susTemperatures.sus_8_r_loc_xbybzb_pt_yb.setValid(susSet5.temperatureCelcius.isValid());
|
susTemperatures.sus_8_r_loc_xbybzb_pt_yb.setValid(susSet5.tempC.isValid());
|
||||||
if (not susTemperatures.sus_8_r_loc_xbybzb_pt_yb.isValid()) {
|
if (not susTemperatures.sus_8_r_loc_xbybzb_pt_yb.isValid()) {
|
||||||
susTemperatures.sus_8_r_loc_xbybzb_pt_yb.value = INVALID_TEMPERATURE;
|
susTemperatures.sus_8_r_loc_xbybzb_pt_yb.value = INVALID_TEMPERATURE;
|
||||||
}
|
}
|
||||||
@ -540,8 +540,8 @@ void ThermalController::copySus() {
|
|||||||
{
|
{
|
||||||
PoolReadGuard pg6(&susSet6, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
PoolReadGuard pg6(&susSet6, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
||||||
if (pg6.getReadResult() == returnvalue::OK) {
|
if (pg6.getReadResult() == returnvalue::OK) {
|
||||||
susTemperatures.sus_3_n_loc_xfybzf_pt_yf.value = susSet6.temperatureCelcius.value;
|
susTemperatures.sus_3_n_loc_xfybzf_pt_yf.value = susSet6.tempC.value;
|
||||||
susTemperatures.sus_3_n_loc_xfybzf_pt_yf.setValid(susSet6.temperatureCelcius.isValid());
|
susTemperatures.sus_3_n_loc_xfybzf_pt_yf.setValid(susSet6.tempC.isValid());
|
||||||
if (not susTemperatures.sus_3_n_loc_xfybzf_pt_yf.isValid()) {
|
if (not susTemperatures.sus_3_n_loc_xfybzf_pt_yf.isValid()) {
|
||||||
susTemperatures.sus_3_n_loc_xfybzf_pt_yf.value = INVALID_TEMPERATURE;
|
susTemperatures.sus_3_n_loc_xfybzf_pt_yf.value = INVALID_TEMPERATURE;
|
||||||
}
|
}
|
||||||
@ -551,8 +551,8 @@ void ThermalController::copySus() {
|
|||||||
{
|
{
|
||||||
PoolReadGuard pg7(&susSet7, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
PoolReadGuard pg7(&susSet7, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
||||||
if (pg7.getReadResult() == returnvalue::OK) {
|
if (pg7.getReadResult() == returnvalue::OK) {
|
||||||
susTemperatures.sus_9_r_loc_xbybzb_pt_yf.value = susSet7.temperatureCelcius.value;
|
susTemperatures.sus_9_r_loc_xbybzb_pt_yf.value = susSet7.tempC.value;
|
||||||
susTemperatures.sus_9_r_loc_xbybzb_pt_yf.setValid(susSet7.temperatureCelcius.isValid());
|
susTemperatures.sus_9_r_loc_xbybzb_pt_yf.setValid(susSet7.tempC.isValid());
|
||||||
if (not susTemperatures.sus_9_r_loc_xbybzb_pt_yf.isValid()) {
|
if (not susTemperatures.sus_9_r_loc_xbybzb_pt_yf.isValid()) {
|
||||||
susTemperatures.sus_9_r_loc_xbybzb_pt_yf.value = INVALID_TEMPERATURE;
|
susTemperatures.sus_9_r_loc_xbybzb_pt_yf.value = INVALID_TEMPERATURE;
|
||||||
}
|
}
|
||||||
@ -562,8 +562,8 @@ void ThermalController::copySus() {
|
|||||||
{
|
{
|
||||||
PoolReadGuard pg8(&susSet8, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
PoolReadGuard pg8(&susSet8, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
||||||
if (pg8.getReadResult() == returnvalue::OK) {
|
if (pg8.getReadResult() == returnvalue::OK) {
|
||||||
susTemperatures.sus_4_n_loc_xmyfzf_pt_zf.value = susSet8.temperatureCelcius.value;
|
susTemperatures.sus_4_n_loc_xmyfzf_pt_zf.value = susSet8.tempC.value;
|
||||||
susTemperatures.sus_4_n_loc_xmyfzf_pt_zf.setValid(susSet8.temperatureCelcius.isValid());
|
susTemperatures.sus_4_n_loc_xmyfzf_pt_zf.setValid(susSet8.tempC.isValid());
|
||||||
if (not susTemperatures.sus_4_n_loc_xmyfzf_pt_zf.isValid()) {
|
if (not susTemperatures.sus_4_n_loc_xmyfzf_pt_zf.isValid()) {
|
||||||
susTemperatures.sus_4_n_loc_xmyfzf_pt_zf.value = INVALID_TEMPERATURE;
|
susTemperatures.sus_4_n_loc_xmyfzf_pt_zf.value = INVALID_TEMPERATURE;
|
||||||
}
|
}
|
||||||
@ -573,8 +573,8 @@ void ThermalController::copySus() {
|
|||||||
{
|
{
|
||||||
PoolReadGuard pg9(&susSet9, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
PoolReadGuard pg9(&susSet9, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
||||||
if (pg9.getReadResult() == returnvalue::OK) {
|
if (pg9.getReadResult() == returnvalue::OK) {
|
||||||
susTemperatures.sus_10_n_loc_xmybzf_pt_zf.value = susSet9.temperatureCelcius.value;
|
susTemperatures.sus_10_n_loc_xmybzf_pt_zf.value = susSet9.tempC.value;
|
||||||
susTemperatures.sus_10_n_loc_xmybzf_pt_zf.setValid(susSet9.temperatureCelcius.isValid());
|
susTemperatures.sus_10_n_loc_xmybzf_pt_zf.setValid(susSet9.tempC.isValid());
|
||||||
if (not susTemperatures.sus_10_n_loc_xmybzf_pt_zf.isValid()) {
|
if (not susTemperatures.sus_10_n_loc_xmybzf_pt_zf.isValid()) {
|
||||||
susTemperatures.sus_10_n_loc_xmybzf_pt_zf.value = INVALID_TEMPERATURE;
|
susTemperatures.sus_10_n_loc_xmybzf_pt_zf.value = INVALID_TEMPERATURE;
|
||||||
}
|
}
|
||||||
@ -584,8 +584,8 @@ void ThermalController::copySus() {
|
|||||||
{
|
{
|
||||||
PoolReadGuard pg10(&susSet10, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
PoolReadGuard pg10(&susSet10, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
||||||
if (pg10.getReadResult() == returnvalue::OK) {
|
if (pg10.getReadResult() == returnvalue::OK) {
|
||||||
susTemperatures.sus_5_n_loc_xfymzb_pt_zb.value = susSet10.temperatureCelcius.value;
|
susTemperatures.sus_5_n_loc_xfymzb_pt_zb.value = susSet10.tempC.value;
|
||||||
susTemperatures.sus_5_n_loc_xfymzb_pt_zb.setValid(susSet10.temperatureCelcius.isValid());
|
susTemperatures.sus_5_n_loc_xfymzb_pt_zb.setValid(susSet10.tempC.isValid());
|
||||||
if (not susTemperatures.sus_5_n_loc_xfymzb_pt_zb.isValid()) {
|
if (not susTemperatures.sus_5_n_loc_xfymzb_pt_zb.isValid()) {
|
||||||
susTemperatures.sus_5_n_loc_xfymzb_pt_zb.value = INVALID_TEMPERATURE;
|
susTemperatures.sus_5_n_loc_xfymzb_pt_zb.value = INVALID_TEMPERATURE;
|
||||||
}
|
}
|
||||||
@ -595,8 +595,8 @@ void ThermalController::copySus() {
|
|||||||
{
|
{
|
||||||
PoolReadGuard pg11(&susSet11, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
PoolReadGuard pg11(&susSet11, MutexIF::TimeoutType::WAITING, MUTEX_TIMEOUT);
|
||||||
if (pg11.getReadResult() == returnvalue::OK) {
|
if (pg11.getReadResult() == returnvalue::OK) {
|
||||||
susTemperatures.sus_11_r_loc_xbymzb_pt_zb.value = susSet11.temperatureCelcius.value;
|
susTemperatures.sus_11_r_loc_xbymzb_pt_zb.value = susSet11.tempC.value;
|
||||||
susTemperatures.sus_11_r_loc_xbymzb_pt_zb.setValid(susSet11.temperatureCelcius.isValid());
|
susTemperatures.sus_11_r_loc_xbymzb_pt_zb.setValid(susSet11.tempC.isValid());
|
||||||
if (not susTemperatures.sus_11_r_loc_xbymzb_pt_zb.isValid()) {
|
if (not susTemperatures.sus_11_r_loc_xbymzb_pt_zb.isValid()) {
|
||||||
susTemperatures.sus_11_r_loc_xbymzb_pt_zb.value = INVALID_TEMPERATURE;
|
susTemperatures.sus_11_r_loc_xbymzb_pt_zb.value = INVALID_TEMPERATURE;
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
#include <fsfw/timemanager/Countdown.h>
|
#include <fsfw/timemanager/Countdown.h>
|
||||||
#include <mission/controller/controllerdefinitions/ThermalControllerDefinitions.h>
|
#include <mission/controller/controllerdefinitions/ThermalControllerDefinitions.h>
|
||||||
#include <mission/devices/devicedefinitions/Max31865Definitions.h>
|
#include <mission/devices/devicedefinitions/Max31865Definitions.h>
|
||||||
#include <mission/devices/devicedefinitions/SusDefinitions.h>
|
|
||||||
#include <mission/devices/devicedefinitions/Tmp1075Definitions.h>
|
#include <mission/devices/devicedefinitions/Tmp1075Definitions.h>
|
||||||
|
#include <mission/devices/devicedefinitions/susMax1227Helpers.h>
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
@ -112,18 +112,18 @@ class ThermalController : public ExtendedControllerBase {
|
|||||||
TMP1075::Tmp1075Dataset tmp1075SetIfBoard;
|
TMP1075::Tmp1075Dataset tmp1075SetIfBoard;
|
||||||
|
|
||||||
// SUS
|
// SUS
|
||||||
SUS::SusDataset susSet0;
|
susMax1227::SusDataset susSet0;
|
||||||
SUS::SusDataset susSet1;
|
susMax1227::SusDataset susSet1;
|
||||||
SUS::SusDataset susSet2;
|
susMax1227::SusDataset susSet2;
|
||||||
SUS::SusDataset susSet3;
|
susMax1227::SusDataset susSet3;
|
||||||
SUS::SusDataset susSet4;
|
susMax1227::SusDataset susSet4;
|
||||||
SUS::SusDataset susSet5;
|
susMax1227::SusDataset susSet5;
|
||||||
SUS::SusDataset susSet6;
|
susMax1227::SusDataset susSet6;
|
||||||
SUS::SusDataset susSet7;
|
susMax1227::SusDataset susSet7;
|
||||||
SUS::SusDataset susSet8;
|
susMax1227::SusDataset susSet8;
|
||||||
SUS::SusDataset susSet9;
|
susMax1227::SusDataset susSet9;
|
||||||
SUS::SusDataset susSet10;
|
susMax1227::SusDataset susSet10;
|
||||||
SUS::SusDataset susSet11;
|
susMax1227::SusDataset susSet11;
|
||||||
|
|
||||||
// TempLimits
|
// TempLimits
|
||||||
TempLimits acsBoardLimits = TempLimits(-40.0, -40.0, 80.0, 85.0, 85.0);
|
TempLimits acsBoardLimits = TempLimits(-40.0, -40.0, 80.0, 85.0, 85.0);
|
||||||
|
@ -4,13 +4,13 @@
|
|||||||
#include <mission/devices/devicedefinitions/gyroAdisHelpers.h>
|
#include <mission/devices/devicedefinitions/gyroAdisHelpers.h>
|
||||||
#include <mission/devices/devicedefinitions/imtqHelpers.h>
|
#include <mission/devices/devicedefinitions/imtqHelpers.h>
|
||||||
#include <mission/devices/devicedefinitions/rwHelpers.h>
|
#include <mission/devices/devicedefinitions/rwHelpers.h>
|
||||||
|
#include <mission/devices/devicedefinitions/susMax1227Helpers.h>
|
||||||
|
|
||||||
#include "fsfw_hal/devicehandlers/GyroL3GD20Handler.h"
|
#include "fsfw_hal/devicehandlers/GyroL3GD20Handler.h"
|
||||||
#include "fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h"
|
#include "fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h"
|
||||||
#include "fsfw_hal/devicehandlers/MgmRM3100Handler.h"
|
#include "fsfw_hal/devicehandlers/MgmRM3100Handler.h"
|
||||||
#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"
|
#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"
|
||||||
#include "mission/devices/devicedefinitions/GPSDefinitions.h"
|
#include "mission/devices/devicedefinitions/GPSDefinitions.h"
|
||||||
#include "mission/devices/devicedefinitions/SusDefinitions.h"
|
|
||||||
|
|
||||||
namespace ACS {
|
namespace ACS {
|
||||||
|
|
||||||
@ -36,19 +36,19 @@ class SensorValues {
|
|||||||
imtq::RawMtmMeasurementNoTorque imtqMgmSet =
|
imtq::RawMtmMeasurementNoTorque imtqMgmSet =
|
||||||
imtq::RawMtmMeasurementNoTorque(objects::IMTQ_HANDLER);
|
imtq::RawMtmMeasurementNoTorque(objects::IMTQ_HANDLER);
|
||||||
|
|
||||||
std::array<SUS::SusDataset, 12> susSets{
|
std::array<susMax1227::SusDataset, 12> susSets{
|
||||||
SUS::SusDataset(objects::SUS_0_N_LOC_XFYFZM_PT_XF),
|
susMax1227::SusDataset(objects::SUS_0_N_LOC_XFYFZM_PT_XF),
|
||||||
SUS::SusDataset(objects::SUS_1_N_LOC_XBYFZM_PT_XB),
|
susMax1227::SusDataset(objects::SUS_1_N_LOC_XBYFZM_PT_XB),
|
||||||
SUS::SusDataset(objects::SUS_2_N_LOC_XFYBZB_PT_YB),
|
susMax1227::SusDataset(objects::SUS_2_N_LOC_XFYBZB_PT_YB),
|
||||||
SUS::SusDataset(objects::SUS_3_N_LOC_XFYBZF_PT_YF),
|
susMax1227::SusDataset(objects::SUS_3_N_LOC_XFYBZF_PT_YF),
|
||||||
SUS::SusDataset(objects::SUS_4_N_LOC_XMYFZF_PT_ZF),
|
susMax1227::SusDataset(objects::SUS_4_N_LOC_XMYFZF_PT_ZF),
|
||||||
SUS::SusDataset(objects::SUS_5_N_LOC_XFYMZB_PT_ZB),
|
susMax1227::SusDataset(objects::SUS_5_N_LOC_XFYMZB_PT_ZB),
|
||||||
SUS::SusDataset(objects::SUS_6_R_LOC_XFYBZM_PT_XF),
|
susMax1227::SusDataset(objects::SUS_6_R_LOC_XFYBZM_PT_XF),
|
||||||
SUS::SusDataset(objects::SUS_7_R_LOC_XBYBZM_PT_XB),
|
susMax1227::SusDataset(objects::SUS_7_R_LOC_XBYBZM_PT_XB),
|
||||||
SUS::SusDataset(objects::SUS_8_R_LOC_XBYBZB_PT_YB),
|
susMax1227::SusDataset(objects::SUS_8_R_LOC_XBYBZB_PT_YB),
|
||||||
SUS::SusDataset(objects::SUS_9_R_LOC_XBYBZB_PT_YF),
|
susMax1227::SusDataset(objects::SUS_9_R_LOC_XBYBZB_PT_YF),
|
||||||
SUS::SusDataset(objects::SUS_10_N_LOC_XMYBZF_PT_ZF),
|
susMax1227::SusDataset(objects::SUS_10_N_LOC_XMYBZF_PT_ZF),
|
||||||
SUS::SusDataset(objects::SUS_11_R_LOC_XBYMZB_PT_ZB),
|
susMax1227::SusDataset(objects::SUS_11_R_LOC_XBYMZB_PT_ZB),
|
||||||
};
|
};
|
||||||
|
|
||||||
AdisGyroPrimaryDataset gyr0AdisSet = AdisGyroPrimaryDataset(objects::GYRO_0_ADIS_HANDLER);
|
AdisGyroPrimaryDataset gyr0AdisSet = AdisGyroPrimaryDataset(objects::GYRO_0_ADIS_HANDLER);
|
||||||
|
@ -30,22 +30,6 @@ ReturnValue_t pst::pstSpiAndSyrlinks(FixedTimeslotTaskIF *thisSequence) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static_cast<void>(length);
|
static_cast<void>(length);
|
||||||
#if OBSW_ADD_PL_PCDU == 1
|
|
||||||
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE);
|
|
||||||
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE);
|
|
||||||
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::SEND_READ);
|
|
||||||
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * 0, DeviceHandlerIF::GET_READ);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if OBSW_ADD_RAD_SENSORS == 1
|
|
||||||
/* Radiation sensor */
|
|
||||||
thisSequence->addSlot(objects::RAD_SENSOR, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
thisSequence->addSlot(objects::RAD_SENSOR, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
|
||||||
thisSequence->addSlot(objects::RAD_SENSOR, length * 0.4, DeviceHandlerIF::GET_WRITE);
|
|
||||||
thisSequence->addSlot(objects::RAD_SENSOR, length * 0.6, DeviceHandlerIF::SEND_READ);
|
|
||||||
thisSequence->addSlot(objects::RAD_SENSOR, length * 0.8, DeviceHandlerIF::GET_READ);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return thisSequence->checkSequence();
|
return thisSequence->checkSequence();
|
||||||
}
|
}
|
||||||
@ -191,21 +175,7 @@ ReturnValue_t pst::pstTcsAndAcs(FixedTimeslotTaskIF *thisSequence, AcsPstCfg cfg
|
|||||||
uint32_t length = thisSequence->getPeriodMs();
|
uint32_t length = thisSequence->getPeriodMs();
|
||||||
|
|
||||||
// SUS: 16 ms
|
// SUS: 16 ms
|
||||||
bool addSus0 = true;
|
|
||||||
bool addSus1 = true;
|
|
||||||
bool addSus2 = true;
|
|
||||||
bool addSus3 = true;
|
|
||||||
bool addSus4 = true;
|
|
||||||
bool addSus5 = true;
|
|
||||||
bool addSus6 = true;
|
|
||||||
bool addSus7 = true;
|
|
||||||
bool addSus8 = true;
|
|
||||||
bool addSus9 = true;
|
|
||||||
bool addSus10 = true;
|
|
||||||
bool addSus11 = true;
|
|
||||||
|
|
||||||
if (cfg.scheduleSus) {
|
if (cfg.scheduleSus) {
|
||||||
if (addSus0) {
|
|
||||||
/* Write setup */
|
/* Write setup */
|
||||||
thisSequence->addSlot(objects::SUS_0_N_LOC_XFYFZM_PT_XF, length * 0,
|
thisSequence->addSlot(objects::SUS_0_N_LOC_XFYFZM_PT_XF, length * 0,
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
@ -213,263 +183,121 @@ ReturnValue_t pst::pstTcsAndAcs(FixedTimeslotTaskIF *thisSequence, AcsPstCfg cfg
|
|||||||
DeviceHandlerIF::SEND_WRITE);
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
thisSequence->addSlot(objects::SUS_0_N_LOC_XFYFZM_PT_XF, length * 0,
|
thisSequence->addSlot(objects::SUS_0_N_LOC_XFYFZM_PT_XF, length * 0,
|
||||||
DeviceHandlerIF::GET_WRITE);
|
DeviceHandlerIF::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::SUS_0_N_LOC_XFYFZM_PT_XF, length * 0,
|
thisSequence->addSlot(objects::SUS_1_N_LOC_XBYFZM_PT_XB, length * 0,
|
||||||
DeviceHandlerIF::SEND_READ);
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
thisSequence->addSlot(objects::SUS_0_N_LOC_XFYFZM_PT_XF, length * 0,
|
thisSequence->addSlot(objects::SUS_1_N_LOC_XBYFZM_PT_XB, length * 0,
|
||||||
DeviceHandlerIF::GET_READ);
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
|
thisSequence->addSlot(objects::SUS_1_N_LOC_XBYFZM_PT_XB, length * 0,
|
||||||
|
DeviceHandlerIF::GET_WRITE);
|
||||||
|
thisSequence->addSlot(objects::SUS_2_N_LOC_XFYBZB_PT_YB, length * 0,
|
||||||
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
|
thisSequence->addSlot(objects::SUS_2_N_LOC_XFYBZB_PT_YB, length * 0,
|
||||||
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
|
thisSequence->addSlot(objects::SUS_2_N_LOC_XFYBZB_PT_YB, length * 0,
|
||||||
|
DeviceHandlerIF::GET_WRITE);
|
||||||
|
thisSequence->addSlot(objects::SUS_3_N_LOC_XFYBZF_PT_YF, length * 0,
|
||||||
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
|
thisSequence->addSlot(objects::SUS_3_N_LOC_XFYBZF_PT_YF, length * 0,
|
||||||
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
|
thisSequence->addSlot(objects::SUS_3_N_LOC_XFYBZF_PT_YF, length * 0,
|
||||||
|
DeviceHandlerIF::GET_WRITE);
|
||||||
|
thisSequence->addSlot(objects::SUS_4_N_LOC_XMYFZF_PT_ZF, length * 0,
|
||||||
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
|
thisSequence->addSlot(objects::SUS_4_N_LOC_XMYFZF_PT_ZF, length * 0,
|
||||||
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
|
thisSequence->addSlot(objects::SUS_4_N_LOC_XMYFZF_PT_ZF, length * 0,
|
||||||
|
DeviceHandlerIF::GET_WRITE);
|
||||||
|
thisSequence->addSlot(objects::SUS_5_N_LOC_XFYMZB_PT_ZB, length * 0,
|
||||||
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
|
thisSequence->addSlot(objects::SUS_5_N_LOC_XFYMZB_PT_ZB, length * 0,
|
||||||
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
|
thisSequence->addSlot(objects::SUS_5_N_LOC_XFYMZB_PT_ZB, length * 0,
|
||||||
|
DeviceHandlerIF::GET_WRITE);
|
||||||
|
thisSequence->addSlot(objects::SUS_6_R_LOC_XFYBZM_PT_XF, length * 0,
|
||||||
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
|
thisSequence->addSlot(objects::SUS_6_R_LOC_XFYBZM_PT_XF, length * 0,
|
||||||
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
|
thisSequence->addSlot(objects::SUS_6_R_LOC_XFYBZM_PT_XF, length * 0,
|
||||||
|
DeviceHandlerIF::GET_WRITE);
|
||||||
|
thisSequence->addSlot(objects::SUS_7_R_LOC_XBYBZM_PT_XB, length * 0,
|
||||||
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
|
thisSequence->addSlot(objects::SUS_7_R_LOC_XBYBZM_PT_XB, length * 0,
|
||||||
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
|
thisSequence->addSlot(objects::SUS_7_R_LOC_XBYBZM_PT_XB, length * 0,
|
||||||
|
DeviceHandlerIF::GET_WRITE);
|
||||||
|
thisSequence->addSlot(objects::SUS_8_R_LOC_XBYBZB_PT_YB, length * 0,
|
||||||
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
|
thisSequence->addSlot(objects::SUS_8_R_LOC_XBYBZB_PT_YB, length * 0,
|
||||||
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
|
thisSequence->addSlot(objects::SUS_8_R_LOC_XBYBZB_PT_YB, length * 0,
|
||||||
|
DeviceHandlerIF::GET_WRITE);
|
||||||
|
thisSequence->addSlot(objects::SUS_9_R_LOC_XBYBZB_PT_YF, length * 0,
|
||||||
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
|
thisSequence->addSlot(objects::SUS_9_R_LOC_XBYBZB_PT_YF, length * 0,
|
||||||
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
|
thisSequence->addSlot(objects::SUS_9_R_LOC_XBYBZB_PT_YF, length * 0,
|
||||||
|
DeviceHandlerIF::GET_WRITE);
|
||||||
|
thisSequence->addSlot(objects::SUS_10_N_LOC_XMYBZF_PT_ZF, length * 0,
|
||||||
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
|
thisSequence->addSlot(objects::SUS_10_N_LOC_XMYBZF_PT_ZF, length * 0,
|
||||||
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
|
thisSequence->addSlot(objects::SUS_10_N_LOC_XMYBZF_PT_ZF, length * 0,
|
||||||
|
DeviceHandlerIF::GET_WRITE);
|
||||||
|
thisSequence->addSlot(objects::SUS_11_R_LOC_XBYMZB_PT_ZB, length * 0,
|
||||||
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
|
thisSequence->addSlot(objects::SUS_11_R_LOC_XBYMZB_PT_ZB, length * 0,
|
||||||
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
|
thisSequence->addSlot(objects::SUS_11_R_LOC_XBYMZB_PT_ZB, length * 0,
|
||||||
|
DeviceHandlerIF::GET_WRITE);
|
||||||
|
|
||||||
thisSequence->addSlot(objects::SUS_0_N_LOC_XFYFZM_PT_XF,
|
thisSequence->addSlot(objects::SUS_0_N_LOC_XFYFZM_PT_XF,
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD,
|
length * config::spiSched::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::SEND_READ);
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_0_N_LOC_XFYFZM_PT_XF,
|
thisSequence->addSlot(objects::SUS_0_N_LOC_XFYFZM_PT_XF,
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_WRITE);
|
length * config::spiSched::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_READ);
|
||||||
thisSequence->addSlot(objects::SUS_0_N_LOC_XFYFZM_PT_XF,
|
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::SEND_READ);
|
|
||||||
thisSequence->addSlot(objects::SUS_0_N_LOC_XFYFZM_PT_XF,
|
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_READ);
|
|
||||||
}
|
|
||||||
if (addSus1) {
|
|
||||||
thisSequence->addSlot(objects::SUS_1_N_LOC_XBYFZM_PT_XB, length * 0,
|
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
thisSequence->addSlot(objects::SUS_1_N_LOC_XBYFZM_PT_XB, length * 0,
|
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_1_N_LOC_XBYFZM_PT_XB, length * 0,
|
|
||||||
DeviceHandlerIF::GET_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_1_N_LOC_XBYFZM_PT_XB, length * 0,
|
|
||||||
DeviceHandlerIF::SEND_READ);
|
|
||||||
thisSequence->addSlot(objects::SUS_1_N_LOC_XBYFZM_PT_XB, length * 0,
|
|
||||||
DeviceHandlerIF::GET_READ);
|
|
||||||
|
|
||||||
thisSequence->addSlot(objects::SUS_1_N_LOC_XBYFZM_PT_XB,
|
thisSequence->addSlot(objects::SUS_1_N_LOC_XBYFZM_PT_XB,
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD,
|
length * config::spiSched::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::SEND_READ);
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_1_N_LOC_XBYFZM_PT_XB,
|
thisSequence->addSlot(objects::SUS_1_N_LOC_XBYFZM_PT_XB,
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_WRITE);
|
length * config::spiSched::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_READ);
|
||||||
thisSequence->addSlot(objects::SUS_1_N_LOC_XBYFZM_PT_XB,
|
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::SEND_READ);
|
|
||||||
thisSequence->addSlot(objects::SUS_1_N_LOC_XBYFZM_PT_XB,
|
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_READ);
|
|
||||||
}
|
|
||||||
if (addSus2) {
|
|
||||||
thisSequence->addSlot(objects::SUS_2_N_LOC_XFYBZB_PT_YB, length * 0,
|
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
thisSequence->addSlot(objects::SUS_2_N_LOC_XFYBZB_PT_YB, length * 0,
|
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_2_N_LOC_XFYBZB_PT_YB, length * 0,
|
|
||||||
DeviceHandlerIF::GET_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_2_N_LOC_XFYBZB_PT_YB, length * 0,
|
|
||||||
DeviceHandlerIF::SEND_READ);
|
|
||||||
thisSequence->addSlot(objects::SUS_2_N_LOC_XFYBZB_PT_YB, length * 0,
|
|
||||||
DeviceHandlerIF::GET_READ);
|
|
||||||
|
|
||||||
thisSequence->addSlot(objects::SUS_2_N_LOC_XFYBZB_PT_YB,
|
thisSequence->addSlot(objects::SUS_2_N_LOC_XFYBZB_PT_YB,
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD,
|
length * config::spiSched::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::SEND_READ);
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_2_N_LOC_XFYBZB_PT_YB,
|
thisSequence->addSlot(objects::SUS_2_N_LOC_XFYBZB_PT_YB,
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_WRITE);
|
length * config::spiSched::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_READ);
|
||||||
thisSequence->addSlot(objects::SUS_2_N_LOC_XFYBZB_PT_YB,
|
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::SEND_READ);
|
|
||||||
thisSequence->addSlot(objects::SUS_2_N_LOC_XFYBZB_PT_YB,
|
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_READ);
|
|
||||||
}
|
|
||||||
if (addSus3) {
|
|
||||||
thisSequence->addSlot(objects::SUS_3_N_LOC_XFYBZF_PT_YF, length * 0,
|
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
thisSequence->addSlot(objects::SUS_3_N_LOC_XFYBZF_PT_YF, length * 0,
|
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_3_N_LOC_XFYBZF_PT_YF, length * 0,
|
|
||||||
DeviceHandlerIF::GET_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_3_N_LOC_XFYBZF_PT_YF, length * 0,
|
|
||||||
DeviceHandlerIF::SEND_READ);
|
|
||||||
thisSequence->addSlot(objects::SUS_3_N_LOC_XFYBZF_PT_YF, length * 0,
|
|
||||||
DeviceHandlerIF::GET_READ);
|
|
||||||
|
|
||||||
thisSequence->addSlot(objects::SUS_3_N_LOC_XFYBZF_PT_YF,
|
thisSequence->addSlot(objects::SUS_3_N_LOC_XFYBZF_PT_YF,
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD,
|
length * config::spiSched::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::SEND_READ);
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_3_N_LOC_XFYBZF_PT_YF,
|
thisSequence->addSlot(objects::SUS_3_N_LOC_XFYBZF_PT_YF,
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_WRITE);
|
length * config::spiSched::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_READ);
|
||||||
thisSequence->addSlot(objects::SUS_3_N_LOC_XFYBZF_PT_YF,
|
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::SEND_READ);
|
|
||||||
thisSequence->addSlot(objects::SUS_3_N_LOC_XFYBZF_PT_YF,
|
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_READ);
|
|
||||||
}
|
|
||||||
if (addSus4) {
|
|
||||||
thisSequence->addSlot(objects::SUS_4_N_LOC_XMYFZF_PT_ZF, length * 0,
|
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
thisSequence->addSlot(objects::SUS_4_N_LOC_XMYFZF_PT_ZF, length * 0,
|
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_4_N_LOC_XMYFZF_PT_ZF, length * 0,
|
|
||||||
DeviceHandlerIF::GET_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_4_N_LOC_XMYFZF_PT_ZF, length * 0,
|
|
||||||
DeviceHandlerIF::SEND_READ);
|
|
||||||
thisSequence->addSlot(objects::SUS_4_N_LOC_XMYFZF_PT_ZF, length * 0,
|
|
||||||
DeviceHandlerIF::GET_READ);
|
|
||||||
|
|
||||||
thisSequence->addSlot(objects::SUS_4_N_LOC_XMYFZF_PT_ZF,
|
thisSequence->addSlot(objects::SUS_4_N_LOC_XMYFZF_PT_ZF,
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD,
|
length * config::spiSched::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::SEND_READ);
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_4_N_LOC_XMYFZF_PT_ZF,
|
thisSequence->addSlot(objects::SUS_4_N_LOC_XMYFZF_PT_ZF,
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_WRITE);
|
length * config::spiSched::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_READ);
|
||||||
thisSequence->addSlot(objects::SUS_4_N_LOC_XMYFZF_PT_ZF,
|
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::SEND_READ);
|
|
||||||
thisSequence->addSlot(objects::SUS_4_N_LOC_XMYFZF_PT_ZF,
|
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_READ);
|
|
||||||
}
|
|
||||||
if (addSus5) {
|
|
||||||
thisSequence->addSlot(objects::SUS_5_N_LOC_XFYMZB_PT_ZB, length * 0,
|
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
thisSequence->addSlot(objects::SUS_5_N_LOC_XFYMZB_PT_ZB, length * 0,
|
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_5_N_LOC_XFYMZB_PT_ZB, length * 0,
|
|
||||||
DeviceHandlerIF::GET_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_5_N_LOC_XFYMZB_PT_ZB, length * 0,
|
|
||||||
DeviceHandlerIF::SEND_READ);
|
|
||||||
thisSequence->addSlot(objects::SUS_5_N_LOC_XFYMZB_PT_ZB, length * 0,
|
|
||||||
DeviceHandlerIF::GET_READ);
|
|
||||||
|
|
||||||
thisSequence->addSlot(objects::SUS_5_N_LOC_XFYMZB_PT_ZB,
|
thisSequence->addSlot(objects::SUS_5_N_LOC_XFYMZB_PT_ZB,
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD,
|
length * config::spiSched::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::SEND_READ);
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_5_N_LOC_XFYMZB_PT_ZB,
|
thisSequence->addSlot(objects::SUS_5_N_LOC_XFYMZB_PT_ZB,
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_WRITE);
|
length * config::spiSched::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_READ);
|
||||||
thisSequence->addSlot(objects::SUS_5_N_LOC_XFYMZB_PT_ZB,
|
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::SEND_READ);
|
|
||||||
thisSequence->addSlot(objects::SUS_5_N_LOC_XFYMZB_PT_ZB,
|
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_READ);
|
|
||||||
}
|
|
||||||
if (addSus6) {
|
|
||||||
thisSequence->addSlot(objects::SUS_6_R_LOC_XFYBZM_PT_XF, length * 0,
|
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
thisSequence->addSlot(objects::SUS_6_R_LOC_XFYBZM_PT_XF, length * 0,
|
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_6_R_LOC_XFYBZM_PT_XF, length * 0,
|
|
||||||
DeviceHandlerIF::GET_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_6_R_LOC_XFYBZM_PT_XF, length * 0,
|
|
||||||
DeviceHandlerIF::SEND_READ);
|
|
||||||
thisSequence->addSlot(objects::SUS_6_R_LOC_XFYBZM_PT_XF, length * 0,
|
|
||||||
DeviceHandlerIF::GET_READ);
|
|
||||||
|
|
||||||
thisSequence->addSlot(objects::SUS_6_R_LOC_XFYBZM_PT_XF,
|
thisSequence->addSlot(objects::SUS_6_R_LOC_XFYBZM_PT_XF,
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD,
|
length * config::spiSched::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::SEND_READ);
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_6_R_LOC_XFYBZM_PT_XF,
|
thisSequence->addSlot(objects::SUS_6_R_LOC_XFYBZM_PT_XF,
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_WRITE);
|
length * config::spiSched::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_READ);
|
||||||
thisSequence->addSlot(objects::SUS_6_R_LOC_XFYBZM_PT_XF,
|
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::SEND_READ);
|
|
||||||
thisSequence->addSlot(objects::SUS_6_R_LOC_XFYBZM_PT_XF,
|
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_READ);
|
|
||||||
}
|
|
||||||
if (addSus7) {
|
|
||||||
thisSequence->addSlot(objects::SUS_7_R_LOC_XBYBZM_PT_XB, length * 0,
|
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
thisSequence->addSlot(objects::SUS_7_R_LOC_XBYBZM_PT_XB, length * 0,
|
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_7_R_LOC_XBYBZM_PT_XB, length * 0,
|
|
||||||
DeviceHandlerIF::GET_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_7_R_LOC_XBYBZM_PT_XB, length * 0,
|
|
||||||
DeviceHandlerIF::SEND_READ);
|
|
||||||
thisSequence->addSlot(objects::SUS_7_R_LOC_XBYBZM_PT_XB, length * 0,
|
|
||||||
DeviceHandlerIF::GET_READ);
|
|
||||||
|
|
||||||
thisSequence->addSlot(objects::SUS_7_R_LOC_XBYBZM_PT_XB,
|
thisSequence->addSlot(objects::SUS_7_R_LOC_XBYBZM_PT_XB,
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD,
|
length * config::spiSched::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::SEND_READ);
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_7_R_LOC_XBYBZM_PT_XB,
|
thisSequence->addSlot(objects::SUS_7_R_LOC_XBYBZM_PT_XB,
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_WRITE);
|
length * config::spiSched::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_READ);
|
||||||
thisSequence->addSlot(objects::SUS_7_R_LOC_XBYBZM_PT_XB,
|
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::SEND_READ);
|
|
||||||
thisSequence->addSlot(objects::SUS_7_R_LOC_XBYBZM_PT_XB,
|
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_READ);
|
|
||||||
}
|
|
||||||
if (addSus8) {
|
|
||||||
thisSequence->addSlot(objects::SUS_8_R_LOC_XBYBZB_PT_YB, length * 0,
|
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
thisSequence->addSlot(objects::SUS_8_R_LOC_XBYBZB_PT_YB, length * 0,
|
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_8_R_LOC_XBYBZB_PT_YB, length * 0,
|
|
||||||
DeviceHandlerIF::GET_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_8_R_LOC_XBYBZB_PT_YB, length * 0,
|
|
||||||
DeviceHandlerIF::SEND_READ);
|
|
||||||
thisSequence->addSlot(objects::SUS_8_R_LOC_XBYBZB_PT_YB, length * 0,
|
|
||||||
DeviceHandlerIF::GET_READ);
|
|
||||||
|
|
||||||
thisSequence->addSlot(objects::SUS_8_R_LOC_XBYBZB_PT_YB,
|
thisSequence->addSlot(objects::SUS_8_R_LOC_XBYBZB_PT_YB,
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD,
|
length * config::spiSched::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::SEND_READ);
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_8_R_LOC_XBYBZB_PT_YB,
|
thisSequence->addSlot(objects::SUS_8_R_LOC_XBYBZB_PT_YB,
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_WRITE);
|
length * config::spiSched::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_READ);
|
||||||
thisSequence->addSlot(objects::SUS_8_R_LOC_XBYBZB_PT_YB,
|
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::SEND_READ);
|
|
||||||
thisSequence->addSlot(objects::SUS_8_R_LOC_XBYBZB_PT_YB,
|
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_READ);
|
|
||||||
}
|
|
||||||
if (addSus9) {
|
|
||||||
thisSequence->addSlot(objects::SUS_9_R_LOC_XBYBZB_PT_YF, length * 0,
|
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
thisSequence->addSlot(objects::SUS_9_R_LOC_XBYBZB_PT_YF, length * 0,
|
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_9_R_LOC_XBYBZB_PT_YF, length * 0,
|
|
||||||
DeviceHandlerIF::GET_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_9_R_LOC_XBYBZB_PT_YF, length * 0,
|
|
||||||
DeviceHandlerIF::SEND_READ);
|
|
||||||
thisSequence->addSlot(objects::SUS_9_R_LOC_XBYBZB_PT_YF, length * 0,
|
|
||||||
DeviceHandlerIF::GET_READ);
|
|
||||||
|
|
||||||
thisSequence->addSlot(objects::SUS_9_R_LOC_XBYBZB_PT_YF,
|
thisSequence->addSlot(objects::SUS_9_R_LOC_XBYBZB_PT_YF,
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD,
|
length * config::spiSched::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::SEND_READ);
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_9_R_LOC_XBYBZB_PT_YF,
|
thisSequence->addSlot(objects::SUS_9_R_LOC_XBYBZB_PT_YF,
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_WRITE);
|
length * config::spiSched::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_READ);
|
||||||
thisSequence->addSlot(objects::SUS_9_R_LOC_XBYBZB_PT_YF,
|
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::SEND_READ);
|
|
||||||
thisSequence->addSlot(objects::SUS_9_R_LOC_XBYBZB_PT_YF,
|
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_READ);
|
|
||||||
}
|
|
||||||
if (addSus10) {
|
|
||||||
thisSequence->addSlot(objects::SUS_10_N_LOC_XMYBZF_PT_ZF, length * 0,
|
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
thisSequence->addSlot(objects::SUS_10_N_LOC_XMYBZF_PT_ZF, length * 0,
|
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_10_N_LOC_XMYBZF_PT_ZF, length * 0,
|
|
||||||
DeviceHandlerIF::GET_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_10_N_LOC_XMYBZF_PT_ZF, length * 0,
|
|
||||||
DeviceHandlerIF::SEND_READ);
|
|
||||||
thisSequence->addSlot(objects::SUS_10_N_LOC_XMYBZF_PT_ZF, length * 0,
|
|
||||||
DeviceHandlerIF::GET_READ);
|
|
||||||
|
|
||||||
thisSequence->addSlot(objects::SUS_10_N_LOC_XMYBZF_PT_ZF,
|
thisSequence->addSlot(objects::SUS_10_N_LOC_XMYBZF_PT_ZF,
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD,
|
length * config::spiSched::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::SEND_READ);
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_10_N_LOC_XMYBZF_PT_ZF,
|
thisSequence->addSlot(objects::SUS_10_N_LOC_XMYBZF_PT_ZF,
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_WRITE);
|
length * config::spiSched::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_READ);
|
||||||
thisSequence->addSlot(objects::SUS_10_N_LOC_XMYBZF_PT_ZF,
|
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::SEND_READ);
|
|
||||||
thisSequence->addSlot(objects::SUS_10_N_LOC_XMYBZF_PT_ZF,
|
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_READ);
|
|
||||||
}
|
|
||||||
if (addSus11) {
|
|
||||||
thisSequence->addSlot(objects::SUS_11_R_LOC_XBYMZB_PT_ZB, length * 0,
|
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
|
||||||
thisSequence->addSlot(objects::SUS_11_R_LOC_XBYMZB_PT_ZB, length * 0,
|
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_11_R_LOC_XBYMZB_PT_ZB, length * 0,
|
|
||||||
DeviceHandlerIF::GET_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_11_R_LOC_XBYMZB_PT_ZB, length * 0,
|
|
||||||
DeviceHandlerIF::SEND_READ);
|
|
||||||
thisSequence->addSlot(objects::SUS_11_R_LOC_XBYMZB_PT_ZB, length * 0,
|
|
||||||
DeviceHandlerIF::GET_READ);
|
|
||||||
|
|
||||||
thisSequence->addSlot(objects::SUS_11_R_LOC_XBYMZB_PT_ZB,
|
thisSequence->addSlot(objects::SUS_11_R_LOC_XBYMZB_PT_ZB,
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD,
|
length * config::spiSched::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::SEND_READ);
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
|
||||||
thisSequence->addSlot(objects::SUS_11_R_LOC_XBYMZB_PT_ZB,
|
thisSequence->addSlot(objects::SUS_11_R_LOC_XBYMZB_PT_ZB,
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_WRITE);
|
length * config::spiSched::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_READ);
|
||||||
thisSequence->addSlot(objects::SUS_11_R_LOC_XBYMZB_PT_ZB,
|
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::SEND_READ);
|
|
||||||
thisSequence->addSlot(objects::SUS_11_R_LOC_XBYMZB_PT_ZB,
|
|
||||||
length * config::acs::SCHED_BLOCK_1_PERIOD, DeviceHandlerIF::GET_READ);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cfg.scheduleStr) {
|
if (cfg.scheduleStr) {
|
||||||
@ -485,185 +313,201 @@ ReturnValue_t pst::pstTcsAndAcs(FixedTimeslotTaskIF *thisSequence, AcsPstCfg cfg
|
|||||||
if (cfg.scheduleAcsBoard) {
|
if (cfg.scheduleAcsBoard) {
|
||||||
if (enableAside) {
|
if (enableAside) {
|
||||||
// A side
|
// A side
|
||||||
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * config::acs::SCHED_BLOCK_2_PERIOD,
|
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * config::spiSched::SCHED_BLOCK_2_PERIOD,
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * config::acs::SCHED_BLOCK_2_PERIOD,
|
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * config::spiSched::SCHED_BLOCK_2_PERIOD,
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * config::acs::SCHED_BLOCK_2_PERIOD,
|
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * config::spiSched::SCHED_BLOCK_2_PERIOD,
|
||||||
DeviceHandlerIF::GET_WRITE);
|
DeviceHandlerIF::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * config::acs::SCHED_BLOCK_3_PERIOD,
|
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * config::spiSched::SCHED_BLOCK_3_PERIOD,
|
||||||
DeviceHandlerIF::SEND_READ);
|
DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * config::acs::SCHED_BLOCK_3_PERIOD,
|
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * config::spiSched::SCHED_BLOCK_3_PERIOD,
|
||||||
DeviceHandlerIF::GET_READ);
|
DeviceHandlerIF::GET_READ);
|
||||||
|
|
||||||
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER,
|
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER,
|
||||||
length * config::acs::SCHED_BLOCK_2_PERIOD,
|
length * config::spiSched::SCHED_BLOCK_2_PERIOD,
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER,
|
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER,
|
||||||
length * config::acs::SCHED_BLOCK_2_PERIOD,
|
length * config::spiSched::SCHED_BLOCK_2_PERIOD,
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER,
|
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER,
|
||||||
length * config::acs::SCHED_BLOCK_2_PERIOD, DeviceHandlerIF::GET_WRITE);
|
length * config::spiSched::SCHED_BLOCK_2_PERIOD, DeviceHandlerIF::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER,
|
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER,
|
||||||
length * config::acs::SCHED_BLOCK_3_PERIOD, DeviceHandlerIF::SEND_READ);
|
length * config::spiSched::SCHED_BLOCK_3_PERIOD, DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER,
|
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER,
|
||||||
length * config::acs::SCHED_BLOCK_3_PERIOD, DeviceHandlerIF::GET_READ);
|
length * config::spiSched::SCHED_BLOCK_3_PERIOD, DeviceHandlerIF::GET_READ);
|
||||||
}
|
}
|
||||||
if (enableBside) {
|
if (enableBside) {
|
||||||
// B side
|
// B side
|
||||||
thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * config::acs::SCHED_BLOCK_2_PERIOD,
|
thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * config::spiSched::SCHED_BLOCK_2_PERIOD,
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * config::acs::SCHED_BLOCK_2_PERIOD,
|
thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * config::spiSched::SCHED_BLOCK_2_PERIOD,
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * config::acs::SCHED_BLOCK_2_PERIOD,
|
thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * config::spiSched::SCHED_BLOCK_2_PERIOD,
|
||||||
DeviceHandlerIF::GET_WRITE);
|
DeviceHandlerIF::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * config::acs::SCHED_BLOCK_3_PERIOD,
|
thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * config::spiSched::SCHED_BLOCK_3_PERIOD,
|
||||||
DeviceHandlerIF::SEND_READ);
|
DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * config::acs::SCHED_BLOCK_3_PERIOD,
|
thisSequence->addSlot(objects::MGM_2_LIS3_HANDLER, length * config::spiSched::SCHED_BLOCK_3_PERIOD,
|
||||||
DeviceHandlerIF::GET_READ);
|
DeviceHandlerIF::GET_READ);
|
||||||
|
|
||||||
thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER,
|
thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER,
|
||||||
length * config::acs::SCHED_BLOCK_2_PERIOD,
|
length * config::spiSched::SCHED_BLOCK_2_PERIOD,
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER,
|
thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER,
|
||||||
length * config::acs::SCHED_BLOCK_2_PERIOD,
|
length * config::spiSched::SCHED_BLOCK_2_PERIOD,
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER,
|
thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER,
|
||||||
length * config::acs::SCHED_BLOCK_2_PERIOD, DeviceHandlerIF::GET_WRITE);
|
length * config::spiSched::SCHED_BLOCK_2_PERIOD, DeviceHandlerIF::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER,
|
thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER,
|
||||||
length * config::acs::SCHED_BLOCK_3_PERIOD, DeviceHandlerIF::SEND_READ);
|
length * config::spiSched::SCHED_BLOCK_3_PERIOD, DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER,
|
thisSequence->addSlot(objects::MGM_3_RM3100_HANDLER,
|
||||||
length * config::acs::SCHED_BLOCK_3_PERIOD, DeviceHandlerIF::GET_READ);
|
length * config::spiSched::SCHED_BLOCK_3_PERIOD, DeviceHandlerIF::GET_READ);
|
||||||
}
|
}
|
||||||
if (enableAside) {
|
if (enableAside) {
|
||||||
thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER,
|
thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER,
|
||||||
length * config::acs::SCHED_BLOCK_2_PERIOD,
|
length * config::spiSched::SCHED_BLOCK_2_PERIOD,
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER,
|
thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER,
|
||||||
length * config::acs::SCHED_BLOCK_2_PERIOD,
|
length * config::spiSched::SCHED_BLOCK_2_PERIOD,
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER,
|
thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER,
|
||||||
length * config::acs::SCHED_BLOCK_2_PERIOD, DeviceHandlerIF::GET_WRITE);
|
length * config::spiSched::SCHED_BLOCK_2_PERIOD, DeviceHandlerIF::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER,
|
thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER,
|
||||||
length * config::acs::SCHED_BLOCK_3_PERIOD, DeviceHandlerIF::SEND_READ);
|
length * config::spiSched::SCHED_BLOCK_3_PERIOD, DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER,
|
thisSequence->addSlot(objects::GYRO_0_ADIS_HANDLER,
|
||||||
length * config::acs::SCHED_BLOCK_3_PERIOD, DeviceHandlerIF::GET_READ);
|
length * config::spiSched::SCHED_BLOCK_3_PERIOD, DeviceHandlerIF::GET_READ);
|
||||||
|
|
||||||
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * config::acs::SCHED_BLOCK_2_PERIOD,
|
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * config::spiSched::SCHED_BLOCK_2_PERIOD,
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * config::acs::SCHED_BLOCK_2_PERIOD,
|
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * config::spiSched::SCHED_BLOCK_2_PERIOD,
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * config::acs::SCHED_BLOCK_2_PERIOD,
|
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * config::spiSched::SCHED_BLOCK_2_PERIOD,
|
||||||
DeviceHandlerIF::GET_WRITE);
|
DeviceHandlerIF::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * config::acs::SCHED_BLOCK_3_PERIOD,
|
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * config::spiSched::SCHED_BLOCK_3_PERIOD,
|
||||||
DeviceHandlerIF::SEND_READ);
|
DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * config::acs::SCHED_BLOCK_3_PERIOD,
|
thisSequence->addSlot(objects::GYRO_1_L3G_HANDLER, length * config::spiSched::SCHED_BLOCK_3_PERIOD,
|
||||||
DeviceHandlerIF::GET_READ);
|
DeviceHandlerIF::GET_READ);
|
||||||
}
|
}
|
||||||
if (enableBside) {
|
if (enableBside) {
|
||||||
thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER,
|
thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER,
|
||||||
length * config::acs::SCHED_BLOCK_2_PERIOD,
|
length * config::spiSched::SCHED_BLOCK_2_PERIOD,
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER,
|
thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER,
|
||||||
length * config::acs::SCHED_BLOCK_2_PERIOD,
|
length * config::spiSched::SCHED_BLOCK_2_PERIOD,
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER,
|
thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER,
|
||||||
length * config::acs::SCHED_BLOCK_2_PERIOD, DeviceHandlerIF::GET_WRITE);
|
length * config::spiSched::SCHED_BLOCK_2_PERIOD, DeviceHandlerIF::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER,
|
thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER,
|
||||||
length * config::acs::SCHED_BLOCK_3_PERIOD, DeviceHandlerIF::SEND_READ);
|
length * config::spiSched::SCHED_BLOCK_3_PERIOD, DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER,
|
thisSequence->addSlot(objects::GYRO_2_ADIS_HANDLER,
|
||||||
length * config::acs::SCHED_BLOCK_3_PERIOD, DeviceHandlerIF::GET_READ);
|
length * config::spiSched::SCHED_BLOCK_3_PERIOD, DeviceHandlerIF::GET_READ);
|
||||||
|
|
||||||
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * config::acs::SCHED_BLOCK_2_PERIOD,
|
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * config::spiSched::SCHED_BLOCK_2_PERIOD,
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * config::acs::SCHED_BLOCK_2_PERIOD,
|
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * config::spiSched::SCHED_BLOCK_2_PERIOD,
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * config::acs::SCHED_BLOCK_2_PERIOD,
|
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * config::spiSched::SCHED_BLOCK_2_PERIOD,
|
||||||
DeviceHandlerIF::GET_WRITE);
|
DeviceHandlerIF::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * config::acs::SCHED_BLOCK_3_PERIOD,
|
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * config::spiSched::SCHED_BLOCK_3_PERIOD,
|
||||||
DeviceHandlerIF::SEND_READ);
|
DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * config::acs::SCHED_BLOCK_3_PERIOD,
|
thisSequence->addSlot(objects::GYRO_3_L3G_HANDLER, length * config::spiSched::SCHED_BLOCK_3_PERIOD,
|
||||||
DeviceHandlerIF::GET_READ);
|
DeviceHandlerIF::GET_READ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cfg.scheduleImtq) {
|
if (cfg.scheduleImtq) {
|
||||||
// This is the MTM measurement cycle
|
// This is the MTM measurement cycle
|
||||||
thisSequence->addSlot(objects::IMTQ_HANDLER, length * config::acs::SCHED_BLOCK_1_PERIOD,
|
thisSequence->addSlot(objects::IMTQ_HANDLER, length * config::spiSched::SCHED_BLOCK_1_PERIOD,
|
||||||
imtq::ComStep::DHB_OP);
|
imtq::ComStep::DHB_OP);
|
||||||
thisSequence->addSlot(objects::IMTQ_HANDLER, length * config::acs::SCHED_BLOCK_1_PERIOD,
|
thisSequence->addSlot(objects::IMTQ_HANDLER, length * config::spiSched::SCHED_BLOCK_1_PERIOD,
|
||||||
imtq::ComStep::START_MEASURE_SEND);
|
imtq::ComStep::START_MEASURE_SEND);
|
||||||
thisSequence->addSlot(objects::IMTQ_HANDLER, length * config::acs::SCHED_BLOCK_1_PERIOD,
|
thisSequence->addSlot(objects::IMTQ_HANDLER, length * config::spiSched::SCHED_BLOCK_1_PERIOD,
|
||||||
imtq::ComStep::START_MEASURE_GET);
|
imtq::ComStep::START_MEASURE_GET);
|
||||||
thisSequence->addSlot(objects::IMTQ_HANDLER, length * config::acs::SCHED_BLOCK_3_PERIOD,
|
thisSequence->addSlot(objects::IMTQ_HANDLER, length * config::spiSched::SCHED_BLOCK_3_PERIOD,
|
||||||
imtq::ComStep::READ_MEASURE_SEND);
|
imtq::ComStep::READ_MEASURE_SEND);
|
||||||
thisSequence->addSlot(objects::IMTQ_HANDLER, length * config::acs::SCHED_BLOCK_3_PERIOD,
|
thisSequence->addSlot(objects::IMTQ_HANDLER, length * config::spiSched::SCHED_BLOCK_3_PERIOD,
|
||||||
imtq::ComStep::READ_MEASURE_GET);
|
imtq::ComStep::READ_MEASURE_GET);
|
||||||
}
|
}
|
||||||
|
|
||||||
thisSequence->addSlot(objects::ACS_CONTROLLER, length * config::acs::SCHED_BLOCK_4_PERIOD, 0);
|
thisSequence->addSlot(objects::ACS_CONTROLLER, length * config::spiSched::SCHED_BLOCK_4_PERIOD, 0);
|
||||||
|
|
||||||
if (cfg.scheduleImtq) {
|
if (cfg.scheduleImtq) {
|
||||||
// This is the torquing cycle.
|
// This is the torquing cycle.
|
||||||
thisSequence->addSlot(objects::IMTQ_HANDLER, length * config::acs::SCHED_BLOCK_5_PERIOD,
|
thisSequence->addSlot(objects::IMTQ_HANDLER, length * config::spiSched::SCHED_BLOCK_5_PERIOD,
|
||||||
imtq::ComStep::START_ACTUATE_SEND);
|
imtq::ComStep::START_ACTUATE_SEND);
|
||||||
thisSequence->addSlot(objects::IMTQ_HANDLER, length * config::acs::SCHED_BLOCK_5_PERIOD,
|
thisSequence->addSlot(objects::IMTQ_HANDLER, length * config::spiSched::SCHED_BLOCK_5_PERIOD,
|
||||||
imtq::ComStep::START_ACTUATE_GET);
|
imtq::ComStep::START_ACTUATE_GET);
|
||||||
thisSequence->addSlot(objects::IMTQ_HANDLER, length * config::acs::SCHED_BLOCK_6_PERIOD,
|
thisSequence->addSlot(objects::IMTQ_HANDLER, length * config::spiSched::SCHED_BLOCK_6_PERIOD,
|
||||||
imtq::ComStep::READ_ACTUATE_SEND);
|
imtq::ComStep::READ_ACTUATE_SEND);
|
||||||
thisSequence->addSlot(objects::IMTQ_HANDLER, length * config::acs::SCHED_BLOCK_6_PERIOD,
|
thisSequence->addSlot(objects::IMTQ_HANDLER, length * config::spiSched::SCHED_BLOCK_6_PERIOD,
|
||||||
imtq::ComStep::READ_ACTUATE_GET);
|
imtq::ComStep::READ_ACTUATE_GET);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cfg.scheduleRws) {
|
if (cfg.scheduleRws) {
|
||||||
// this is the torquing cycle
|
// this is the torquing cycle
|
||||||
thisSequence->addSlot(objects::RW1, length * config::acs::SCHED_BLOCK_5_PERIOD,
|
thisSequence->addSlot(objects::RW1, length * config::spiSched::SCHED_BLOCK_5_PERIOD,
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
thisSequence->addSlot(objects::RW2, length * config::acs::SCHED_BLOCK_5_PERIOD,
|
thisSequence->addSlot(objects::RW2, length * config::spiSched::SCHED_BLOCK_5_PERIOD,
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
thisSequence->addSlot(objects::RW3, length * config::acs::SCHED_BLOCK_5_PERIOD,
|
thisSequence->addSlot(objects::RW3, length * config::spiSched::SCHED_BLOCK_5_PERIOD,
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
thisSequence->addSlot(objects::RW4, length * config::acs::SCHED_BLOCK_5_PERIOD,
|
thisSequence->addSlot(objects::RW4, length * config::spiSched::SCHED_BLOCK_5_PERIOD,
|
||||||
DeviceHandlerIF::PERFORM_OPERATION);
|
DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
|
|
||||||
thisSequence->addSlot(objects::RW1, length * config::acs::SCHED_BLOCK_5_PERIOD,
|
thisSequence->addSlot(objects::RW1, length * config::spiSched::SCHED_BLOCK_5_PERIOD,
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
thisSequence->addSlot(objects::RW2, length * config::acs::SCHED_BLOCK_5_PERIOD,
|
thisSequence->addSlot(objects::RW2, length * config::spiSched::SCHED_BLOCK_5_PERIOD,
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
thisSequence->addSlot(objects::RW3, length * config::acs::SCHED_BLOCK_5_PERIOD,
|
thisSequence->addSlot(objects::RW3, length * config::spiSched::SCHED_BLOCK_5_PERIOD,
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
thisSequence->addSlot(objects::RW4, length * config::acs::SCHED_BLOCK_5_PERIOD,
|
thisSequence->addSlot(objects::RW4, length * config::spiSched::SCHED_BLOCK_5_PERIOD,
|
||||||
DeviceHandlerIF::SEND_WRITE);
|
DeviceHandlerIF::SEND_WRITE);
|
||||||
|
|
||||||
thisSequence->addSlot(objects::RW1, length * config::acs::SCHED_BLOCK_5_PERIOD,
|
thisSequence->addSlot(objects::RW1, length * config::spiSched::SCHED_BLOCK_5_PERIOD,
|
||||||
DeviceHandlerIF::GET_WRITE);
|
DeviceHandlerIF::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::RW2, length * config::acs::SCHED_BLOCK_5_PERIOD,
|
thisSequence->addSlot(objects::RW2, length * config::spiSched::SCHED_BLOCK_5_PERIOD,
|
||||||
DeviceHandlerIF::GET_WRITE);
|
DeviceHandlerIF::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::RW3, length * config::acs::SCHED_BLOCK_5_PERIOD,
|
thisSequence->addSlot(objects::RW3, length * config::spiSched::SCHED_BLOCK_5_PERIOD,
|
||||||
DeviceHandlerIF::GET_WRITE);
|
DeviceHandlerIF::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::RW4, length * config::acs::SCHED_BLOCK_5_PERIOD,
|
thisSequence->addSlot(objects::RW4, length * config::spiSched::SCHED_BLOCK_5_PERIOD,
|
||||||
DeviceHandlerIF::GET_WRITE);
|
DeviceHandlerIF::GET_WRITE);
|
||||||
|
|
||||||
thisSequence->addSlot(objects::RW1, length * config::acs::SCHED_BLOCK_7_PERIOD,
|
thisSequence->addSlot(objects::RW1, length * config::spiSched::SCHED_BLOCK_7_PERIOD,
|
||||||
DeviceHandlerIF::SEND_READ);
|
DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::RW2, length * config::acs::SCHED_BLOCK_7_PERIOD,
|
thisSequence->addSlot(objects::RW2, length * config::spiSched::SCHED_BLOCK_7_PERIOD,
|
||||||
DeviceHandlerIF::SEND_READ);
|
DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::RW3, length * config::acs::SCHED_BLOCK_7_PERIOD,
|
thisSequence->addSlot(objects::RW3, length * config::spiSched::SCHED_BLOCK_7_PERIOD,
|
||||||
DeviceHandlerIF::SEND_READ);
|
DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::RW4, length * config::acs::SCHED_BLOCK_7_PERIOD,
|
thisSequence->addSlot(objects::RW4, length * config::spiSched::SCHED_BLOCK_7_PERIOD,
|
||||||
DeviceHandlerIF::SEND_READ);
|
DeviceHandlerIF::SEND_READ);
|
||||||
|
|
||||||
thisSequence->addSlot(objects::RW1, length * config::acs::SCHED_BLOCK_7_PERIOD,
|
thisSequence->addSlot(objects::RW1, length * config::spiSched::SCHED_BLOCK_7_PERIOD,
|
||||||
DeviceHandlerIF::GET_READ);
|
DeviceHandlerIF::GET_READ);
|
||||||
thisSequence->addSlot(objects::RW2, length * config::acs::SCHED_BLOCK_7_PERIOD,
|
thisSequence->addSlot(objects::RW2, length * config::spiSched::SCHED_BLOCK_7_PERIOD,
|
||||||
DeviceHandlerIF::GET_READ);
|
DeviceHandlerIF::GET_READ);
|
||||||
thisSequence->addSlot(objects::RW3, length * config::acs::SCHED_BLOCK_7_PERIOD,
|
thisSequence->addSlot(objects::RW3, length * config::spiSched::SCHED_BLOCK_7_PERIOD,
|
||||||
DeviceHandlerIF::GET_READ);
|
DeviceHandlerIF::GET_READ);
|
||||||
thisSequence->addSlot(objects::RW4, length * config::acs::SCHED_BLOCK_7_PERIOD,
|
thisSequence->addSlot(objects::RW4, length * config::spiSched::SCHED_BLOCK_7_PERIOD,
|
||||||
DeviceHandlerIF::GET_READ);
|
DeviceHandlerIF::GET_READ);
|
||||||
}
|
}
|
||||||
|
|
||||||
thisSequence->addSlot(objects::SPI_RTD_COM_IF, length * config::acs::SCHED_BLOCK_RTD_PERIOD, 0);
|
thisSequence->addSlot(objects::SPI_RTD_COM_IF, length * config::spiSched::SCHED_BLOCK_RTD_PERIOD, 0);
|
||||||
|
|
||||||
|
#if OBSW_ADD_PL_PCDU == 1
|
||||||
|
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * config::spiSched::SCHED_BLOCK_8_PERIOD, DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
|
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * config::spiSched::SCHED_BLOCK_8_PERIOD, DeviceHandlerIF::SEND_WRITE);
|
||||||
|
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * config::spiSched::SCHED_BLOCK_8_PERIOD, DeviceHandlerIF::GET_WRITE);
|
||||||
|
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * config::spiSched::SCHED_BLOCK_8_PERIOD, DeviceHandlerIF::SEND_READ);
|
||||||
|
thisSequence->addSlot(objects::PLPCDU_HANDLER, length * config::spiSched::SCHED_BLOCK_8_PERIOD, DeviceHandlerIF::GET_READ);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if OBSW_ADD_RAD_SENSORS == 1
|
||||||
|
/* Radiation sensor */
|
||||||
|
thisSequence->addSlot(objects::RAD_SENSOR, length * config::spiSched::SCHED_BLOCK_9_PERIOD, DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
|
thisSequence->addSlot(objects::RAD_SENSOR, length * config::spiSched::SCHED_BLOCK_9_PERIOD, DeviceHandlerIF::SEND_WRITE);
|
||||||
|
thisSequence->addSlot(objects::RAD_SENSOR, length * config::spiSched::SCHED_BLOCK_9_PERIOD, DeviceHandlerIF::GET_WRITE);
|
||||||
|
thisSequence->addSlot(objects::RAD_SENSOR, length * config::spiSched::SCHED_BLOCK_9_PERIOD, DeviceHandlerIF::SEND_READ);
|
||||||
|
thisSequence->addSlot(objects::RAD_SENSOR, length * config::spiSched::SCHED_BLOCK_9_PERIOD, DeviceHandlerIF::GET_READ);
|
||||||
|
#endif
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
233
mission/devices/LegacySusHandler.cpp
Normal file
233
mission/devices/LegacySusHandler.cpp
Normal file
@ -0,0 +1,233 @@
|
|||||||
|
#include <fsfw/datapool/PoolReadGuard.h>
|
||||||
|
#include <fsfw/globalfunctions/arrayprinter.h>
|
||||||
|
#include <mission/devices/LegacySusHandler.h>
|
||||||
|
|
||||||
|
#include "OBSWConfig.h"
|
||||||
|
|
||||||
|
LegacySusHandler::LegacySusHandler(object_id_t objectId, uint8_t susIdx, object_id_t comIF,
|
||||||
|
CookieIF *comCookie)
|
||||||
|
: DeviceHandlerBase(objectId, comIF, comCookie), divider(5), dataset(this), susIdx(susIdx) {}
|
||||||
|
|
||||||
|
LegacySusHandler::~LegacySusHandler() {}
|
||||||
|
|
||||||
|
void LegacySusHandler::doStartUp() {
|
||||||
|
if (comState == ComStates::IDLE) {
|
||||||
|
comState = ComStates::WRITE_SETUP;
|
||||||
|
commandExecuted = false;
|
||||||
|
}
|
||||||
|
if (comState == ComStates::WRITE_SETUP) {
|
||||||
|
if (commandExecuted) {
|
||||||
|
if (goToNormalModeImmediately) {
|
||||||
|
setMode(MODE_NORMAL);
|
||||||
|
} else {
|
||||||
|
setMode(_MODE_TO_ON);
|
||||||
|
}
|
||||||
|
commandExecuted = false;
|
||||||
|
if (clkMode == ClkModes::INT_CLOCKED) {
|
||||||
|
comState = ComStates::START_INT_CLOCKED_CONVERSIONS;
|
||||||
|
} else {
|
||||||
|
comState = ComStates::EXT_CLOCKED_CONVERSIONS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void LegacySusHandler::doShutDown() {
|
||||||
|
setMode(_MODE_POWER_DOWN);
|
||||||
|
comState = ComStates::IDLE;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t LegacySusHandler::buildNormalDeviceCommand(DeviceCommandId_t *id) {
|
||||||
|
switch (comState) {
|
||||||
|
case (ComStates::IDLE): {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case (ComStates::WRITE_SETUP): {
|
||||||
|
*id = susMax1227::WRITE_SETUP;
|
||||||
|
return buildCommandFromCommand(*id, nullptr, 0);
|
||||||
|
}
|
||||||
|
case (ComStates::EXT_CLOCKED_CONVERSIONS): {
|
||||||
|
*id = susMax1227::READ_EXT_TIMED_CONVERSIONS;
|
||||||
|
return buildCommandFromCommand(*id, nullptr, 0);
|
||||||
|
}
|
||||||
|
case (ComStates::START_INT_CLOCKED_CONVERSIONS): {
|
||||||
|
*id = susMax1227::START_INT_TIMED_CONVERSIONS;
|
||||||
|
comState = ComStates::READ_INT_CLOCKED_CONVERSIONS;
|
||||||
|
return buildCommandFromCommand(*id, nullptr, 0);
|
||||||
|
}
|
||||||
|
case (ComStates::READ_INT_CLOCKED_CONVERSIONS): {
|
||||||
|
*id = susMax1227::READ_INT_TIMED_CONVERSIONS;
|
||||||
|
comState = ComStates::START_INT_CLOCKED_CONVERSIONS;
|
||||||
|
return buildCommandFromCommand(*id, nullptr, 0);
|
||||||
|
}
|
||||||
|
case (ComStates::EXT_CLOCKED_TEMP): {
|
||||||
|
*id = susMax1227::READ_EXT_TIMED_TEMPS;
|
||||||
|
return buildCommandFromCommand(*id, nullptr, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return NOTHING_TO_SEND;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t LegacySusHandler::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
|
||||||
|
if (comState == ComStates::WRITE_SETUP) {
|
||||||
|
*id = susMax1227::WRITE_SETUP;
|
||||||
|
return buildCommandFromCommand(*id, nullptr, 0);
|
||||||
|
}
|
||||||
|
return NOTHING_TO_SEND;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t LegacySusHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
||||||
|
const uint8_t *commandData,
|
||||||
|
size_t commandDataLen) {
|
||||||
|
using namespace max1227;
|
||||||
|
switch (deviceCommand) {
|
||||||
|
case (susMax1227::WRITE_SETUP): {
|
||||||
|
if (clkMode == ClkModes::INT_CLOCKED) {
|
||||||
|
cmdBuffer[0] = susMax1227::SETUP_INT_CLOKED;
|
||||||
|
} else {
|
||||||
|
cmdBuffer[0] = susMax1227::SETUP_EXT_CLOCKED;
|
||||||
|
}
|
||||||
|
|
||||||
|
rawPacket = cmdBuffer;
|
||||||
|
rawPacketLen = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case (susMax1227::START_INT_TIMED_CONVERSIONS): {
|
||||||
|
std::memset(cmdBuffer, 0, sizeof(cmdBuffer));
|
||||||
|
cmdBuffer[0] = max1227::buildResetByte(true);
|
||||||
|
cmdBuffer[1] = susMax1227::CONVERSION;
|
||||||
|
rawPacket = cmdBuffer;
|
||||||
|
rawPacketLen = 2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case (susMax1227::READ_INT_TIMED_CONVERSIONS): {
|
||||||
|
std::memset(cmdBuffer, 0, sizeof(cmdBuffer));
|
||||||
|
rawPacket = cmdBuffer;
|
||||||
|
rawPacketLen = susMax1227::SIZE_READ_INT_CONVERSIONS;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case (susMax1227::READ_EXT_TIMED_CONVERSIONS): {
|
||||||
|
std::memset(cmdBuffer, 0, sizeof(cmdBuffer));
|
||||||
|
rawPacket = cmdBuffer;
|
||||||
|
for (uint8_t idx = 0; idx < 6; idx++) {
|
||||||
|
cmdBuffer[idx * 2] = buildConvByte(ScanModes::N_ONCE, idx, false);
|
||||||
|
cmdBuffer[idx * 2 + 1] = 0;
|
||||||
|
}
|
||||||
|
cmdBuffer[12] = 0x00;
|
||||||
|
rawPacketLen = susMax1227::SIZE_READ_EXT_CONVERSIONS;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case (susMax1227::READ_EXT_TIMED_TEMPS): {
|
||||||
|
cmdBuffer[0] = buildConvByte(ScanModes::N_ONCE, 0, true);
|
||||||
|
std::memset(cmdBuffer + 1, 0, 24);
|
||||||
|
rawPacket = cmdBuffer;
|
||||||
|
rawPacketLen = 25;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
return DeviceHandlerIF::COMMAND_NOT_IMPLEMENTED;
|
||||||
|
}
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void LegacySusHandler::fillCommandAndReplyMap() {
|
||||||
|
insertInCommandAndReplyMap(susMax1227::WRITE_SETUP, 1);
|
||||||
|
insertInCommandAndReplyMap(susMax1227::START_INT_TIMED_CONVERSIONS, 1);
|
||||||
|
insertInCommandAndReplyMap(susMax1227::READ_INT_TIMED_CONVERSIONS, 1, &dataset,
|
||||||
|
susMax1227::SIZE_READ_INT_CONVERSIONS);
|
||||||
|
insertInCommandAndReplyMap(susMax1227::READ_EXT_TIMED_CONVERSIONS, 1, &dataset,
|
||||||
|
susMax1227::SIZE_READ_EXT_CONVERSIONS);
|
||||||
|
insertInCommandAndReplyMap(susMax1227::READ_EXT_TIMED_TEMPS, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t LegacySusHandler::scanForReply(const uint8_t *start, size_t remainingSize,
|
||||||
|
DeviceCommandId_t *foundId, size_t *foundLen) {
|
||||||
|
*foundId = this->getPendingCommand();
|
||||||
|
*foundLen = remainingSize;
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t LegacySusHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
||||||
|
switch (id) {
|
||||||
|
case susMax1227::WRITE_SETUP: {
|
||||||
|
if (getMode() == _MODE_START_UP) {
|
||||||
|
commandExecuted = true;
|
||||||
|
}
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
case susMax1227::START_INT_TIMED_CONVERSIONS: {
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
case susMax1227::READ_INT_TIMED_CONVERSIONS: {
|
||||||
|
PoolReadGuard readSet(&dataset);
|
||||||
|
dataset.tempC = max1227::getTemperature(((packet[0] & 0x0f) << 8) | packet[1]);
|
||||||
|
for (uint8_t idx = 0; idx < 6; idx++) {
|
||||||
|
dataset.channels[idx] = packet[idx * 2 + 2] << 8 | packet[idx * 2 + 3];
|
||||||
|
}
|
||||||
|
dataset.setValidity(true, true);
|
||||||
|
printDataset();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case (susMax1227::READ_EXT_TIMED_CONVERSIONS): {
|
||||||
|
PoolReadGuard readSet(&dataset);
|
||||||
|
for (uint8_t idx = 0; idx < 6; idx++) {
|
||||||
|
dataset.channels[idx] = packet[idx * 2 + 1] << 8 | packet[idx * 2 + 2];
|
||||||
|
}
|
||||||
|
dataset.channels.setValid(true);
|
||||||
|
// Read temperature in next read cycle
|
||||||
|
if (clkMode == ClkModes::EXT_CLOCKED_WITH_TEMP) {
|
||||||
|
comState = ComStates::EXT_CLOCKED_TEMP;
|
||||||
|
}
|
||||||
|
printDataset();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case (susMax1227::READ_EXT_TIMED_TEMPS): {
|
||||||
|
PoolReadGuard readSet(&dataset);
|
||||||
|
dataset.tempC = max1227::getTemperature(((packet[23] & 0x0f) << 8) | packet[24]);
|
||||||
|
dataset.tempC.setValid(true);
|
||||||
|
comState = ComStates::EXT_CLOCKED_CONVERSIONS;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
sif::debug << "SusHandler::interpretDeviceReply: Unknown reply id" << std::endl;
|
||||||
|
return DeviceHandlerIF::UNKNOWN_DEVICE_REPLY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t LegacySusHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 3000; }
|
||||||
|
|
||||||
|
ReturnValue_t LegacySusHandler::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
|
LocalDataPoolManager &poolManager) {
|
||||||
|
localDataPoolMap.emplace(susMax1227::TEMPERATURE_C, &tempC);
|
||||||
|
localDataPoolMap.emplace(susMax1227::CHANNEL_VEC, &channelVec);
|
||||||
|
poolManager.subscribeForDiagPeriodicPacket(
|
||||||
|
subdp::DiagnosticsHkPeriodicParams(dataset.getSid(), false, 5.0));
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void LegacySusHandler::setToGoToNormalMode(bool enable) {
|
||||||
|
this->goToNormalModeImmediately = enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
void LegacySusHandler::printDataset() {
|
||||||
|
if (periodicPrintout) {
|
||||||
|
if (divider.checkAndIncrement()) {
|
||||||
|
sif::info << "SUS ADC " << static_cast<int>(susIdx) << " hex [" << std::setfill('0')
|
||||||
|
<< std::hex;
|
||||||
|
for (uint8_t idx = 0; idx < 6; idx++) {
|
||||||
|
sif::info << std::setw(3) << dataset.channels[idx];
|
||||||
|
if (idx < 6 - 1) {
|
||||||
|
sif::info << ",";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sif::info << "] | T[C] " << std::dec << dataset.tempC.value << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void LegacySusHandler::enablePeriodicPrintout(bool enable, uint8_t divider) {
|
||||||
|
this->periodicPrintout = enable;
|
||||||
|
this->divider.setDivider(divider);
|
||||||
|
}
|
92
mission/devices/LegacySusHandler.h
Normal file
92
mission/devices/LegacySusHandler.h
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
#ifndef MISSION_DEVICES_LEGACYSUSHANDLER_H_
|
||||||
|
#define MISSION_DEVICES_LEGACYSUSHANDLER_H_
|
||||||
|
|
||||||
|
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
||||||
|
#include <mission/devices/devicedefinitions/susMax1227Helpers.h>
|
||||||
|
|
||||||
|
#include "events/subsystemIdRanges.h"
|
||||||
|
#include "fsfw/globalfunctions/PeriodicOperationDivider.h"
|
||||||
|
#include "mission/devices/max1227.h"
|
||||||
|
#include "returnvalues/classIds.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This is the device handler class for the SUS sensor based on the MAX1227 ADC.
|
||||||
|
*
|
||||||
|
* @details
|
||||||
|
* Datasheet of MAX1227: https://datasheets.maximintegrated.com/en/ds/MAX1227-MAX1231.pdf
|
||||||
|
* Details about the SUS electronic can be found at
|
||||||
|
* https://egit.irs.uni-stuttgart.de/eive/eive_dokumente/src/branch/master/400_Raumsegment/443_SunSensorDocumentation/release
|
||||||
|
*
|
||||||
|
* @note When adding a SusHandler to the polling sequence table make sure to add a slot with
|
||||||
|
* the executionStep FIRST_WRITE. Otherwise the communication sequence will never be
|
||||||
|
* started.
|
||||||
|
*
|
||||||
|
* @author J. Meier
|
||||||
|
*/
|
||||||
|
class LegacySusHandler : public DeviceHandlerBase {
|
||||||
|
public:
|
||||||
|
enum ClkModes { INT_CLOCKED, EXT_CLOCKED, EXT_CLOCKED_WITH_TEMP };
|
||||||
|
|
||||||
|
static const uint8_t FIRST_WRITE = 7;
|
||||||
|
|
||||||
|
LegacySusHandler(object_id_t objectId, uint8_t susIdx, object_id_t comIF, CookieIF* comCookie);
|
||||||
|
virtual ~LegacySusHandler();
|
||||||
|
|
||||||
|
void enablePeriodicPrintout(bool enable, uint8_t divider);
|
||||||
|
|
||||||
|
void setToGoToNormalMode(bool enable);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void doStartUp() override;
|
||||||
|
void doShutDown() override;
|
||||||
|
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t* id) override;
|
||||||
|
ReturnValue_t buildTransitionDeviceCommand(DeviceCommandId_t* id) override;
|
||||||
|
void fillCommandAndReplyMap() override;
|
||||||
|
ReturnValue_t buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t* commandData,
|
||||||
|
size_t commandDataLen) override;
|
||||||
|
ReturnValue_t scanForReply(const uint8_t* start, size_t remainingSize, DeviceCommandId_t* foundId,
|
||||||
|
size_t* foundLen) override;
|
||||||
|
ReturnValue_t interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) override;
|
||||||
|
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
|
||||||
|
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||||
|
LocalDataPoolManager& poolManager) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
static const uint8_t INTERFACE_ID = CLASS_ID::SUS_HANDLER;
|
||||||
|
|
||||||
|
static const ReturnValue_t ERROR_UNLOCK_MUTEX = MAKE_RETURN_CODE(0xA0);
|
||||||
|
static const ReturnValue_t ERROR_LOCK_MUTEX = MAKE_RETURN_CODE(0xA1);
|
||||||
|
|
||||||
|
enum class ComStates {
|
||||||
|
IDLE,
|
||||||
|
WRITE_SETUP,
|
||||||
|
EXT_CLOCKED_CONVERSIONS,
|
||||||
|
EXT_CLOCKED_TEMP,
|
||||||
|
START_INT_CLOCKED_CONVERSIONS,
|
||||||
|
READ_INT_CLOCKED_CONVERSIONS
|
||||||
|
};
|
||||||
|
|
||||||
|
bool periodicPrintout = false;
|
||||||
|
PeriodicOperationDivider divider;
|
||||||
|
bool goToNormalModeImmediately = false;
|
||||||
|
bool commandExecuted = false;
|
||||||
|
|
||||||
|
susMax1227::SusDataset dataset;
|
||||||
|
// Read temperature in each alternating communication step when using
|
||||||
|
// externally clocked mode
|
||||||
|
ClkModes clkMode = ClkModes::INT_CLOCKED;
|
||||||
|
PoolEntry<float> tempC = PoolEntry<float>({0.0});
|
||||||
|
PoolEntry<uint16_t> channelVec = PoolEntry<uint16_t>({0, 0, 0, 0, 0, 0});
|
||||||
|
|
||||||
|
uint8_t susIdx = 0;
|
||||||
|
uint8_t cmdBuffer[susMax1227::MAX_CMD_SIZE];
|
||||||
|
ComStates comState = ComStates::IDLE;
|
||||||
|
|
||||||
|
MutexIF::TimeoutType timeoutType = MutexIF::TimeoutType::WAITING;
|
||||||
|
uint32_t timeoutMs = 20;
|
||||||
|
void printDataset();
|
||||||
|
|
||||||
|
MutexIF* spiMutex = nullptr;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* MISSION_DEVICES_LEGACYSUSHANDLER_H_ */
|
@ -25,8 +25,6 @@ class MgmLis3CustomHandler : public DeviceHandlerBase {
|
|||||||
|
|
||||||
static const uint8_t INTERFACE_ID = CLASS_ID::MGM_LIS3MDL;
|
static const uint8_t INTERFACE_ID = CLASS_ID::MGM_LIS3MDL;
|
||||||
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::MGM_LIS3MDL;
|
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::MGM_LIS3MDL;
|
||||||
// Notifies a command to change the setup parameters
|
|
||||||
static const Event CHANGE_OF_SETUP_PARAMETER = MAKE_EVENT(0, severity::LOW);
|
|
||||||
|
|
||||||
MgmLis3CustomHandler(uint32_t objectId, object_id_t deviceCommunication, CookieIF *comCookie,
|
MgmLis3CustomHandler(uint32_t objectId, object_id_t deviceCommunication, CookieIF *comCookie,
|
||||||
uint32_t transitionDelay);
|
uint32_t transitionDelay);
|
||||||
|
@ -1,231 +1,128 @@
|
|||||||
#include "SusHandler.h"
|
#include "SusHandler.h"
|
||||||
|
|
||||||
#include <fsfw/datapool/PoolReadGuard.h>
|
#include <mission/devices/max1227.h>
|
||||||
#include <fsfw/globalfunctions/arrayprinter.h>
|
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include <cmath>
|
||||||
|
|
||||||
SusHandler::SusHandler(object_id_t objectId, uint8_t susIdx, object_id_t comIF, CookieIF *comCookie)
|
#include "fsfw/datapool/PoolReadGuard.h"
|
||||||
: DeviceHandlerBase(objectId, comIF, comCookie), divider(5), dataset(this), susIdx(susIdx) {}
|
|
||||||
|
|
||||||
SusHandler::~SusHandler() {}
|
SusHandler::SusHandler(object_id_t objectId, uint8_t susIdx, object_id_t deviceCommunication,
|
||||||
|
CookieIF *comCookie)
|
||||||
|
: DeviceHandlerBase(objectId, deviceCommunication, comCookie), dataset(this), susIdx(susIdx) {}
|
||||||
|
|
||||||
|
SusHandler::~SusHandler() = default;
|
||||||
|
|
||||||
void SusHandler::doStartUp() {
|
void SusHandler::doStartUp() {
|
||||||
if (comState == ComStates::IDLE) {
|
if (internalState != InternalState::STARTUP) {
|
||||||
comState = ComStates::WRITE_SETUP;
|
|
||||||
commandExecuted = false;
|
commandExecuted = false;
|
||||||
|
updatePeriodicReply(true, REPLY);
|
||||||
|
internalState = InternalState::STARTUP;
|
||||||
}
|
}
|
||||||
if (comState == ComStates::WRITE_SETUP) {
|
if (internalState == InternalState::STARTUP) {
|
||||||
if (commandExecuted) {
|
if (commandExecuted) {
|
||||||
if (goToNormalModeImmediately) {
|
|
||||||
setMode(MODE_NORMAL);
|
setMode(MODE_NORMAL);
|
||||||
} else {
|
internalState = InternalState::NONE;
|
||||||
setMode(_MODE_TO_ON);
|
|
||||||
}
|
|
||||||
commandExecuted = false;
|
commandExecuted = false;
|
||||||
if (clkMode == ClkModes::INT_CLOCKED) {
|
|
||||||
comState = ComStates::START_INT_CLOCKED_CONVERSIONS;
|
|
||||||
} else {
|
|
||||||
comState = ComStates::EXT_CLOCKED_CONVERSIONS;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SusHandler::doShutDown() {
|
void SusHandler::doShutDown() {
|
||||||
|
if (internalState != InternalState::SHUTDOWN) {
|
||||||
|
dataset.setValidity(false, true);
|
||||||
|
internalState = InternalState::SHUTDOWN;
|
||||||
|
commandExecuted = false;
|
||||||
|
}
|
||||||
|
if (internalState == InternalState::SHUTDOWN and commandExecuted) {
|
||||||
|
updatePeriodicReply(false, REPLY);
|
||||||
|
commandExecuted = false;
|
||||||
|
internalState = InternalState::NONE;
|
||||||
setMode(_MODE_POWER_DOWN);
|
setMode(_MODE_POWER_DOWN);
|
||||||
comState = ComStates::IDLE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t SusHandler::buildNormalDeviceCommand(DeviceCommandId_t *id) {
|
|
||||||
switch (comState) {
|
|
||||||
case (ComStates::IDLE): {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case (ComStates::WRITE_SETUP): {
|
|
||||||
*id = SUS::WRITE_SETUP;
|
|
||||||
return buildCommandFromCommand(*id, nullptr, 0);
|
|
||||||
}
|
|
||||||
case (ComStates::EXT_CLOCKED_CONVERSIONS): {
|
|
||||||
*id = SUS::READ_EXT_TIMED_CONVERSIONS;
|
|
||||||
return buildCommandFromCommand(*id, nullptr, 0);
|
|
||||||
}
|
|
||||||
case (ComStates::START_INT_CLOCKED_CONVERSIONS): {
|
|
||||||
*id = SUS::START_INT_TIMED_CONVERSIONS;
|
|
||||||
comState = ComStates::READ_INT_CLOCKED_CONVERSIONS;
|
|
||||||
return buildCommandFromCommand(*id, nullptr, 0);
|
|
||||||
}
|
|
||||||
case (ComStates::READ_INT_CLOCKED_CONVERSIONS): {
|
|
||||||
*id = SUS::READ_INT_TIMED_CONVERSIONS;
|
|
||||||
comState = ComStates::START_INT_CLOCKED_CONVERSIONS;
|
|
||||||
return buildCommandFromCommand(*id, nullptr, 0);
|
|
||||||
}
|
|
||||||
case (ComStates::EXT_CLOCKED_TEMP): {
|
|
||||||
*id = SUS::READ_EXT_TIMED_TEMPS;
|
|
||||||
return buildCommandFromCommand(*id, nullptr, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return NOTHING_TO_SEND;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t SusHandler::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
|
ReturnValue_t SusHandler::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
|
||||||
if (comState == ComStates::WRITE_SETUP) {
|
if (internalState == InternalState::STARTUP) {
|
||||||
*id = SUS::WRITE_SETUP;
|
*id = REQUEST;
|
||||||
return buildCommandFromCommand(*id, nullptr, 0);
|
return prepareRequest(acs::SimpleSensorMode::NORMAL);
|
||||||
|
} else if (internalState == InternalState::SHUTDOWN) {
|
||||||
|
*id = REQUEST;
|
||||||
|
return prepareRequest(acs::SimpleSensorMode::OFF);
|
||||||
}
|
}
|
||||||
return NOTHING_TO_SEND;
|
return NOTHING_TO_SEND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ReturnValue_t SusHandler::buildNormalDeviceCommand(DeviceCommandId_t *id) {
|
||||||
|
*id = REQUEST;
|
||||||
|
return prepareRequest(acs::SimpleSensorMode::NORMAL);
|
||||||
|
}
|
||||||
|
|
||||||
ReturnValue_t SusHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
ReturnValue_t SusHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
||||||
const uint8_t *commandData,
|
const uint8_t *commandData,
|
||||||
size_t commandDataLen) {
|
size_t commandDataLen) {
|
||||||
using namespace max1227;
|
return NOTHING_TO_SEND;
|
||||||
switch (deviceCommand) {
|
|
||||||
case (SUS::WRITE_SETUP): {
|
|
||||||
if (clkMode == ClkModes::INT_CLOCKED) {
|
|
||||||
cmdBuffer[0] = SUS::SETUP_INT_CLOKED;
|
|
||||||
} else {
|
|
||||||
cmdBuffer[0] = SUS::SETUP_EXT_CLOCKED;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rawPacket = cmdBuffer;
|
ReturnValue_t SusHandler::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
|
||||||
rawPacketLen = 1;
|
size_t *foundLen) {
|
||||||
break;
|
if (getMode() == _MODE_WAIT_OFF or getMode() == _MODE_WAIT_ON) {
|
||||||
|
return IGNORE_FULL_PACKET;
|
||||||
}
|
}
|
||||||
case (SUS::START_INT_TIMED_CONVERSIONS): {
|
if (len != sizeof(acs::SusReply)) {
|
||||||
std::memset(cmdBuffer, 0, sizeof(cmdBuffer));
|
*foundLen = len;
|
||||||
cmdBuffer[0] = max1227::buildResetByte(true);
|
return returnvalue::FAILED;
|
||||||
cmdBuffer[1] = SUS::CONVERSION;
|
|
||||||
rawPacket = cmdBuffer;
|
|
||||||
rawPacketLen = 2;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case (SUS::READ_INT_TIMED_CONVERSIONS): {
|
*foundId = REPLY;
|
||||||
std::memset(cmdBuffer, 0, sizeof(cmdBuffer));
|
*foundLen = len;
|
||||||
rawPacket = cmdBuffer;
|
if (internalState == InternalState::SHUTDOWN) {
|
||||||
rawPacketLen = SUS::SIZE_READ_INT_CONVERSIONS;
|
commandExecuted = true;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case (SUS::READ_EXT_TIMED_CONVERSIONS): {
|
return returnvalue::OK;
|
||||||
std::memset(cmdBuffer, 0, sizeof(cmdBuffer));
|
|
||||||
rawPacket = cmdBuffer;
|
|
||||||
for (uint8_t idx = 0; idx < 6; idx++) {
|
|
||||||
cmdBuffer[idx * 2] = buildConvByte(ScanModes::N_ONCE, idx, false);
|
|
||||||
cmdBuffer[idx * 2 + 1] = 0;
|
|
||||||
}
|
}
|
||||||
cmdBuffer[12] = 0x00;
|
ReturnValue_t SusHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
||||||
rawPacketLen = SUS::SIZE_READ_EXT_CONVERSIONS;
|
const auto *reply = reinterpret_cast<const acs::SusReply *>(packet);
|
||||||
break;
|
if (reply->dataWasSet) {
|
||||||
|
if (internalState == InternalState::STARTUP) {
|
||||||
|
commandExecuted = true;
|
||||||
}
|
}
|
||||||
case (SUS::READ_EXT_TIMED_TEMPS): {
|
PoolReadGuard pg(&dataset);
|
||||||
cmdBuffer[0] = buildConvByte(ScanModes::N_ONCE, 0, true);
|
dataset.setValidity(true, true);
|
||||||
std::memset(cmdBuffer + 1, 0, 24);
|
dataset.tempC = max1227::getTemperature(reply->tempRaw);
|
||||||
rawPacket = cmdBuffer;
|
std::memcpy(dataset.channels.value, reply->channelsRaw, sizeof(reply->channelsRaw));
|
||||||
rawPacketLen = 25;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
return DeviceHandlerIF::COMMAND_NOT_IMPLEMENTED;
|
|
||||||
}
|
}
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SusHandler::fillCommandAndReplyMap() {
|
void SusHandler::fillCommandAndReplyMap() {
|
||||||
insertInCommandAndReplyMap(SUS::WRITE_SETUP, 1);
|
insertInCommandMap(REQUEST);
|
||||||
insertInCommandAndReplyMap(SUS::START_INT_TIMED_CONVERSIONS, 1);
|
insertInReplyMap(REPLY, 5, nullptr, 0, true);
|
||||||
insertInCommandAndReplyMap(SUS::READ_INT_TIMED_CONVERSIONS, 1, &dataset,
|
|
||||||
SUS::SIZE_READ_INT_CONVERSIONS);
|
|
||||||
insertInCommandAndReplyMap(SUS::READ_EXT_TIMED_CONVERSIONS, 1, &dataset,
|
|
||||||
SUS::SIZE_READ_EXT_CONVERSIONS);
|
|
||||||
insertInCommandAndReplyMap(SUS::READ_EXT_TIMED_TEMPS, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t SusHandler::scanForReply(const uint8_t *start, size_t remainingSize,
|
void SusHandler::setToGoToNormalMode(bool enable) { this->goToNormalMode = enable; }
|
||||||
DeviceCommandId_t *foundId, size_t *foundLen) {
|
|
||||||
*foundId = this->getPendingCommand();
|
|
||||||
*foundLen = remainingSize;
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t SusHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
uint32_t SusHandler::getTransitionDelayMs(Mode_t from, Mode_t to) { return transitionDelay; }
|
||||||
switch (id) {
|
|
||||||
case SUS::WRITE_SETUP: {
|
|
||||||
if (getMode() == _MODE_START_UP) {
|
|
||||||
commandExecuted = true;
|
|
||||||
}
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
case SUS::START_INT_TIMED_CONVERSIONS: {
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
case SUS::READ_INT_TIMED_CONVERSIONS: {
|
|
||||||
PoolReadGuard readSet(&dataset);
|
|
||||||
dataset.temperatureCelcius = max1227::getTemperature(((packet[0] & 0x0f) << 8) | packet[1]);
|
|
||||||
for (uint8_t idx = 0; idx < 6; idx++) {
|
|
||||||
dataset.channels[idx] = packet[idx * 2 + 2] << 8 | packet[idx * 2 + 3];
|
|
||||||
}
|
|
||||||
dataset.setValidity(true, true);
|
|
||||||
printDataset();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case (SUS::READ_EXT_TIMED_CONVERSIONS): {
|
|
||||||
PoolReadGuard readSet(&dataset);
|
|
||||||
for (uint8_t idx = 0; idx < 6; idx++) {
|
|
||||||
dataset.channels[idx] = packet[idx * 2 + 1] << 8 | packet[idx * 2 + 2];
|
|
||||||
}
|
|
||||||
dataset.channels.setValid(true);
|
|
||||||
// Read temperature in next read cycle
|
|
||||||
if (clkMode == ClkModes::EXT_CLOCKED_WITH_TEMP) {
|
|
||||||
comState = ComStates::EXT_CLOCKED_TEMP;
|
|
||||||
}
|
|
||||||
printDataset();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case (SUS::READ_EXT_TIMED_TEMPS): {
|
|
||||||
PoolReadGuard readSet(&dataset);
|
|
||||||
dataset.temperatureCelcius = max1227::getTemperature(((packet[23] & 0x0f) << 8) | packet[24]);
|
|
||||||
dataset.temperatureCelcius.setValid(true);
|
|
||||||
comState = ComStates::EXT_CLOCKED_CONVERSIONS;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default: {
|
|
||||||
sif::debug << "SusHandler::interpretDeviceReply: Unknown reply id" << std::endl;
|
|
||||||
return DeviceHandlerIF::UNKNOWN_DEVICE_REPLY;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t SusHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 3000; }
|
void SusHandler::modeChanged(void) { internalState = InternalState::NONE; }
|
||||||
|
|
||||||
ReturnValue_t SusHandler::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
ReturnValue_t SusHandler::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
LocalDataPoolManager &poolManager) {
|
LocalDataPoolManager &poolManager) {
|
||||||
localDataPoolMap.emplace(SUS::TEMPERATURE_C, &tempC);
|
localDataPoolMap.emplace(susMax1227::TEMPERATURE_C, &tempC);
|
||||||
localDataPoolMap.emplace(SUS::CHANNEL_VEC, &channelVec);
|
localDataPoolMap.emplace(susMax1227::CHANNEL_VEC, &channelVec);
|
||||||
poolManager.subscribeForDiagPeriodicPacket(
|
poolManager.subscribeForDiagPeriodicPacket(
|
||||||
subdp::DiagnosticsHkPeriodicParams(dataset.getSid(), false, 5.0));
|
subdp::DiagnosticsHkPeriodicParams(dataset.getSid(), false, 5.0));
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SusHandler::setToGoToNormalMode(bool enable) { this->goToNormalModeImmediately = enable; }
|
ReturnValue_t SusHandler::prepareRequest(acs::SimpleSensorMode mode) {
|
||||||
|
request.mode = mode;
|
||||||
void SusHandler::printDataset() {
|
rawPacket = reinterpret_cast<uint8_t *>(&request);
|
||||||
if (periodicPrintout) {
|
rawPacketLen = sizeof(acs::SusRequest);
|
||||||
if (divider.checkAndIncrement()) {
|
return returnvalue::OK;
|
||||||
sif::info << "SUS ADC " << static_cast<int>(susIdx) << " hex [" << std::setfill('0')
|
|
||||||
<< std::hex;
|
|
||||||
for (uint8_t idx = 0; idx < 6; idx++) {
|
|
||||||
sif::info << std::setw(3) << dataset.channels[idx];
|
|
||||||
if (idx < 6 - 1) {
|
|
||||||
sif::info << ",";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sif::info << "] | T[C] " << std::dec << dataset.temperatureCelcius.value << std::endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SusHandler::enablePeriodicPrintout(bool enable, uint8_t divider) {
|
LocalPoolDataSetBase *SusHandler::getDataSetHandle(sid_t sid) {
|
||||||
this->periodicPrintout = enable;
|
if (sid == dataset.getSid()) {
|
||||||
this->divider.setDivider(divider);
|
return &dataset;
|
||||||
|
}
|
||||||
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
@ -1,92 +1,67 @@
|
|||||||
#ifndef MISSION_DEVICES_SUSHANDLER_H_
|
#ifndef MISSION_DEVICES_SusHandler_H_
|
||||||
#define MISSION_DEVICES_SUSHANDLER_H_
|
#define MISSION_DEVICES_SusHandler_H_
|
||||||
|
|
||||||
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
#include <eive/eventSubsystemIds.h>
|
||||||
|
#include <eive/resultClassIds.h>
|
||||||
#include "devicedefinitions/SusDefinitions.h"
|
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
|
||||||
#include "events/subsystemIdRanges.h"
|
|
||||||
#include "fsfw/globalfunctions/PeriodicOperationDivider.h"
|
#include "fsfw/globalfunctions/PeriodicOperationDivider.h"
|
||||||
#include "mission/devices/max1227.h"
|
#include "mission/devices/devicedefinitions/acsPolling.h"
|
||||||
#include "returnvalues/classIds.h"
|
#include "mission/devices/devicedefinitions/susMax1227Helpers.h"
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief This is the device handler class for the SUS sensor based on the MAX1227 ADC.
|
|
||||||
*
|
|
||||||
* @details
|
|
||||||
* Datasheet of MAX1227: https://datasheets.maximintegrated.com/en/ds/MAX1227-MAX1231.pdf
|
|
||||||
* Details about the SUS electronic can be found at
|
|
||||||
* https://egit.irs.uni-stuttgart.de/eive/eive_dokumente/src/branch/master/400_Raumsegment/443_SunSensorDocumentation/release
|
|
||||||
*
|
|
||||||
* @note When adding a SusHandler to the polling sequence table make sure to add a slot with
|
|
||||||
* the executionStep FIRST_WRITE. Otherwise the communication sequence will never be
|
|
||||||
* started.
|
|
||||||
*
|
|
||||||
* @author J. Meier
|
|
||||||
*/
|
|
||||||
class SusHandler : public DeviceHandlerBase {
|
class SusHandler : public DeviceHandlerBase {
|
||||||
public:
|
public:
|
||||||
enum ClkModes { INT_CLOCKED, EXT_CLOCKED, EXT_CLOCKED_WITH_TEMP };
|
static constexpr DeviceCommandId_t REQUEST = 0x70;
|
||||||
|
static constexpr DeviceCommandId_t REPLY = 0x77;
|
||||||
|
|
||||||
static const uint8_t FIRST_WRITE = 7;
|
static const uint8_t INTERFACE_ID = CLASS_ID::SUS_HANDLER;
|
||||||
|
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::SUS_BOARD_ASS;
|
||||||
|
|
||||||
SusHandler(object_id_t objectId, uint8_t susIdx, object_id_t comIF, CookieIF* comCookie);
|
SusHandler(uint32_t objectId, uint8_t susIdx, object_id_t deviceCommunication,
|
||||||
|
CookieIF *comCookie);
|
||||||
virtual ~SusHandler();
|
virtual ~SusHandler();
|
||||||
|
|
||||||
void enablePeriodicPrintout(bool enable, uint8_t divider);
|
void enablePeriodicPrintouts(bool enable, uint8_t divider);
|
||||||
|
|
||||||
void setToGoToNormalMode(bool enable);
|
void setToGoToNormalMode(bool enable);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void doStartUp() override;
|
/** DeviceHandlerBase overrides */
|
||||||
void doShutDown() override;
|
void doShutDown() override;
|
||||||
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t* id) override;
|
void doStartUp() override;
|
||||||
ReturnValue_t buildTransitionDeviceCommand(DeviceCommandId_t* id) override;
|
uint32_t getTransitionDelayMs(Mode_t from, Mode_t to) override;
|
||||||
void fillCommandAndReplyMap() override;
|
|
||||||
ReturnValue_t buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t *commandData,
|
ReturnValue_t buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t *commandData,
|
||||||
size_t commandDataLen) override;
|
size_t commandDataLen) override;
|
||||||
ReturnValue_t scanForReply(const uint8_t* start, size_t remainingSize, DeviceCommandId_t* foundId,
|
ReturnValue_t buildTransitionDeviceCommand(DeviceCommandId_t *id) override;
|
||||||
|
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
|
||||||
|
ReturnValue_t scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
|
||||||
size_t *foundLen) override;
|
size_t *foundLen) override;
|
||||||
ReturnValue_t interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) override;
|
ReturnValue_t interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) override;
|
||||||
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
|
void fillCommandAndReplyMap() override;
|
||||||
|
void modeChanged(void) override;
|
||||||
ReturnValue_t initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
ReturnValue_t initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
LocalDataPoolManager &poolManager) override;
|
LocalDataPoolManager &poolManager) override;
|
||||||
|
LocalPoolDataSetBase *getDataSetHandle(sid_t sid) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const uint8_t INTERFACE_ID = CLASS_ID::SUS_HANDLER;
|
susMax1227::SusDataset dataset;
|
||||||
|
acs::SusRequest request{};
|
||||||
|
uint8_t susIdx;
|
||||||
|
|
||||||
static const ReturnValue_t ERROR_UNLOCK_MUTEX = MAKE_RETURN_CODE(0xA0);
|
uint32_t transitionDelay = 1000;
|
||||||
static const ReturnValue_t ERROR_LOCK_MUTEX = MAKE_RETURN_CODE(0xA1);
|
bool goToNormalMode = false;
|
||||||
|
|
||||||
enum class ComStates {
|
|
||||||
IDLE,
|
|
||||||
WRITE_SETUP,
|
|
||||||
EXT_CLOCKED_CONVERSIONS,
|
|
||||||
EXT_CLOCKED_TEMP,
|
|
||||||
START_INT_CLOCKED_CONVERSIONS,
|
|
||||||
READ_INT_CLOCKED_CONVERSIONS
|
|
||||||
};
|
|
||||||
|
|
||||||
bool periodicPrintout = false;
|
|
||||||
PeriodicOperationDivider divider;
|
|
||||||
bool goToNormalModeImmediately = false;
|
|
||||||
bool commandExecuted = false;
|
|
||||||
|
|
||||||
SUS::SusDataset dataset;
|
|
||||||
// Read temperature in each alternating communication step when using
|
|
||||||
// externally clocked mode
|
|
||||||
ClkModes clkMode = ClkModes::INT_CLOCKED;
|
|
||||||
PoolEntry<float> tempC = PoolEntry<float>({0.0});
|
PoolEntry<float> tempC = PoolEntry<float>({0.0});
|
||||||
PoolEntry<uint16_t> channelVec = PoolEntry<uint16_t>({0, 0, 0, 0, 0, 0});
|
PoolEntry<uint16_t> channelVec = PoolEntry<uint16_t>({0, 0, 0, 0, 0, 0});
|
||||||
|
|
||||||
uint8_t susIdx = 0;
|
enum class InternalState {
|
||||||
uint8_t cmdBuffer[SUS::MAX_CMD_SIZE];
|
NONE,
|
||||||
ComStates comState = ComStates::IDLE;
|
STARTUP,
|
||||||
|
SHUTDOWN,
|
||||||
MutexIF::TimeoutType timeoutType = MutexIF::TimeoutType::WAITING;
|
|
||||||
uint32_t timeoutMs = 20;
|
|
||||||
void printDataset();
|
|
||||||
|
|
||||||
MutexIF* spiMutex = nullptr;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* MISSION_DEVICES_SUSHANDLER_H_ */
|
InternalState internalState = InternalState::NONE;
|
||||||
|
bool commandExecuted = false;
|
||||||
|
|
||||||
|
ReturnValue_t prepareRequest(acs::SimpleSensorMode mode);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* MISSION_DEVICES_SusHandler_H_ */
|
||||||
|
@ -76,6 +76,17 @@ struct MgmLis3Reply {
|
|||||||
int16_t temperatureRaw = thermal::INVALID_TEMPERATURE;
|
int16_t temperatureRaw = thermal::INVALID_TEMPERATURE;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct SusRequest {
|
||||||
|
SimpleSensorMode mode = SimpleSensorMode::OFF;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct SusReply {
|
||||||
|
bool cfgWasSet = false;
|
||||||
|
bool dataWasSet = false;
|
||||||
|
uint16_t tempRaw = 0;
|
||||||
|
uint16_t channelsRaw[6]{};
|
||||||
|
};
|
||||||
|
|
||||||
} // namespace acs
|
} // namespace acs
|
||||||
|
|
||||||
#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_ACSPOLLING_H_ */
|
#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_ACSPOLLING_H_ */
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
namespace SUS {
|
namespace susMax1227 {
|
||||||
|
|
||||||
static const DeviceCommandId_t NONE = 0x0; // Set when no command is pending
|
static const DeviceCommandId_t NONE = 0x0; // Set when no command is pending
|
||||||
|
|
||||||
@ -69,9 +69,9 @@ class SusDataset : public StaticLocalDataSet<POOL_ENTRIES> {
|
|||||||
|
|
||||||
SusDataset(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, SUS_DATA_SET_ID)) {}
|
SusDataset(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, SUS_DATA_SET_ID)) {}
|
||||||
|
|
||||||
lp_var_t<float> temperatureCelcius = lp_var_t<float>(sid.objectId, TEMPERATURE_C, this);
|
lp_var_t<float> tempC = lp_var_t<float>(sid.objectId, TEMPERATURE_C, this);
|
||||||
lp_vec_t<uint16_t, 6> channels = lp_vec_t<uint16_t, 6>(sid.objectId, CHANNEL_VEC, this);
|
lp_vec_t<uint16_t, 6> channels = lp_vec_t<uint16_t, 6>(sid.objectId, CHANNEL_VEC, this);
|
||||||
};
|
};
|
||||||
} // namespace SUS
|
} // namespace susMax1227
|
||||||
|
|
||||||
#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_SUS_H_ */
|
#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_SUS_H_ */
|
@ -1,17 +1,16 @@
|
|||||||
#ifndef MISSION_SYSTEM_COMSUBSYSTEM_H_
|
#ifndef MISSION_SYSTEM_COMSUBSYSTEM_H_
|
||||||
#define MISSION_SYSTEM_COMSUBSYSTEM_H_
|
#define MISSION_SYSTEM_COMSUBSYSTEM_H_
|
||||||
|
|
||||||
|
#include <common/config/eive/eventSubsystemIds.h>
|
||||||
#include <fsfw/events/EventMessage.h>
|
#include <fsfw/events/EventMessage.h>
|
||||||
#include <fsfw/parameters/HasParametersIF.h>
|
#include <fsfw/parameters/HasParametersIF.h>
|
||||||
#include <fsfw/parameters/ParameterHelper.h>
|
#include <fsfw/parameters/ParameterHelper.h>
|
||||||
#include <fsfw/subsystem/Subsystem.h>
|
#include <fsfw/subsystem/Subsystem.h>
|
||||||
#include <common/config/eive/eventSubsystemIds.h>
|
|
||||||
|
|
||||||
#include "mission/comDefs.h"
|
#include "mission/comDefs.h"
|
||||||
|
|
||||||
class ComSubsystem : public Subsystem, public ReceivesParameterMessagesIF {
|
class ComSubsystem : public Subsystem, public ReceivesParameterMessagesIF {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::COM_SUBSYSTEM;
|
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::COM_SUBSYSTEM;
|
||||||
|
|
||||||
//! [EXPORT] : [COMMENT] The transmit timer to protect the Syrlinks expired
|
//! [EXPORT] : [COMMENT] The transmit timer to protect the Syrlinks expired
|
||||||
@ -27,7 +26,8 @@ class ComSubsystem : public Subsystem, public ReceivesParameterMessagesIF {
|
|||||||
* @param maxNumberOfSequences
|
* @param maxNumberOfSequences
|
||||||
* @param maxNumberOfTables
|
* @param maxNumberOfTables
|
||||||
* @param transmitterTimeout Maximum time the transmitter of the syrlinks
|
* @param transmitterTimeout Maximum time the transmitter of the syrlinks
|
||||||
* will be enabled
|
* will
|
||||||
|
* be enabled
|
||||||
*/
|
*/
|
||||||
ComSubsystem(object_id_t setObjectId, uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables,
|
ComSubsystem(object_id_t setObjectId, uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables,
|
||||||
uint32_t transmitterTimeout);
|
uint32_t transmitterTimeout);
|
||||||
|
@ -91,8 +91,8 @@ ReturnValue_t PersistentTmStore::handleCommandQueue(StorageManagerIF& ipcStore,
|
|||||||
if (accessor.second.size() < 8) {
|
if (accessor.second.size() < 8) {
|
||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
uint32_t dumpFromUnixSeconds;
|
uint32_t dumpFromUnixSeconds = 0;
|
||||||
uint32_t dumpUntilUnixSeconds;
|
uint32_t dumpUntilUnixSeconds = 0;
|
||||||
size_t size = 8;
|
size_t size = 8;
|
||||||
SerializeAdapter::deSerialize(&dumpFromUnixSeconds, accessor.second.data(), &size,
|
SerializeAdapter::deSerialize(&dumpFromUnixSeconds, accessor.second.data(), &size,
|
||||||
SerializeIF::Endianness::NETWORK);
|
SerializeIF::Endianness::NETWORK);
|
||||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
|||||||
Subproject commit 481e57be5919565fa6be9cdb28e3a454dad707cc
|
Subproject commit 350ffda6c61b76dc9a6bbf08cec168c29c08136f
|
Loading…
Reference in New Issue
Block a user