Merge branch 'develop' into acs-bug-bash

This commit is contained in:
Marius Eggert 2023-03-10 17:38:29 +01:00
commit 7b3393c5b2
26 changed files with 217 additions and 277 deletions

View File

@ -50,6 +50,21 @@ will consitute of a breaking change warranting a new major release:
violated anymore. Instead it is incrementally reset.
- The RW antistiction now only takes the RW speeds in account.
## Changed
- ACS CTRL transition to DETUBMLE is now done in CTRL internally. No
system level handling necessary anymore.
- More fixes and improvements for SD card handling. Extend SD card setup in core controller to
create full initial state for SD card manager are core controller as early as possible, turn
execution of setup file update blocking. This might solve the issue with the SD card manager
sometimes blocking for a long time.
- Request raw MTM measurement twice for IMTQ, might reduce number of times measurement could not
be retrieved.
- Event manager and event service have larger queues now: 45 -> 120 for Service 5, 80 -> 120 for
event manager
- ACS mode changes: The ACS CTRL submodes are now modes. DETUBMLE is now submode of SAFE mode.
- EIVE system now tracks the mode of the ACS subsyste in SAFE mode.
# [v1.36.0] 2023-03-08
eive-tmtc: v2.17.2

View File

@ -1,7 +1,7 @@
/**
* @brief Auto-generated event translation file. Contains 269 translations.
* @details
* Generated on: 2023-03-08 16:44:32
* Generated on: 2023-03-10 15:36:00
*/
#include "translateEvents.h"

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file.
* @details
* Contains 160 translations.
* Generated on: 2023-03-08 16:44:32
* Generated on: 2023-03-10 15:36:00
*/
#include "translateObjects.h"
@ -138,7 +138,7 @@ const char *HEATER_3_OBC_BRD_STRING = "HEATER_3_OBC_BRD";
const char *HEATER_4_CAMERA_STRING = "HEATER_4_CAMERA";
const char *HEATER_5_STR_STRING = "HEATER_5_STR";
const char *HEATER_6_DRO_STRING = "HEATER_6_DRO";
const char *HEATER_7_HPA_STRING = "HEATER_7_HPA";
const char *HEATER_7_SYRLINKS_STRING = "HEATER_7_SYRLINKS";
const char *ACS_BOARD_ASS_STRING = "ACS_BOARD_ASS";
const char *SUS_BOARD_ASS_STRING = "SUS_BOARD_ASS";
const char *TCS_BOARD_ASS_STRING = "TCS_BOARD_ASS";
@ -434,7 +434,7 @@ const char *translateObject(object_id_t object) {
case 0x60000006:
return HEATER_6_DRO_STRING;
case 0x60000007:
return HEATER_7_HPA_STRING;
return HEATER_7_SYRLINKS_STRING;
case 0x73000001:
return ACS_BOARD_ASS_STRING;
case 0x73000002:

View File

@ -42,6 +42,12 @@ CoreController::CoreController(object_id_t objectId)
if (not BLOCKING_SD_INIT) {
sdcMan->setBlocking(false);
}
// Set up state of SD card manager and own initial state.
// Stopwatch watch;
sdcMan->updateSdCardStateFile();
sdcMan->updateSdStatePair();
SdCardManager::SdStatePair sdStates;
sdcMan->getSdCardsStatus(sdStates);
auto sdCard = sdcMan->getPreferredSdCard();
if (not sdCard.has_value()) {
sif::error << "CoreController::initializeAfterTaskCreation: "
@ -50,7 +56,11 @@ CoreController::CoreController(object_id_t objectId)
sdCard = sd::SdCard::SLOT_0;
}
sdInfo.active = sdCard.value();
sdcMan->setActiveSdCard(sdInfo.active);
if (sdStates.first == sd::SdState::MOUNTED) {
sdcMan->setActiveSdCard(sd::SdCard::SLOT_0);
} else if (sdStates.second == sd::SdState::MOUNTED) {
sdcMan->setActiveSdCard(sd::SdCard::SLOT_1);
}
currMntPrefix = sdcMan->getCurrentMountPrefix();
getCurrentBootCopy(CURRENT_CHIP, CURRENT_COPY);
@ -400,7 +410,9 @@ ReturnValue_t CoreController::sdStateMachine() {
sif::warning << "CoreController::sdStateMachine: Updating SD card state file failed"
<< std::endl;
}
sdInfo.commandExecuted = true;
sdFsmState = SdStates::SET_STATE_SELF;
sdInfo.commandExecuted = false;
sdInfo.cycleCount = 0;
} else {
nonBlockingOpChecking(SdStates::SET_STATE_SELF, 4, "Updating SDC file");
}
@ -543,10 +555,6 @@ ReturnValue_t CoreController::sdStateMachine() {
if (sdFsmState == SdStates::SKIP_CYCLE_BEFORE_INFO_UPDATE) {
sdFsmState = SdStates::UPDATE_INFO;
} else if (sdFsmState == SdStates::UPDATE_INFO) {
// It is assumed that all tasks are running by the point this section is reached.
// Therefore, perform this operation in blocking mode because it does not take long
// and the ready state of the SD card is available sooner
sdcMan->setBlocking(true);
// Update status file
result = sdcMan->updateSdCardStateFile();
if (result != returnvalue::OK) {

View File

@ -235,7 +235,6 @@ void scheduling::initTasks() {
PeriodicTaskIF* acsSysTask = factory->createPeriodicTask(
"ACS_SYS_TASK", 55, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
static_cast<void>(acsSysTask);
result = acsSysTask->addComponent(objects::ACS_SUBSYSTEM);
if (result != returnvalue::OK) {
scheduling::printAddObjectError("ACS_SUBSYSTEM", objects::ACS_SUBSYSTEM);

View File

@ -195,29 +195,9 @@ ReturnValue_t SdCardManager::setSdCardState(sd::SdCard sdCard, bool on) {
return result;
}
ReturnValue_t SdCardManager::getSdCardsStatus(SdStatePair& active) {
using namespace std;
ReturnValue_t SdCardManager::getSdCardsStatus(SdStatePair& sdStates) {
MutexGuard mg(sdLock, LOCK_TYPE, SD_LOCK_TIMEOUT, LOCK_CTX);
std::error_code e;
if (not filesystem::exists(SD_STATE_FILE, e)) {
return STATUS_FILE_NEXISTS;
}
// Now the file should exist in any case. Still check whether it exists.
fstream sdStatus(SD_STATE_FILE);
if (not sdStatus.good()) {
return STATUS_FILE_NEXISTS;
}
string line;
uint8_t idx = 0;
sd::SdCard currentSd = sd::SdCard::SLOT_0;
// Process status file line by line
while (std::getline(sdStatus, line)) {
processSdStatusLine(active, line, idx, currentSd);
}
if (active.first != sd::SdState::MOUNTED && active.second != sd::SdState::MOUNTED) {
sdCardActive = false;
}
sdStates = this->sdStates;
return returnvalue::OK;
}
@ -309,10 +289,9 @@ ReturnValue_t SdCardManager::sanitizeState(SdStatePair* statusPair, sd::SdCard p
resetNonBlockingState = true;
}
if (statusPair == nullptr) {
sdStatusPtr = std::make_unique<SdStatePair>();
statusPair = sdStatusPtr.get();
getSdCardsStatus(*statusPair);
return returnvalue::FAILED;
}
getSdCardsStatus(*statusPair);
if (statusPair->first == sd::SdState::ON) {
result = mountSdCard(prefSdCard);
@ -330,8 +309,34 @@ void SdCardManager::resetState() {
currentOp = Operations::IDLE;
}
void SdCardManager::processSdStatusLine(std::pair<sd::SdState, sd::SdState>& active,
std::string& line, uint8_t& idx, sd::SdCard& currentSd) {
ReturnValue_t SdCardManager::updateSdStatePair() {
using namespace std;
MutexGuard mg(sdLock, LOCK_TYPE, SD_LOCK_TIMEOUT, LOCK_CTX);
std::error_code e;
if (not filesystem::exists(SD_STATE_FILE, e)) {
return STATUS_FILE_NEXISTS;
}
// Now the file should exist in any case. Still check whether it exists.
fstream sdStatus(SD_STATE_FILE);
if (not sdStatus.good()) {
return STATUS_FILE_NEXISTS;
}
string line;
uint8_t idx = 0;
sd::SdCard currentSd = sd::SdCard::SLOT_0;
// Process status file line by line
while (std::getline(sdStatus, line)) {
processSdStatusLine(line, idx, currentSd);
}
if (sdStates.first != sd::SdState::MOUNTED && sdStates.second != sd::SdState::MOUNTED) {
sdCardActive = false;
}
return returnvalue::OK;
}
void SdCardManager::processSdStatusLine(std::string& line, uint8_t& idx, sd::SdCard& currentSd) {
using namespace std;
istringstream iss(line);
string word;
@ -352,24 +357,24 @@ void SdCardManager::processSdStatusLine(std::pair<sd::SdState, sd::SdState>& act
if (word == "on") {
if (currentSd == sd::SdCard::SLOT_0) {
active.first = sd::SdState::ON;
sdStates.first = sd::SdState::ON;
} else {
active.second = sd::SdState::ON;
sdStates.second = sd::SdState::ON;
}
} else if (word == "off") {
if (currentSd == sd::SdCard::SLOT_0) {
active.first = sd::SdState::OFF;
sdStates.first = sd::SdState::OFF;
} else {
active.second = sd::SdState::OFF;
sdStates.second = sd::SdState::OFF;
}
}
}
if (mountLine) {
if (currentSd == sd::SdCard::SLOT_0) {
active.first = sd::SdState::MOUNTED;
sdStates.first = sd::SdState::MOUNTED;
} else {
active.second = sd::SdState::MOUNTED;
sdStates.second = sd::SdState::MOUNTED;
}
}
@ -407,7 +412,7 @@ ReturnValue_t SdCardManager::updateSdCardStateFile() {
MutexGuard mg(sdLock, LOCK_TYPE, SD_LOCK_TIMEOUT, LOCK_CTX);
// Use q7hw utility and pipe the command output into the state file
std::string updateCmd = "q7hw sd info all > " + std::string(SD_STATE_FILE);
cmdExecutor.load(updateCmd, blocking, printCmdOutput);
cmdExecutor.load(updateCmd, true, printCmdOutput);
ReturnValue_t result = cmdExecutor.execute();
if (blocking and result != returnvalue::OK) {
utility::handleSystemError(cmdExecutor.getLastError(), "SdCardManager::mountSdCard");
@ -475,35 +480,29 @@ bool SdCardManager::isSdCardUsable(std::optional<sd::SdCard> sdCard) {
}
}
SdCardManager::SdStatePair active;
ReturnValue_t result = this->getSdCardsStatus(active);
if (result != returnvalue::OK) {
sif::debug << "SdCardManager::isSdCardMounted: Failed to get SD card active state";
return false;
}
MutexGuard mg(sdLock, LOCK_TYPE, SD_LOCK_TIMEOUT, LOCK_CTX);
if (not sdCard) {
if (active.first == sd::MOUNTED or active.second == sd::MOUNTED) {
if (sdStates.first == sd::MOUNTED or sdStates.second == sd::MOUNTED) {
return true;
}
return false;
}
if (sdCard == sd::SLOT_0) {
if (active.first == sd::MOUNTED) {
if (sdStates.first == sd::MOUNTED) {
return true;
} else {
return false;
}
}
if (sdCard == sd::SLOT_1) {
if (active.second == sd::MOUNTED) {
if (sdStates.second == sd::MOUNTED) {
return true;
} else {
return false;
}
}
if (sdCard == sd::BOTH) {
if (active.first == sd::MOUNTED && active.second == sd::MOUNTED) {
if (sdStates.first == sd::MOUNTED && sdStates.second == sd::MOUNTED) {
return true;
}
}

View File

@ -25,7 +25,7 @@ class MutexIF;
* state
*/
class SdCardManager : public SystemObject, public SdCardMountedIF {
friend class SdCardAccess;
friend class CoreController;
public:
using mountInitCb = ReturnValue_t (*)(void* args);
@ -218,6 +218,7 @@ class SdCardManager : public SystemObject, public SdCardMountedIF {
private:
CommandExecutor cmdExecutor;
SdStatePair sdStates;
Operations currentOp = Operations::IDLE;
bool blocking = false;
bool sdCardActive = true;
@ -233,10 +234,11 @@ class SdCardManager : public SystemObject, public SdCardMountedIF {
SdCardManager();
ReturnValue_t updateSdStatePair();
ReturnValue_t setSdCardState(sd::SdCard sdCard, bool on);
void processSdStatusLine(SdStatePair& active, std::string& line, uint8_t& idx,
sd::SdCard& currentSd);
void processSdStatusLine(std::string& line, uint8_t& idx, sd::SdCard& currentSd);
std::optional<std::string> currentPrefix;

2
fsfw

@ -1 +1 @@
Subproject commit 23d9b44b3e02bb0d35e4622d125b48e9b44fee2c
Subproject commit 4d6f6e6b23b5c0486dad6be8abba7681114a05fe

View File

@ -130,7 +130,7 @@
0x60000004;HEATER_4_CAMERA
0x60000005;HEATER_5_STR
0x60000006;HEATER_6_DRO
0x60000007;HEATER_7_HPA
0x60000007;HEATER_7_SYRLINKS
0x73000001;ACS_BOARD_ASS
0x73000002;SUS_BOARD_ASS
0x73000003;TCS_BOARD_ASS

1 0x42694269 TEST_TASK
130 0x60000004 HEATER_4_CAMERA
131 0x60000005 HEATER_5_STR
132 0x60000006 HEATER_6_DRO
133 0x60000007 HEATER_7_HPA HEATER_7_SYRLINKS
134 0x73000001 ACS_BOARD_ASS
135 0x73000002 SUS_BOARD_ASS
136 0x73000003 TCS_BOARD_ASS

View File

@ -135,7 +135,7 @@
0x60000004;HEATER_4_CAMERA
0x60000005;HEATER_5_STR
0x60000006;HEATER_6_DRO
0x60000007;HEATER_7_HPA
0x60000007;HEATER_7_SYRLINKS
0x73000001;ACS_BOARD_ASS
0x73000002;SUS_BOARD_ASS
0x73000003;TCS_BOARD_ASS

1 0x00005060 P60DOCK_TEST_TASK
135 0x60000004 HEATER_4_CAMERA
136 0x60000005 HEATER_5_STR
137 0x60000006 HEATER_6_DRO
138 0x60000007 HEATER_7_HPA HEATER_7_SYRLINKS
139 0x73000001 ACS_BOARD_ASS
140 0x73000002 SUS_BOARD_ASS
141 0x73000003 TCS_BOARD_ASS

View File

@ -1,7 +1,7 @@
/**
* @brief Auto-generated event translation file. Contains 269 translations.
* @details
* Generated on: 2023-03-08 16:44:32
* Generated on: 2023-03-10 15:36:00
*/
#include "translateEvents.h"

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file.
* @details
* Contains 164 translations.
* Generated on: 2023-03-08 16:44:32
* Generated on: 2023-03-10 15:36:00
*/
#include "translateObjects.h"
@ -143,7 +143,7 @@ const char *HEATER_3_OBC_BRD_STRING = "HEATER_3_OBC_BRD";
const char *HEATER_4_CAMERA_STRING = "HEATER_4_CAMERA";
const char *HEATER_5_STR_STRING = "HEATER_5_STR";
const char *HEATER_6_DRO_STRING = "HEATER_6_DRO";
const char *HEATER_7_HPA_STRING = "HEATER_7_HPA";
const char *HEATER_7_SYRLINKS_STRING = "HEATER_7_SYRLINKS";
const char *ACS_BOARD_ASS_STRING = "ACS_BOARD_ASS";
const char *SUS_BOARD_ASS_STRING = "SUS_BOARD_ASS";
const char *TCS_BOARD_ASS_STRING = "TCS_BOARD_ASS";
@ -448,7 +448,7 @@ const char *translateObject(object_id_t object) {
case 0x60000006:
return HEATER_6_DRO_STRING;
case 0x60000007:
return HEATER_7_HPA_STRING;
return HEATER_7_SYRLINKS_STRING;
case 0x73000001:
return ACS_BOARD_ASS_STRING;
case 0x73000002:

View File

@ -120,6 +120,11 @@ void ImtqPollingTask::handleMeasureStep() {
}
}
// The I2C IP core on EIVE sometimes glitches out. Send start MTM measurement twice.
cmdBuf[0] = imtq::CC::START_MTM_MEASUREMENT;
if (i2cCmdExecMeasure(imtq::CC::START_MTM_MEASUREMENT) != returnvalue::OK) {
return;
}
cmdBuf[0] = imtq::CC::START_MTM_MEASUREMENT;
if (i2cCmdExecMeasure(imtq::CC::START_MTM_MEASUREMENT) != returnvalue::OK) {
return;
@ -177,6 +182,11 @@ void ImtqPollingTask::handleActuateStep() {
TaskFactory::delayTask(10);
cmdLen = 1;
// The I2C IP core on EIVE sometimes glitches out. Send start MTM measurement twice.
cmdBuf[0] = imtq::CC::START_MTM_MEASUREMENT;
if (i2cCmdExecActuate(imtq::CC::START_MTM_MEASUREMENT) != returnvalue::OK) {
return;
}
cmdBuf[0] = imtq::CC::START_MTM_MEASUREMENT;
if (i2cCmdExecActuate(imtq::CC::START_MTM_MEASUREMENT) != returnvalue::OK) {
return;

View File

@ -1,7 +1,7 @@
/**
* @brief Auto-generated event translation file. Contains 269 translations.
* @details
* Generated on: 2023-03-08 16:44:32
* Generated on: 2023-03-10 15:36:00
*/
#include "translateEvents.h"

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file.
* @details
* Contains 164 translations.
* Generated on: 2023-03-08 16:44:32
* Generated on: 2023-03-10 15:36:00
*/
#include "translateObjects.h"
@ -143,7 +143,7 @@ const char *HEATER_3_OBC_BRD_STRING = "HEATER_3_OBC_BRD";
const char *HEATER_4_CAMERA_STRING = "HEATER_4_CAMERA";
const char *HEATER_5_STR_STRING = "HEATER_5_STR";
const char *HEATER_6_DRO_STRING = "HEATER_6_DRO";
const char *HEATER_7_HPA_STRING = "HEATER_7_HPA";
const char *HEATER_7_SYRLINKS_STRING = "HEATER_7_SYRLINKS";
const char *ACS_BOARD_ASS_STRING = "ACS_BOARD_ASS";
const char *SUS_BOARD_ASS_STRING = "SUS_BOARD_ASS";
const char *TCS_BOARD_ASS_STRING = "TCS_BOARD_ASS";
@ -448,7 +448,7 @@ const char *translateObject(object_id_t object) {
case 0x60000006:
return HEATER_6_DRO_STRING;
case 0x60000007:
return HEATER_7_HPA_STRING;
return HEATER_7_SYRLINKS_STRING;
case 0x73000001:
return ACS_BOARD_ASS_STRING;
case 0x73000002:

View File

@ -11,10 +11,6 @@ const char* acs::getModeStr(AcsMode mode) {
modeStr = "SAFE";
break;
}
case (acs::AcsMode::DETUMBLE): {
modeStr = "DETUBMLE";
break;
}
case (acs::AcsMode::PTG_NADIR): {
modeStr = "POITNING NADIR";
break;

View File

@ -10,14 +10,15 @@ namespace acs {
enum AcsMode : Mode_t {
OFF = HasModesIF::MODE_OFF,
SAFE = 10,
DETUMBLE = 11,
PTG_IDLE = 12,
PTG_NADIR = 13,
PTG_TARGET = 14,
PTG_TARGET_GS = 15,
PTG_INERTIAL = 16,
PTG_IDLE = 11,
PTG_NADIR = 12,
PTG_TARGET = 13,
PTG_TARGET_GS = 14,
PTG_INERTIAL = 15,
};
enum SafeSubmode : Submode_t { DEFAULT = 0, DETUMBLE = 1 };
// static constexpr uint8_t ACS_SYSTEM_DETUMBLE_SUBMODE = 1;
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::ACS_SUBSYSTEM;

View File

@ -108,12 +108,16 @@ void AcsController::performControlOperation() {
}
case InternalState::READY: {
if (mode != MODE_OFF) {
switch (submode) {
switch (mode) {
case acs::SAFE:
performSafe();
break;
case acs::DETUMBLE:
performDetumble();
switch (submode) {
case SUBMODE_NONE:
performSafe();
break;
case acs::DETUMBLE:
performDetumble();
break;
}
break;
case acs::PTG_IDLE:
case acs::PTG_TARGET:
@ -192,6 +196,7 @@ void AcsController::performSafe() {
detumbleCounter = 0;
// Triggers detumble mode transition in subsystem
triggerEvent(acs::SAFE_RATE_VIOLATION);
startTransition(mode, acs::SafeSubmode::DETUMBLE);
}
updateCtrlValData(errAng);
@ -242,6 +247,7 @@ void AcsController::performDetumble() {
detumbleCounter = 0;
// Triggers safe mode transition in subsystem
triggerEvent(acs::SAFE_RATE_RECOVERY);
startTransition(mode, acs::SafeSubmode::DEFAULT);
}
disableCtrlValData();
@ -643,8 +649,14 @@ ReturnValue_t AcsController::checkModeCommand(Mode_t mode, Submode_t submode,
} else {
return INVALID_SUBMODE;
}
} else if ((mode == MODE_ON) || (mode == MODE_NORMAL)) {
if ((submode < acs::AcsMode::SAFE) or (submode > acs::AcsMode::PTG_INERTIAL)) {
} else if (not((mode < acs::AcsMode::SAFE) or (mode > acs::AcsMode::PTG_INERTIAL))) {
if (mode == acs::AcsMode::SAFE) {
if (not((submode == SUBMODE_NONE) or (submode == acs::SafeSubmode::DETUMBLE))) {
return INVALID_SUBMODE;
} else {
return returnvalue::OK;
}
} else if (not(submode == SUBMODE_NONE)) {
return INVALID_SUBMODE;
} else {
return returnvalue::OK;
@ -661,12 +673,19 @@ void AcsController::announceMode(bool recursive) {
const char *modeStr = "UNKNOWN";
if (mode == HasModesIF::MODE_OFF) {
modeStr = "OFF";
} else if (mode == HasModesIF::MODE_ON) {
modeStr = "ON";
} else if (mode == DeviceHandlerIF::MODE_NORMAL) {
modeStr = "NORMAL";
} else {
modeStr = acs::getModeStr(static_cast<acs::AcsMode>(mode));
}
const char *submodeStr = "UNKNOWN";
if (submode == HasModesIF::SUBMODE_NONE) {
submodeStr = "NONE";
}
if (mode == acs::AcsMode::SAFE) {
acs::SafeSubmode safeSubmode = static_cast<acs::SafeSubmode>(this->submode);
if (safeSubmode == acs::SafeSubmode::DETUMBLE) {
submodeStr = "DETUMBLE";
}
}
const char *submodeStr = acs::getModeStr(static_cast<acs::AcsMode>(submode));
sif::info << "ACS controller is now in " << modeStr << " mode with " << submodeStr << " submode"
<< std::endl;
return ExtendedControllerBase::announceMode(recursive);

View File

@ -86,7 +86,7 @@ EiveFaultHandler EIVE_FAULT_HANDLER;
void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFunnel** pusFunnel,
CfdpTmFunnel** cfdpFunnel, SdCardMountedIF& sdcMan) {
// Framework objects
new EventManager(objects::EVENT_MANAGER);
new EventManager(objects::EVENT_MANAGER, 120);
auto healthTable = new HealthTable(objects::HEALTH_TABLE);
if (healthTable_ != nullptr) {
*healthTable_ = healthTable;
@ -162,14 +162,14 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun
// PUS service stack
new Service1TelecommandVerification(objects::PUS_SERVICE_1_VERIFICATION, config::EIVE_PUS_APID,
pus::PUS_SERVICE_1, objects::PUS_TM_FUNNEL, 20);
pus::PUS_SERVICE_1, objects::PUS_TM_FUNNEL, 40);
new Service2DeviceAccess(objects::PUS_SERVICE_2_DEVICE_ACCESS, config::EIVE_PUS_APID,
pus::PUS_SERVICE_2, 3, 10);
new Service3Housekeeping(objects::PUS_SERVICE_3_HOUSEKEEPING, config::EIVE_PUS_APID,
pus::PUS_SERVICE_3);
new Service5EventReporting(
PsbParams(objects::PUS_SERVICE_5_EVENT_REPORTING, config::EIVE_PUS_APID, pus::PUS_SERVICE_5),
15, 45);
15, 120);
new Service8FunctionManagement(objects::PUS_SERVICE_8_FUNCTION_MGMT, config::EIVE_PUS_APID,
pus::PUS_SERVICE_8, 16, 60);
new Service9TimeManagement(

View File

@ -8,90 +8,7 @@
AcsSubsystem::AcsSubsystem(object_id_t setObjectId, uint32_t maxNumberOfSequences,
uint32_t maxNumberOfTables)
: Subsystem(setObjectId, maxNumberOfSequences, maxNumberOfTables) {
auto mqArgs = MqArgs(getObjectId(), static_cast<void*>(this));
eventQueue =
QueueFactory::instance()->createMessageQueue(10, EventMessage::EVENT_MESSAGE_SIZE, &mqArgs);
}
ReturnValue_t AcsSubsystem::initialize() {
EventManagerIF* manager = ObjectManager::instance()->get<EventManagerIF>(objects::EVENT_MANAGER);
if (manager == nullptr) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "AcsSubsystem::initialize: Invalid event manager" << std::endl;
#endif
return ObjectManagerIF::CHILD_INIT_FAILED;
}
ReturnValue_t result = manager->registerListener(eventQueue->getId());
if (result != returnvalue::OK) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "AcsSubsystem::registerListener: Failed to register as "
"listener"
<< std::endl;
#endif
return ObjectManagerIF::CHILD_INIT_FAILED;
;
}
result =
manager->subscribeToEvent(eventQueue->getId(), event::getEventId(acs::SAFE_RATE_VIOLATION));
if (result != returnvalue::OK) {
sif::error << "AcsSubsystem: Subscribing for acs::SAFE_RATE_VIOLATION failed" << std::endl;
}
result =
manager->subscribeToEvent(eventQueue->getId(), event::getEventId(acs::SAFE_RATE_RECOVERY));
if (result != returnvalue::OK) {
sif::error << "AcsSubsystem: Subscribing for acs::SAFE_RATE_RECOVERY failed" << std::endl;
}
result =
manager->subscribeToEvent(eventQueue->getId(), event::getEventId(acs::MULTIPLE_RW_INVALID));
if (result != returnvalue::OK) {
sif::error << "AcsSubsystem: Subscribing for acs::MULTIPLE_RW_INVALID failed" << std::endl;
}
result = manager->subscribeToEvent(eventQueue->getId(),
event::getEventId(acs::MEKF_INVALID_MODE_VIOLATION));
if (result != returnvalue::OK) {
sif::error << "AcsSubsystem: Subscribing for acs::MULTIPLE_RW_INVALID failed" << std::endl;
}
return Subsystem::initialize();
}
void AcsSubsystem::performChildOperation() {
handleEventMessages();
return Subsystem::performChildOperation();
}
void AcsSubsystem::handleEventMessages() {
EventMessage event;
for (ReturnValue_t result = eventQueue->receiveMessage(&event); result == returnvalue::OK;
result = eventQueue->receiveMessage(&event)) {
ReturnValue_t status;
switch (event.getMessageId()) {
case EventMessage::EVENT_MESSAGE:
if (event.getEvent() == acs::SAFE_RATE_VIOLATION) {
CommandMessage msg;
ModeMessage::setCmdModeMessage(msg, acs::AcsMode::DETUMBLE, 0);
status = commandQueue->sendMessage(commandQueue->getId(), &msg);
if (result != returnvalue::OK) {
sif::error << "AcsSubsystem: sending DETUMBLE mode cmd to self has failed" << std::endl;
}
}
if (event.getEvent() == acs::SAFE_RATE_RECOVERY) {
CommandMessage msg;
ModeMessage::setCmdModeMessage(msg, acs::AcsMode::SAFE, 0);
status = commandQueue->sendMessage(commandQueue->getId(), &msg);
if (status != returnvalue::OK) {
sif::error << "AcsSubsystem: sending SAFE mode cmd to self has failed" << std::endl;
}
}
break;
default:
sif::debug << "AcsSubsystem::performChildOperation: Did not subscribe "
"to this event message"
<< std::endl;
break;
}
}
}
: Subsystem(setObjectId, maxNumberOfSequences, maxNumberOfTables) {}
void AcsSubsystem::announceMode(bool recursive) {
const char* modeStr = acs::getModeStr(static_cast<acs::AcsMode>(mode));

View File

@ -8,13 +8,7 @@ class AcsSubsystem : public Subsystem {
AcsSubsystem(object_id_t setObjectId, uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables);
private:
ReturnValue_t initialize() override;
void performChildOperation() override;
void announceMode(bool recursive) override;
void handleEventMessages();
MessageQueueIF* eventQueue = nullptr;
};
#endif /* MISSION_SYSTEM_ACSSUBSYSTEM_H_ */

View File

@ -1,10 +1,17 @@
#include "EiveSystem.h"
#include <eive/objects.h>
#include <fsfw/events/EventManager.h>
#include <fsfw/ipc/QueueFactory.h>
#include <mission/acsDefs.h>
EiveSystem::EiveSystem(object_id_t setObjectId, uint32_t maxNumberOfSequences,
uint32_t maxNumberOfTables)
: Subsystem(setObjectId, maxNumberOfSequences, maxNumberOfTables) {}
: Subsystem(setObjectId, maxNumberOfSequences, maxNumberOfTables) {
auto mqArgs = MqArgs(getObjectId(), static_cast<void*>(this));
eventQueue =
QueueFactory::instance()->createMessageQueue(10, EventMessage::EVENT_MESSAGE_SIZE, &mqArgs);
}
void EiveSystem::announceMode(bool recursive) {
const char* modeStr = "UNKNOWN";
@ -17,10 +24,6 @@ void EiveSystem::announceMode(bool recursive) {
modeStr = "SAFE";
break;
}
case (acs::AcsMode::DETUMBLE): {
modeStr = "DETUBMLE";
break;
}
case (acs::AcsMode::PTG_IDLE): {
modeStr = "POINTING IDLE";
break;
@ -41,3 +44,44 @@ void EiveSystem::announceMode(bool recursive) {
sif::info << "EIVE system is now in " << modeStr << " mode" << std::endl;
return Subsystem::announceMode(recursive);
}
void EiveSystem::performChildOperation() {
handleEventMessages();
return Subsystem::performChildOperation();
}
ReturnValue_t EiveSystem::initialize() {
EventManagerIF* manager = ObjectManager::instance()->get<EventManagerIF>(objects::EVENT_MANAGER);
if (manager == nullptr) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "AcsSubsystem::initialize: Invalid event manager" << std::endl;
#endif
return ObjectManagerIF::CHILD_INIT_FAILED;
}
ReturnValue_t result = manager->registerListener(eventQueue->getId());
if (result != returnvalue::OK) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "AcsSubsystem::registerListener: Failed to register as "
"listener"
<< std::endl;
#endif
return ObjectManagerIF::CHILD_INIT_FAILED;
}
return Subsystem::initialize();
}
void EiveSystem::handleEventMessages() {
EventMessage event;
for (ReturnValue_t result = eventQueue->receiveMessage(&event); result == returnvalue::OK;
result = eventQueue->receiveMessage(&event)) {
switch (event.getMessageId()) {
case EventMessage::EVENT_MESSAGE:
break;
default:
sif::debug << "AcsSubsystem::performChildOperation: Did not subscribe "
"to this event message"
<< std::endl;
break;
}
}
}

View File

@ -8,7 +8,12 @@ class EiveSystem : public Subsystem {
EiveSystem(object_id_t setObjectId, uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables);
private:
ReturnValue_t initialize() override;
void performChildOperation() override;
void announceMode(bool recursive) override;
void handleEventMessages();
MessageQueueIF* eventQueue = nullptr;
};
#endif /* MISSION_SYSTEM_EIVESYSTEM_H_ */

View File

@ -20,7 +20,6 @@ namespace {
const auto check = subsystem::checkInsert;
void buildOffSequence(Subsystem& ss, ModeListEntry& eh);
void buildDetumbleSequence(Subsystem& ss, ModeListEntry& entryHelper);
void buildSafeSequence(Subsystem& ss, ModeListEntry& entryHelper);
void buildIdleSequence(Subsystem& ss, ModeListEntry& entryHelper);
void buildTargetPtNadirSequence(Subsystem& ss, ModeListEntry& eh);
@ -43,15 +42,6 @@ auto ACS_TABLE_OFF_TRANS_0 =
auto ACS_TABLE_OFF_TRANS_1 =
std::make_pair((acs::AcsMode::OFF << 24) | 3, FixedArrayList<ModeListEntry, 6>());
auto ACS_SEQUENCE_DETUMBLE =
std::make_pair(acs::AcsMode::DETUMBLE, FixedArrayList<ModeListEntry, 4>());
auto ACS_TABLE_DETUMBLE_TGT =
std::make_pair((acs::AcsMode::DETUMBLE << 24) | 1, FixedArrayList<ModeListEntry, 4>());
auto ACS_TABLE_DETUMBLE_TRANS_0 =
std::make_pair((acs::AcsMode::DETUMBLE << 24) | 2, FixedArrayList<ModeListEntry, 5>());
auto ACS_TABLE_DETUMBLE_TRANS_1 =
std::make_pair((acs::AcsMode::DETUMBLE << 24) | 3, FixedArrayList<ModeListEntry, 5>());
auto ACS_SEQUENCE_SAFE = std::make_pair(acs::AcsMode::SAFE, FixedArrayList<ModeListEntry, 4>());
auto ACS_TABLE_SAFE_TGT =
std::make_pair((acs::AcsMode::SAFE << 24) | 1, FixedArrayList<ModeListEntry, 4>());
@ -130,7 +120,6 @@ Subsystem& satsystem::acs::init() {
buildOffSequence(ACS_SUBSYSTEM, entry);
buildSafeSequence(ACS_SUBSYSTEM, entry);
buildDetumbleSequence(ACS_SUBSYSTEM, entry);
buildIdleSequence(ACS_SUBSYSTEM, entry);
buildTargetPtSequence(ACS_SUBSYSTEM, entry);
buildTargetPtGsSequence(ACS_SUBSYSTEM, entry);
@ -206,8 +195,9 @@ void buildSafeSequence(Subsystem& ss, ModeListEntry& eh) {
eh.setCheckSuccess(checkSuccess);
check(sequence.insert(eh), ctxc);
};
// Build SAFE target
iht(objects::ACS_CONTROLLER, NML, acs::AcsMode::SAFE, ACS_TABLE_SAFE_TGT.second);
// Build SAFE target. Allow detumble submode.
iht(objects::ACS_CONTROLLER, acs::AcsMode::SAFE, acs::SafeSubmode::DEFAULT,
ACS_TABLE_SAFE_TGT.second, true);
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_SAFE_TGT.second);
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_SAFE_TGT.second, true);
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_SAFE_TGT.second, true);
@ -225,7 +215,8 @@ void buildSafeSequence(Subsystem& ss, ModeListEntry& eh) {
// SUS board transition table is defined above
// Build SAFE transition 1
iht(objects::ACS_CONTROLLER, NML, acs::AcsMode::SAFE, ACS_TABLE_SAFE_TRANS_1.second);
iht(objects::ACS_CONTROLLER, acs::AcsMode::SAFE, acs::SafeSubmode::DEFAULT,
ACS_TABLE_SAFE_TRANS_1.second);
check(ss.addTable(&ACS_TABLE_SAFE_TRANS_1.second, ACS_TABLE_SAFE_TRANS_1.first, false, true),
ctxc);
@ -238,61 +229,6 @@ void buildSafeSequence(Subsystem& ss, ModeListEntry& eh) {
ctxc);
}
void buildDetumbleSequence(Subsystem& ss, ModeListEntry& eh) {
std::string context = "satsystem::acs::buildDetumbleSequence";
auto ctxc = context.c_str();
// Insert Helper Table
auto iht = [&](object_id_t obj, Mode_t mode, Submode_t submode,
ArrayList<ModeListEntry>& sequence, bool allowAllSubmodes = false) {
eh.setObject(obj);
eh.setMode(mode);
eh.setSubmode(submode);
if (allowAllSubmodes) {
eh.allowAllSubmodes();
}
check(sequence.insert(eh), ctxc);
};
// Insert Helper Sequence
auto ihs = [&](ArrayList<ModeListEntry>& sequence, Mode_t tableId, uint32_t waitSeconds,
bool checkSuccess) {
eh.setTableId(tableId);
eh.setWaitSeconds(waitSeconds);
eh.setCheckSuccess(checkSuccess);
check(sequence.insert(eh), ctxc);
};
// Build DETUMBLE target
iht(objects::ACS_CONTROLLER, NML, acs::AcsMode::DETUMBLE, ACS_TABLE_DETUMBLE_TGT.second);
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_DETUMBLE_TGT.second);
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_DETUMBLE_TGT.second, true);
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_DETUMBLE_TGT.second, true);
check(ss.addTable(&ACS_TABLE_DETUMBLE_TGT.second, ACS_TABLE_DETUMBLE_TGT.first, false, true),
ctxc);
// Build DETUMBLE transition 0
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_DETUMBLE_TRANS_0.second);
iht(objects::ACS_BOARD_ASS, NML, duallane::A_SIDE, ACS_TABLE_DETUMBLE_TRANS_0.second, true);
iht(objects::SUS_BOARD_ASS, NML, duallane::A_SIDE, ACS_TABLE_DETUMBLE_TRANS_0.second, true);
iht(objects::STR_ASSY, OFF, 0, ACS_TABLE_DETUMBLE_TRANS_0.second);
iht(objects::RW_ASSY, OFF, 0, ACS_TABLE_DETUMBLE_TRANS_0.second);
check(ss.addTable(&ACS_TABLE_DETUMBLE_TRANS_0.second, ACS_TABLE_DETUMBLE_TRANS_0.first, false,
true),
ctxc);
// Build DETUMBLE transition 1
iht(objects::ACS_CONTROLLER, NML, acs::AcsMode::DETUMBLE, ACS_TABLE_DETUMBLE_TRANS_1.second);
check(ss.addTable(&ACS_TABLE_DETUMBLE_TRANS_1.second, ACS_TABLE_DETUMBLE_TRANS_1.first, false,
true),
ctxc);
// Build DETUMBLE sequence
ihs(ACS_SEQUENCE_DETUMBLE.second, ACS_TABLE_DETUMBLE_TGT.first, 0, true);
ihs(ACS_SEQUENCE_DETUMBLE.second, ACS_TABLE_DETUMBLE_TRANS_0.first, 0, false);
ihs(ACS_SEQUENCE_DETUMBLE.second, ACS_TABLE_DETUMBLE_TRANS_1.first, 0, false);
check(ss.addSequence(&ACS_SEQUENCE_DETUMBLE.second, ACS_SEQUENCE_DETUMBLE.first,
ACS_SEQUENCE_SAFE.first, false, true),
ctxc);
}
void buildIdleSequence(Subsystem& ss, ModeListEntry& eh) {
std::string context = "satsystem::acs::buildIdleSequence";
auto ctxc = context.c_str();
@ -316,7 +252,7 @@ void buildIdleSequence(Subsystem& ss, ModeListEntry& eh) {
check(sequence.insert(eh), ctxc);
};
// Build IDLE target
iht(objects::ACS_CONTROLLER, NML, acs::AcsMode::PTG_IDLE, ACS_TABLE_IDLE_TGT.second);
iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_IDLE, 0, ACS_TABLE_IDLE_TGT.second);
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_IDLE_TGT.second);
iht(objects::RW_ASSY, NML, 0, ACS_TABLE_IDLE_TGT.second);
iht(objects::STR_ASSY, NML, 0, ACS_TABLE_IDLE_TGT.second);
@ -333,7 +269,7 @@ void buildIdleSequence(Subsystem& ss, ModeListEntry& eh) {
ss.addTable(&ACS_TABLE_IDLE_TRANS_0.second, ACS_TABLE_IDLE_TRANS_0.first, false, true);
// Build IDLE transition 1
iht(objects::ACS_CONTROLLER, NML, acs::AcsMode::PTG_IDLE, ACS_TABLE_IDLE_TRANS_1.second);
iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_IDLE, 0, ACS_TABLE_IDLE_TRANS_1.second);
ss.addTable(&ACS_TABLE_IDLE_TRANS_1.second, ACS_TABLE_IDLE_TRANS_1.first, false, true);
// Build IDLE sequence
@ -368,7 +304,7 @@ void buildTargetPtSequence(Subsystem& ss, ModeListEntry& eh) {
};
// Build TARGET PT table
iht(objects::ACS_CONTROLLER, NML, acs::AcsMode::PTG_TARGET, ACS_TABLE_PTG_TARGET_TGT.second);
iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_TARGET, 0, ACS_TABLE_PTG_TARGET_TGT.second);
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_TGT.second);
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TARGET_TGT.second, true);
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TARGET_TGT.second, true);
@ -379,7 +315,7 @@ void buildTargetPtSequence(Subsystem& ss, ModeListEntry& eh) {
// Transition 0 already built
// Build TARGET PT transition 1
iht(objects::ACS_CONTROLLER, NML, acs::AcsMode::PTG_TARGET, ACS_TABLE_PTG_TARGET_TRANS_1.second);
iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_TARGET, 0, ACS_TABLE_PTG_TARGET_TRANS_1.second);
check(ss.addTable(&ACS_TABLE_PTG_TARGET_TRANS_1.second, ACS_TABLE_PTG_TARGET_TRANS_1.first, false,
true),
ctxc);
@ -417,8 +353,7 @@ void buildTargetPtNadirSequence(Subsystem& ss, ModeListEntry& eh) {
};
// Build TARGET PT table
iht(objects::ACS_CONTROLLER, NML, acs::AcsMode::PTG_TARGET,
ACS_TABLE_PTG_TARGET_NADIR_TGT.second);
iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_NADIR, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second);
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second);
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second, true);
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second, true);
@ -430,7 +365,7 @@ void buildTargetPtNadirSequence(Subsystem& ss, ModeListEntry& eh) {
// Transition 0 already built
// Build TARGET PT transition 1
iht(objects::ACS_CONTROLLER, NML, acs::AcsMode::PTG_NADIR,
iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_NADIR, 0,
ACS_TABLE_PTG_TARGET_NADIR_TRANS_1.second);
check(ss.addTable(TableEntry(ACS_TABLE_PTG_TARGET_NADIR_TRANS_1.first,
&ACS_TABLE_PTG_TARGET_NADIR_TRANS_1.second)),
@ -471,8 +406,7 @@ void buildTargetPtGsSequence(Subsystem& ss, ModeListEntry& eh) {
};
// Build TARGET PT table
iht(objects::ACS_CONTROLLER, NML, acs::AcsMode::PTG_TARGET_GS,
ACS_TABLE_PTG_TARGET_GS_TGT.second);
iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_TARGET_GS, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second);
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second);
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second, true);
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second, true);
@ -484,7 +418,7 @@ void buildTargetPtGsSequence(Subsystem& ss, ModeListEntry& eh) {
// Transition 0 already built
// Build TARGET PT transition 1
iht(objects::ACS_CONTROLLER, NML, acs::AcsMode::PTG_TARGET_GS,
iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_TARGET_GS, 0,
ACS_TABLE_PTG_TARGET_GS_TRANS_1.second);
check(ss.addTable(TableEntry(ACS_TABLE_PTG_TARGET_GS_TRANS_1.first,
&ACS_TABLE_PTG_TARGET_GS_TRANS_1.second)),
@ -524,7 +458,7 @@ void buildTargetPtInertialSequence(Subsystem& ss, ModeListEntry& eh) {
};
// Build TARGET PT table
iht(objects::ACS_CONTROLLER, NML, acs::AcsMode::PTG_INERTIAL,
iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_INERTIAL, 0,
ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second);
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second);
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second, true);
@ -537,7 +471,7 @@ void buildTargetPtInertialSequence(Subsystem& ss, ModeListEntry& eh) {
// Transition 0 already built
// Build TARGET PT transition 1
iht(objects::ACS_CONTROLLER, NML, acs::AcsMode::PTG_INERTIAL,
iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_INERTIAL, 0,
ACS_TABLE_PTG_TARGET_INERTIAL_TRANS_1.second);
check(ss.addTable(TableEntry(ACS_TABLE_PTG_TARGET_INERTIAL_TRANS_1.first,
&ACS_TABLE_PTG_TARGET_INERTIAL_TRANS_1.second)),

View File

@ -82,11 +82,8 @@ void buildSafeSequence(Subsystem& ss, ModeListEntry& eh) {
check(sequence.insert(eh), ctxc);
};
// Do no track ACS for now because it might jump to detumble mode and back to safe as part of
// normal operations.
// UPDATE: This could be re-enabled as soon as the detumble mode is a submode of
// ACS CTRL safe mode.
// iht(objects::ACS_SUBSYSTEM, acs::AcsMode::SAFE, 0, EIVE_TABLE_SAFE_TGT.second, true);
// Do no track submode to allow transitions to DETUMBLE submode.
iht(objects::ACS_SUBSYSTEM, acs::AcsMode::SAFE, 0, EIVE_TABLE_SAFE_TGT.second, true);
iht(objects::PL_SUBSYSTEM, OFF, 0, EIVE_TABLE_SAFE_TGT.second);
check(ss.addTable(TableEntry(EIVE_TABLE_SAFE_TGT.first, &EIVE_TABLE_SAFE_TGT.second)), ctxc);

2
tmtc

@ -1 +1 @@
Subproject commit b0f51072b20e4835a3e2143d8b3fb40d14240bfb
Subproject commit e32a6ded6661d450dbc75a7ab0194e8048af3d5c