Merge remote-tracking branch 'origin/develop' into mueller/gnss-acs-update
This commit is contained in:
commit
ed6ee02861
@ -96,13 +96,6 @@ void initmission::initTasks() {
|
||||
initmission::printAddObjectError("UDP_POLLING", objects::TMTC_POLLING_TASK);
|
||||
}
|
||||
|
||||
PeriodicTaskIF* plocUpdaterTask = factory->createPeriodicTask(
|
||||
"PLOC_UPDATER_TASK", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.5, missedDeadlineFunc);
|
||||
result = plocUpdaterTask->addComponent(objects::PLOC_UPDATER);
|
||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||
initmission::printAddObjectError("PLOC_UPDATER_TASK", objects::PLOC_UPDATER);
|
||||
}
|
||||
|
||||
# if BOARD_TE0720 == 0
|
||||
// FS task, task interval does not matter because it runs in permanent loop, priority low
|
||||
// because it is a non-essential background task
|
||||
@ -151,7 +144,6 @@ void initmission::initTasks() {
|
||||
#if BOARD_TE0720 == 0
|
||||
coreController->startTask();
|
||||
#endif
|
||||
plocUpdaterTask->startTask();
|
||||
|
||||
taskStarter(pstTasks, "PST task vector");
|
||||
taskStarter(pusTasks, "PUS task vector");
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "bsp_q7s/memory/FileSystemHandler.h"
|
||||
#include "bsp_q7s/devices/PlocSupervisorHandler.h"
|
||||
#include "bsp_q7s/devices/PlocUpdater.h"
|
||||
#include "bsp_q7s/devices/PlocMemoryDumper.h"
|
||||
|
||||
#include "linux/devices/HeaterHandler.h"
|
||||
#include "linux/devices/SolarArrayDeploymentHandler.h"
|
||||
@ -182,6 +183,7 @@ void ObjectFactory::produce(void* args){
|
||||
#endif /* OBSW_ADD_TEST_CODE == 1 */
|
||||
|
||||
new PlocUpdater(objects::PLOC_UPDATER);
|
||||
new PlocMemoryDumper(objects::PLOC_MEMORY_DUMPER);
|
||||
}
|
||||
|
||||
void ObjectFactory::createTmpComponents() {
|
||||
|
@ -1,4 +1,5 @@
|
||||
target_sources(${TARGET_NAME} PRIVATE
|
||||
PlocSupervisorHandler.cpp
|
||||
PlocUpdater.cpp
|
||||
PlocMemoryDumper.cpp
|
||||
)
|
206
bsp_q7s/devices/PlocMemoryDumper.cpp
Normal file
206
bsp_q7s/devices/PlocMemoryDumper.cpp
Normal file
@ -0,0 +1,206 @@
|
||||
#include <fsfw/src/fsfw/serialize/SerializeAdapter.h>
|
||||
#include "fsfw/ipc/QueueFactory.h"
|
||||
#include "PlocMemoryDumper.h"
|
||||
|
||||
#include <fstream>
|
||||
#include <filesystem>
|
||||
#include <string>
|
||||
|
||||
PlocMemoryDumper::PlocMemoryDumper(object_id_t objectId) :
|
||||
SystemObject(objectId), commandActionHelper(this), actionHelper(this, nullptr) {
|
||||
commandQueue = QueueFactory::instance()->createMessageQueue(QUEUE_SIZE);
|
||||
}
|
||||
|
||||
PlocMemoryDumper::~PlocMemoryDumper() {
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMemoryDumper::initialize() {
|
||||
|
||||
ReturnValue_t result = SystemObject::initialize();
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
return result;
|
||||
}
|
||||
result = commandActionHelper.initialize();
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
return result;
|
||||
}
|
||||
result = actionHelper.initialize(commandQueue);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
return result;
|
||||
}
|
||||
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMemoryDumper::performOperation(uint8_t operationCode) {
|
||||
readCommandQueue();
|
||||
doStateMachine();
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMemoryDumper::executeAction(ActionId_t actionId,
|
||||
MessageQueueId_t commandedBy, const uint8_t* data, size_t size) {
|
||||
|
||||
if (state != State::IDLE) {
|
||||
return IS_BUSY;
|
||||
}
|
||||
|
||||
switch (actionId) {
|
||||
case DUMP_MRAM: {
|
||||
size_t deserializeSize = sizeof(mram.startAddress) + sizeof(mram.endAddress);
|
||||
SerializeAdapter::deSerialize(&mram.startAddress, &data, &deserializeSize,
|
||||
SerializeIF::Endianness::BIG);
|
||||
SerializeAdapter::deSerialize(&mram.endAddress, &data, &deserializeSize,
|
||||
SerializeIF::Endianness::BIG);
|
||||
if (mram.endAddress > MAX_MRAM_ADDRESS) {
|
||||
return MRAM_ADDRESS_TOO_HIGH;
|
||||
}
|
||||
if (mram.endAddress <= mram.startAddress) {
|
||||
return MRAM_INVALID_ADDRESS_COMBINATION;
|
||||
}
|
||||
state = State::COMMAND_FIRST_MRAM_DUMP;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
sif::warning << "PlocMemoryDumper::executeAction: Received command with invalid action id"
|
||||
<< std::endl;
|
||||
return INVALID_ACTION_ID;
|
||||
}
|
||||
}
|
||||
|
||||
return EXECUTION_FINISHED;
|
||||
}
|
||||
|
||||
MessageQueueId_t PlocMemoryDumper::getCommandQueue() const {
|
||||
return commandQueue->getId();
|
||||
}
|
||||
|
||||
MessageQueueIF* PlocMemoryDumper::getCommandQueuePtr() {
|
||||
return commandQueue;
|
||||
}
|
||||
|
||||
void PlocMemoryDumper::readCommandQueue() {
|
||||
CommandMessage message;
|
||||
ReturnValue_t result;
|
||||
|
||||
for (result = commandQueue->receiveMessage(&message); result == HasReturnvaluesIF::RETURN_OK;
|
||||
result = commandQueue->receiveMessage(&message)) {
|
||||
if (result != RETURN_OK) {
|
||||
continue;
|
||||
}
|
||||
result = actionHelper.handleActionMessage(&message);
|
||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
||||
continue;
|
||||
}
|
||||
|
||||
result = commandActionHelper.handleReply(&message);
|
||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
||||
continue;
|
||||
}
|
||||
|
||||
sif::debug << "PlocMemoryDumper::readCommandQueue: Received message with invalid format"
|
||||
<< std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
void PlocMemoryDumper::doStateMachine() {
|
||||
switch (state) {
|
||||
case State::IDLE:
|
||||
break;
|
||||
case State::COMMAND_FIRST_MRAM_DUMP:
|
||||
commandNextMramDump(PLOC_SPV::FIRST_MRAM_DUMP);
|
||||
break;
|
||||
case State::COMMAND_CONSECUTIVE_MRAM_DUMP:
|
||||
commandNextMramDump(PLOC_SPV::CONSECUTIVE_MRAM_DUMP);
|
||||
break;
|
||||
case State::EXECUTING_MRAM_DUMP:
|
||||
break;
|
||||
default:
|
||||
sif::debug << "PlocMemoryDumper::doStateMachine: Invalid state" << std::endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void PlocMemoryDumper::stepSuccessfulReceived(ActionId_t actionId,
|
||||
uint8_t step) {
|
||||
}
|
||||
|
||||
void PlocMemoryDumper::stepFailedReceived(ActionId_t actionId, uint8_t step,
|
||||
ReturnValue_t returnCode) {
|
||||
}
|
||||
|
||||
void PlocMemoryDumper::dataReceived(ActionId_t actionId, const uint8_t* data, uint32_t size) {
|
||||
|
||||
}
|
||||
|
||||
void PlocMemoryDumper::completionSuccessfulReceived(ActionId_t actionId) {
|
||||
switch (pendingCommand) {
|
||||
case (PLOC_SPV::FIRST_MRAM_DUMP):
|
||||
case (PLOC_SPV::CONSECUTIVE_MRAM_DUMP):
|
||||
if (mram.endAddress == mram.startAddress) {
|
||||
triggerEvent(MRAM_DUMP_FINISHED);
|
||||
state = State::IDLE;
|
||||
}
|
||||
else {
|
||||
state = State::COMMAND_CONSECUTIVE_MRAM_DUMP;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
sif::debug << "PlocMemoryDumper::completionSuccessfulReceived: Invalid pending command"
|
||||
<< std::endl;
|
||||
state = State::IDLE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void PlocMemoryDumper::completionFailedReceived(ActionId_t actionId,
|
||||
ReturnValue_t returnCode) {
|
||||
switch(pendingCommand) {
|
||||
case(PLOC_SPV::FIRST_MRAM_DUMP):
|
||||
case(PLOC_SPV::CONSECUTIVE_MRAM_DUMP):
|
||||
triggerEvent(MRAM_DUMP_FAILED, mram.lastStartAddress);
|
||||
break;
|
||||
default:
|
||||
sif::debug << "PlocMemoryDumper::completionFailedReceived: Invalid pending command "
|
||||
<< std::endl;
|
||||
break;
|
||||
}
|
||||
state = State::IDLE;
|
||||
}
|
||||
|
||||
void PlocMemoryDumper::commandNextMramDump(ActionId_t dumpCommand) {
|
||||
ReturnValue_t result = RETURN_OK;
|
||||
|
||||
uint32_t tempStartAddress = 0;
|
||||
uint32_t tempEndAddress = 0;
|
||||
|
||||
if (mram.endAddress - mram.startAddress > MAX_MRAM_DUMP_SIZE) {
|
||||
tempStartAddress = mram.startAddress;
|
||||
tempEndAddress = mram.startAddress + MAX_MRAM_DUMP_SIZE;
|
||||
mram.startAddress += MAX_MRAM_DUMP_SIZE;
|
||||
mram.lastStartAddress = tempStartAddress;
|
||||
}
|
||||
else {
|
||||
tempStartAddress = mram.startAddress;
|
||||
tempEndAddress = mram.endAddress;
|
||||
mram.startAddress = mram.endAddress;
|
||||
}
|
||||
|
||||
MemoryParams params(tempStartAddress, tempEndAddress);
|
||||
|
||||
result = commandActionHelper.commandAction(objects::PLOC_SUPERVISOR_HANDLER,
|
||||
dumpCommand, ¶ms);
|
||||
if (result != RETURN_OK) {
|
||||
sif::warning << "PlocMemoryDumper::commandNextMramDump: Failed to send mram dump command "
|
||||
<< "with start address " << tempStartAddress << " and end address "
|
||||
<< tempEndAddress << std::endl;
|
||||
triggerEvent(SEND_MRAM_DUMP_FAILED, result, tempStartAddress);
|
||||
state = State::IDLE;
|
||||
pendingCommand = NONE;
|
||||
return;
|
||||
}
|
||||
state = State::EXECUTING_MRAM_DUMP;
|
||||
pendingCommand = dumpCommand;
|
||||
return;
|
||||
}
|
||||
|
115
bsp_q7s/devices/PlocMemoryDumper.h
Normal file
115
bsp_q7s/devices/PlocMemoryDumper.h
Normal file
@ -0,0 +1,115 @@
|
||||
#ifndef MISSION_DEVICES_PLOCMEMORYDUMPER_H_
|
||||
#define MISSION_DEVICES_PLOCMEMORYDUMPER_H_
|
||||
|
||||
#include <bsp_q7s/devices/devicedefinitions/PlocMemDumpDefinitions.h>
|
||||
#include <bsp_q7s/devices/devicedefinitions/PlocSupervisorDefinitions.h>
|
||||
#include "OBSWConfig.h"
|
||||
#include "fsfw/action/CommandActionHelper.h"
|
||||
#include "fsfw/action/ActionHelper.h"
|
||||
#include "fsfw/action/HasActionsIF.h"
|
||||
#include "fsfw/action/CommandsActionsIF.h"
|
||||
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
||||
#include "fsfw/tasks/ExecutableObjectIF.h"
|
||||
#include "fsfw/objectmanager/SystemObject.h"
|
||||
#include "bsp_q7s/memory/SdCardManager.h"
|
||||
#include "linux/fsfwconfig/objects/systemObjectList.h"
|
||||
#include "fsfw/tmtcpacket/SpacePacket.h"
|
||||
|
||||
|
||||
/**
|
||||
* @brief Because the buffer of the linux tty driver is limited to 2 x 65535 bytes, this class is
|
||||
* created to perform large dumps of PLOC memories.
|
||||
*
|
||||
* @details Currently the PLOC supervisor only implements the functionality to dump the MRAM.
|
||||
*
|
||||
* @author J. Meier
|
||||
*/
|
||||
class PlocMemoryDumper : public SystemObject,
|
||||
public HasActionsIF,
|
||||
public ExecutableObjectIF,
|
||||
public HasReturnvaluesIF,
|
||||
public CommandsActionsIF {
|
||||
public:
|
||||
|
||||
static const ActionId_t NONE = 0;
|
||||
static const ActionId_t DUMP_MRAM = 1;
|
||||
|
||||
PlocMemoryDumper(object_id_t objectId);
|
||||
virtual ~PlocMemoryDumper();
|
||||
|
||||
ReturnValue_t performOperation(uint8_t operationCode = 0) override;
|
||||
ReturnValue_t executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
|
||||
const uint8_t* data, size_t size);
|
||||
MessageQueueId_t getCommandQueue() const;
|
||||
ReturnValue_t initialize() override;
|
||||
MessageQueueIF* getCommandQueuePtr() override;
|
||||
void stepSuccessfulReceived(ActionId_t actionId, uint8_t step) override;
|
||||
void stepFailedReceived(ActionId_t actionId, uint8_t step, ReturnValue_t returnCode) override;
|
||||
void dataReceived(ActionId_t actionId, const uint8_t* data, uint32_t size) override;
|
||||
void completionSuccessfulReceived(ActionId_t actionId) override;
|
||||
void completionFailedReceived(ActionId_t actionId, ReturnValue_t returnCode) override;
|
||||
|
||||
private:
|
||||
|
||||
static const uint32_t QUEUE_SIZE = 10;
|
||||
|
||||
static const uint8_t INTERFACE_ID = CLASS_ID::PLOC_MEMORY_DUMPER;
|
||||
|
||||
//! [EXPORT] : [COMMENT] The capacity of the MRAM amounts to 512 kB. Thus the maximum address must not be higher than 0x7d000.
|
||||
static const ReturnValue_t MRAM_ADDRESS_TOO_HIGH = MAKE_RETURN_CODE(0xA0);
|
||||
//! [EXPORT] : [COMMENT] The specified end address is lower than the start address
|
||||
static const ReturnValue_t MRAM_INVALID_ADDRESS_COMBINATION = MAKE_RETURN_CODE(0xA1);
|
||||
|
||||
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PLOC_MEMORY_DUMPER;
|
||||
|
||||
//! [EXPORT] : [COMMENT] Failed to send mram dump command to supervisor handler
|
||||
//! P1: Return value of commandAction function
|
||||
//! P2: Start address of MRAM to dump with this command
|
||||
static const Event SEND_MRAM_DUMP_FAILED = MAKE_EVENT(0, severity::LOW);
|
||||
//! [EXPORT] : [COMMENT] Received completion failure report form PLOC supervisor handler
|
||||
//! P1: MRAM start address of failing dump command
|
||||
static const Event MRAM_DUMP_FAILED = MAKE_EVENT(1, severity::LOW);
|
||||
//! [EXPORT] : [COMMENT] MRAM dump finished successfully
|
||||
static const Event MRAM_DUMP_FINISHED = MAKE_EVENT(2, severity::LOW);
|
||||
|
||||
// Maximum size of mram dump which can be retrieved with one command
|
||||
static const uint32_t MAX_MRAM_DUMP_SIZE = 100000;
|
||||
static const uint32_t MAX_MRAM_ADDRESS = 0x7d000;
|
||||
|
||||
MessageQueueIF* commandQueue = nullptr;
|
||||
|
||||
CommandActionHelper commandActionHelper;
|
||||
|
||||
ActionHelper actionHelper;
|
||||
|
||||
enum class State: uint8_t {
|
||||
IDLE,
|
||||
COMMAND_FIRST_MRAM_DUMP,
|
||||
COMMAND_CONSECUTIVE_MRAM_DUMP,
|
||||
EXECUTING_MRAM_DUMP
|
||||
};
|
||||
|
||||
State state = State::IDLE;
|
||||
|
||||
ActionId_t pendingCommand = NONE;
|
||||
|
||||
typedef struct MemoryInfo {
|
||||
// Stores the start address of the next memory range to dump
|
||||
uint32_t startAddress;
|
||||
uint32_t endAddress;
|
||||
// Stores the start address of the last sent dump command
|
||||
uint32_t lastStartAddress;
|
||||
} MemoryInfo_t;
|
||||
|
||||
MemoryInfo_t mram = {0, 0, 0};
|
||||
|
||||
void readCommandQueue();
|
||||
void doStateMachine();
|
||||
|
||||
/**
|
||||
* @brief Sends the next mram dump command to the PLOC supervisor handler.
|
||||
*/
|
||||
void commandNextMramDump(ActionId_t dumpCommand);
|
||||
};
|
||||
|
||||
#endif /* MISSION_DEVICES_PLOCMEMORYDUMPER_H_ */
|
@ -199,10 +199,10 @@ ReturnValue_t PlocSupervisorHandler::buildCommandFromCommand(
|
||||
result = prepareWipeMramCmd(commandData);
|
||||
break;
|
||||
}
|
||||
case(PLOC_SPV::DUMP_MRAM): {
|
||||
case(PLOC_SPV::FIRST_MRAM_DUMP):
|
||||
case(PLOC_SPV::CONSECUTIVE_MRAM_DUMP):
|
||||
result = prepareDumpMramCmd(commandData);
|
||||
break;
|
||||
}
|
||||
case(PLOC_SPV::PRINT_CPU_STATS): {
|
||||
preparePrintCpuStatsCmd(commandData);
|
||||
result = RETURN_OK;
|
||||
@ -319,7 +319,8 @@ void PlocSupervisorHandler::fillCommandAndReplyMap() {
|
||||
this->insertInCommandMap(PLOC_SPV::FACTORY_RESET_CLEAR_MIRROR);
|
||||
this->insertInCommandMap(PLOC_SPV::FACTORY_RESET_CLEAR_CIRCULAR);
|
||||
this->insertInCommandMap(PLOC_SPV::CAN_LOOPBACK_TEST);
|
||||
this->insertInCommandAndReplyMap(PLOC_SPV::DUMP_MRAM, 3);
|
||||
this->insertInCommandAndReplyMap(PLOC_SPV::FIRST_MRAM_DUMP, 3);
|
||||
this->insertInCommandAndReplyMap(PLOC_SPV::CONSECUTIVE_MRAM_DUMP, 3);
|
||||
this->insertInReplyMap(PLOC_SPV::ACK_REPORT, 3, nullptr, PLOC_SPV::SIZE_ACK_REPORT);
|
||||
this->insertInReplyMap(PLOC_SPV::EXE_REPORT, 3, nullptr, PLOC_SPV::SIZE_EXE_REPORT);
|
||||
this->insertInReplyMap(PLOC_SPV::HK_REPORT, 3, &hkset, PLOC_SPV::SIZE_HK_REPORT);
|
||||
@ -332,8 +333,12 @@ void PlocSupervisorHandler::fillCommandAndReplyMap() {
|
||||
ReturnValue_t PlocSupervisorHandler::scanForReply(const uint8_t *start,
|
||||
size_t remainingSize, DeviceCommandId_t *foundId, size_t *foundLen) {
|
||||
|
||||
if (nextReplyId == PLOC_SPV::DUMP_MRAM) {
|
||||
*foundId = PLOC_SPV::DUMP_MRAM;
|
||||
if (nextReplyId == PLOC_SPV::FIRST_MRAM_DUMP) {
|
||||
*foundId = PLOC_SPV::FIRST_MRAM_DUMP;
|
||||
return parseMramPackets(start, remainingSize, foundLen);
|
||||
}
|
||||
else if (nextReplyId == PLOC_SPV::CONSECUTIVE_MRAM_DUMP) {
|
||||
*foundId = PLOC_SPV::CONSECUTIVE_MRAM_DUMP;
|
||||
return parseMramPackets(start, remainingSize, foundLen);
|
||||
}
|
||||
|
||||
@ -402,10 +407,10 @@ ReturnValue_t PlocSupervisorHandler::interpretDeviceReply(DeviceCommandId_t id,
|
||||
result = handleLatchupStatusReport(packet);
|
||||
break;
|
||||
}
|
||||
case (PLOC_SPV::DUMP_MRAM): {
|
||||
result = handleMramDumpPacket();
|
||||
case (PLOC_SPV::FIRST_MRAM_DUMP):
|
||||
case (PLOC_SPV::CONSECUTIVE_MRAM_DUMP):
|
||||
result = handleMramDumpPacket(id);
|
||||
break;
|
||||
}
|
||||
case (PLOC_SPV::EXE_REPORT): {
|
||||
result = handleExecutionReport(packet);
|
||||
break;
|
||||
@ -511,13 +516,23 @@ ReturnValue_t PlocSupervisorHandler::enableReplyInReplyMap(DeviceCommandMap::ite
|
||||
}
|
||||
break;
|
||||
}
|
||||
case PLOC_SPV::DUMP_MRAM: {
|
||||
case PLOC_SPV::FIRST_MRAM_DUMP: {
|
||||
enabledReplies = 2; // expected replies will be increased in handleMramDumpPacket
|
||||
result = DeviceHandlerBase::enableReplyInReplyMap(command, enabledReplies, true,
|
||||
PLOC_SPV::DUMP_MRAM);
|
||||
PLOC_SPV::FIRST_MRAM_DUMP);
|
||||
if (result != RETURN_OK) {
|
||||
sif::debug << "PlocSupervisorHandler::enableReplyInReplyMap: Reply with id "
|
||||
<< PLOC_SPV::LATCHUP_REPORT << " not in replyMap" << std::endl;
|
||||
<< PLOC_SPV::FIRST_MRAM_DUMP << " not in replyMap" << std::endl;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case PLOC_SPV::CONSECUTIVE_MRAM_DUMP: {
|
||||
enabledReplies = 2; // expected replies will be increased in handleMramDumpPacket
|
||||
result = DeviceHandlerBase::enableReplyInReplyMap(command, enabledReplies, true,
|
||||
PLOC_SPV::CONSECUTIVE_MRAM_DUMP);
|
||||
if (result != RETURN_OK) {
|
||||
sif::debug << "PlocSupervisorHandler::enableReplyInReplyMap: Reply with id "
|
||||
<< PLOC_SPV::CONSECUTIVE_MRAM_DUMP << " not in replyMap" << std::endl;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -924,8 +939,11 @@ void PlocSupervisorHandler::setNextReplyId() {
|
||||
case PLOC_SPV::GET_LATCHUP_STATUS_REPORT:
|
||||
nextReplyId = PLOC_SPV::LATCHUP_REPORT;
|
||||
break;
|
||||
case PLOC_SPV::DUMP_MRAM:
|
||||
nextReplyId = PLOC_SPV::DUMP_MRAM;
|
||||
case PLOC_SPV::FIRST_MRAM_DUMP:
|
||||
nextReplyId = PLOC_SPV::FIRST_MRAM_DUMP;
|
||||
break;
|
||||
case PLOC_SPV::CONSECUTIVE_MRAM_DUMP:
|
||||
nextReplyId = PLOC_SPV::CONSECUTIVE_MRAM_DUMP;
|
||||
break;
|
||||
default:
|
||||
/* If no telemetry is expected the next reply is always the execution report */
|
||||
@ -942,7 +960,8 @@ size_t PlocSupervisorHandler::getNextReplyLength(DeviceCommandId_t commandId){
|
||||
return replyLen;
|
||||
}
|
||||
|
||||
if (nextReplyId == PLOC_SPV::DUMP_MRAM) {
|
||||
if (nextReplyId == PLOC_SPV::FIRST_MRAM_DUMP
|
||||
|| nextReplyId == PLOC_SPV::CONSECUTIVE_MRAM_DUMP) {
|
||||
/**
|
||||
* Try to read 20 MRAM packets. If reply is larger, the packets will be read with the
|
||||
* next doSendRead call. The command will be as long active as the packet with the sequence
|
||||
@ -1347,7 +1366,7 @@ ReturnValue_t PlocSupervisorHandler::parseMramPackets(const uint8_t *packet, siz
|
||||
return result;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocSupervisorHandler::handleMramDumpPacket() {
|
||||
ReturnValue_t PlocSupervisorHandler::handleMramDumpPacket(DeviceCommandId_t id) {
|
||||
|
||||
ReturnValue_t result = RETURN_FAILED;
|
||||
|
||||
@ -1359,24 +1378,24 @@ ReturnValue_t PlocSupervisorHandler::handleMramDumpPacket() {
|
||||
sif::warning << "PlocSupervisorHandler::handleMramDumpPacket: CRC failure" << std::endl;
|
||||
return result;
|
||||
}
|
||||
handleMramDumpFile();
|
||||
handleMramDumpFile(id);
|
||||
if (downlinkMramDump == true) {
|
||||
handleDeviceTM(spacePacketBuffer + PLOC_SPV::SPACE_PACKET_HEADER_LENGTH, packetLen - 1,
|
||||
PLOC_SPV::DUMP_MRAM);
|
||||
id);
|
||||
}
|
||||
packetInBuffer = false;
|
||||
receivedMramDumpPackets++;
|
||||
if (expectedMramDumpPackets == receivedMramDumpPackets) {
|
||||
nextReplyId = PLOC_SPV::EXE_REPORT;
|
||||
}
|
||||
increaseExpectedMramReplies();
|
||||
increaseExpectedMramReplies(id);
|
||||
return RETURN_OK;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void PlocSupervisorHandler::increaseExpectedMramReplies() {
|
||||
DeviceReplyMap::iterator mramDumpIter = deviceReplyMap.find(PLOC_SPV::DUMP_MRAM);
|
||||
void PlocSupervisorHandler::increaseExpectedMramReplies(DeviceCommandId_t id) {
|
||||
DeviceReplyMap::iterator mramDumpIter = deviceReplyMap.find(id);
|
||||
DeviceReplyMap::iterator exeReportIter = deviceReplyMap.find(PLOC_SPV::EXE_REPORT);
|
||||
if (mramDumpIter == deviceReplyMap.end()) {
|
||||
sif::debug << "PlocSupervisorHandler::increaseExpectedMramReplies: Dump MRAM reply not "
|
||||
@ -1432,10 +1451,11 @@ ReturnValue_t PlocSupervisorHandler::checkMramPacketApid() {
|
||||
return APERIODIC_REPLY;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocSupervisorHandler::handleMramDumpFile() {
|
||||
ReturnValue_t PlocSupervisorHandler::handleMramDumpFile(DeviceCommandId_t id) {
|
||||
ReturnValue_t result = RETURN_OK;
|
||||
uint16_t packetLen = readSpacePacketLength(spacePacketBuffer);
|
||||
uint8_t sequenceFlags = readSequenceFlags(spacePacketBuffer);
|
||||
if (id == PLOC_SPV::FIRST_MRAM_DUMP) {
|
||||
if (sequenceFlags == static_cast<uint8_t>(PLOC_SPV::SequenceFlags::FIRST_PKT)
|
||||
|| (sequenceFlags == static_cast<uint8_t>(PLOC_SPV::SequenceFlags::STANDALONE_PKT))) {
|
||||
result = createMramDumpFile();
|
||||
@ -1443,6 +1463,7 @@ ReturnValue_t PlocSupervisorHandler::handleMramDumpFile() {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (not std::filesystem::exists(activeMramFile)) {
|
||||
sif::warning << "PlocSupervisorHandler::handleMramDumpFile: MRAM file does not exist"
|
||||
<< std::endl;
|
||||
|
@ -295,14 +295,14 @@ private:
|
||||
/**
|
||||
* @brief This function generates the Service 8 packets for the MRAM dump data.
|
||||
*/
|
||||
ReturnValue_t handleMramDumpPacket();
|
||||
ReturnValue_t handleMramDumpPacket(DeviceCommandId_t id);
|
||||
|
||||
/**
|
||||
* @brief With this function the number of expected replies following an MRAM dump command
|
||||
* will be increased. This is necessary to release the command in case not all replies
|
||||
* have been received.
|
||||
*/
|
||||
void increaseExpectedMramReplies();
|
||||
void increaseExpectedMramReplies(DeviceCommandId_t id);
|
||||
|
||||
/**
|
||||
* @brief Function checks if the packet written to the space packet buffer is really a
|
||||
@ -314,7 +314,7 @@ private:
|
||||
* @brief Writes the data of the MRAM dump to a file. The file will be created when receiving
|
||||
* the first packet.
|
||||
*/
|
||||
ReturnValue_t handleMramDumpFile();
|
||||
ReturnValue_t handleMramDumpFile(DeviceCommandId_t id);
|
||||
|
||||
/**
|
||||
* @brief Extracts the length field of a spacePacket referenced by the spacePacket pointer.
|
||||
|
33
bsp_q7s/devices/devicedefinitions/PlocMemDumpDefinitions.h
Normal file
33
bsp_q7s/devices/devicedefinitions/PlocMemDumpDefinitions.h
Normal file
@ -0,0 +1,33 @@
|
||||
#ifndef BSP_Q7S_DEVICES_DEVICEDEFINITIONS_PLOCMEMDUMPDEFINITIONS_H_
|
||||
#define BSP_Q7S_DEVICES_DEVICEDEFINITIONS_PLOCMEMDUMPDEFINITIONS_H_
|
||||
|
||||
#include <fsfw/src/fsfw/serialize/SerialLinkedListAdapter.h>
|
||||
|
||||
class MemoryParams: public SerialLinkedListAdapter<SerializeIF> {
|
||||
public:
|
||||
|
||||
/**
|
||||
* @brief Constructor
|
||||
* @param startAddress Start of address range to dump
|
||||
* @param endAddress End of address range to dump
|
||||
*/
|
||||
MemoryParams(uint32_t startAddress, uint32_t endAddress) :
|
||||
startAddress(startAddress), endAddress(endAddress) {
|
||||
setLinks();
|
||||
}
|
||||
private:
|
||||
|
||||
void setLinks() {
|
||||
setStart(&startAddress);
|
||||
startAddress.setNext(&endAddress);
|
||||
}
|
||||
|
||||
SerializeElement<uint32_t> startAddress;
|
||||
SerializeElement<uint32_t> endAddress;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* BSP_Q7S_DEVICES_DEVICEDEFINITIONS_PLOCMEMDUMPDEFINITIONS_H_ */
|
@ -42,7 +42,7 @@ static const DeviceCommandId_t ENABLE_NVMS = 26;
|
||||
static const DeviceCommandId_t SELECT_NVM = 27;
|
||||
static const DeviceCommandId_t RUN_AUTO_EM_TESTS = 28;
|
||||
static const DeviceCommandId_t WIPE_MRAM = 29;
|
||||
static const DeviceCommandId_t DUMP_MRAM = 30;
|
||||
static const DeviceCommandId_t FIRST_MRAM_DUMP = 30;
|
||||
static const DeviceCommandId_t SET_DBG_VERBOSITY = 31;
|
||||
static const DeviceCommandId_t CAN_LOOPBACK_TEST = 32;
|
||||
static const DeviceCommandId_t PRINT_CPU_STATS = 33;
|
||||
@ -55,6 +55,7 @@ static const DeviceCommandId_t UPDATE_IMAGE_DATA = 39;
|
||||
static const DeviceCommandId_t FACTORY_RESET_CLEAR_MIRROR = 40;
|
||||
static const DeviceCommandId_t FACTORY_RESET_CLEAR_CIRCULAR = 41;
|
||||
static const DeviceCommandId_t UPDATE_VERIFY = 42;
|
||||
static const DeviceCommandId_t CONSECUTIVE_MRAM_DUMP = 43;
|
||||
|
||||
/** Reply IDs */
|
||||
static const DeviceCommandId_t ACK_REPORT = 50;
|
||||
|
@ -21,6 +21,7 @@ enum commonClassIds: uint8_t {
|
||||
CCSDS_IP_CORE_BRIDGE, //IPCI
|
||||
PLOC_UPDATER, //PLUD
|
||||
GOM_SPACE_HANDLER, //GOMS
|
||||
PLOC_MEMORY_DUMPER, //PLMEMDUMP
|
||||
COMMON_CLASS_ID_END // [EXPORT] : [END]
|
||||
};
|
||||
|
||||
|
@ -82,7 +82,8 @@ enum commonObjects: uint32_t {
|
||||
|
||||
START_TRACKER = 0x44130001,
|
||||
|
||||
PLOC_UPDATER = 0x44330000
|
||||
PLOC_UPDATER = 0x44330000,
|
||||
PLOC_MEMORY_DUMPER = 0x44330001
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,7 @@ enum: uint8_t {
|
||||
PLOC_SUPERVISOR_HANDLER = 115,
|
||||
FILE_SYSTEM = 116,
|
||||
PLOC_UPDATER = 117,
|
||||
PLOC_MEMORY_DUMPER = 118,
|
||||
COMMON_SUBSYSTEM_ID_END
|
||||
};
|
||||
}
|
||||
|
@ -90,13 +90,17 @@
|
||||
11207;SELF_TEST_COIL_CURRENT_FAILURE;LOW;Get self test result returns failure indicating that the coil current was outside of the expected range P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/IMTQHandler.h
|
||||
11208;INVALID_ERROR_BYTE;LOW;Received invalid error byte. This indicates an error of the communication link between IMTQ and OBC.;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/IMTQHandler.h
|
||||
11301;ERROR_STATE;HIGH;Reaction wheel signals an error state;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/RwHandler.h
|
||||
11501;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/PlocSupervisorHandler.h
|
||||
11502;SUPV_ACK_FAILURE;LOW;PLOC supervisor received acknowledgment failure report;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/PlocSupervisorHandler.h
|
||||
11503;SUPV_EXE_FAILURE;LOW;PLOC received execution failure report;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/PlocSupervisorHandler.h
|
||||
11504;SUPV_CRC_FAILURE_EVENT;LOW;PLOC supervisor reply has invalid crc;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/PlocSupervisorHandler.h
|
||||
11700;UPDATE_FILE_NOT_EXISTS;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/PlocUpdater.h
|
||||
11701;ACTION_COMMANDING_FAILED;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/PlocUpdater.h
|
||||
11702;UPDATE_AVAILABLE_FAILED;LOW;Supervisor handler replied action message indicating a command execution failure of the update available command;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/PlocUpdater.h
|
||||
11703;UPDATE_TRANSFER_FAILED;LOW;Supervisor handler failed to transfer an update space packet. P1: Parameter holds the number of update packets already sent.;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/PlocUpdater.h
|
||||
11704;UPDATE_VERIFY_FAILED;LOW;Supervisor failed to execute the update verify command.;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/PlocUpdater.h
|
||||
11705;UPDATE_FINISHED;INFO;MPSoC update successful completed;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/mission/devices/PlocUpdater.h
|
||||
11501;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocSupervisorHandler.h
|
||||
11502;SUPV_ACK_FAILURE;LOW;PLOC supervisor received acknowledgment failure report;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocSupervisorHandler.h
|
||||
11503;SUPV_EXE_FAILURE;LOW;PLOC received execution failure report;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocSupervisorHandler.h
|
||||
11504;SUPV_CRC_FAILURE_EVENT;LOW;PLOC supervisor reply has invalid crc;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocSupervisorHandler.h
|
||||
11600;SANITIZATION_FAILED;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/memory/SdCardManager.h
|
||||
11700;UPDATE_FILE_NOT_EXISTS;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocUpdater.h
|
||||
11701;ACTION_COMMANDING_FAILED;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocUpdater.h
|
||||
11702;UPDATE_AVAILABLE_FAILED;LOW;Supervisor handler replied action message indicating a command execution failure of the update available command;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocUpdater.h
|
||||
11703;UPDATE_TRANSFER_FAILED;LOW;Supervisor handler failed to transfer an update space packet. P1: Parameter holds the number of update packets already sent (inclusive the failed packet);C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocUpdater.h
|
||||
11704;UPDATE_VERIFY_FAILED;LOW;Supervisor failed to execute the update verify command.;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocUpdater.h
|
||||
11705;UPDATE_FINISHED;INFO;MPSoC update successful completed;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocUpdater.h
|
||||
11800;SEND_MRAM_DUMP_FAILED;LOW;;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocMemoryDumper.h
|
||||
11801;MRAM_DUMP_FAILED;LOW;Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocMemoryDumper.h
|
||||
11802;MRAM_DUMP_FINISHED;LOW;MRAM dump finished successfully;C:\Users\jakob\Work\EIVE\Q7S\Software\eive_obsw/bsp_q7s/devices/PlocMemoryDumper.h
|
||||
|
|
@ -2,10 +2,6 @@
|
||||
0x43000003;CORE_CONTROLLER
|
||||
0x43100002;ACS_CONTROLLER
|
||||
0x43400001;THERMAL_CONTROLLER
|
||||
0x44120001;RW1
|
||||
0x44120002;RW2
|
||||
0x44120003;RW3
|
||||
0x44120004;RW4
|
||||
0x44120006;MGM_0_LIS3_HANDLER
|
||||
0x44120010;GYRO_0_ADIS_HANDLER
|
||||
0x44120032;SUS_1
|
||||
@ -21,12 +17,16 @@
|
||||
0x44120042;SUS_11
|
||||
0x44120043;SUS_12
|
||||
0x44120044;SUS_13
|
||||
0x44120047;RW1
|
||||
0x44120107;MGM_1_RM3100_HANDLER
|
||||
0x44120111;GYRO_1_L3G_HANDLER
|
||||
0x44120148;RW2
|
||||
0x44120208;MGM_2_LIS3_HANDLER
|
||||
0x44120212;GYRO_2_ADIS_HANDLER
|
||||
0x44120249;RW3
|
||||
0x44120309;MGM_3_RM3100_HANDLER
|
||||
0x44120313;GYRO_3_L3G_HANDLER
|
||||
0x44120350;RW4
|
||||
0x44130001;START_TRACKER
|
||||
0x44130045;GPS0_HANDLER
|
||||
0x44130146;GPS1_HANDLER
|
||||
@ -38,6 +38,7 @@
|
||||
0x44250003;ACU_HANDLER
|
||||
0x443200A5;RAD_SENSOR
|
||||
0x44330000;PLOC_UPDATER
|
||||
0x44330001;PLOC_MEMORY_DUMPER
|
||||
0x44330015;PLOC_MPSOC_HANDLER
|
||||
0x44330016;PLOC_SUPERVISOR_HANDLER
|
||||
0x444100A2;SOLAR_ARRAY_DEPL_HANDLER
|
||||
|
|
@ -51,7 +51,7 @@ SUBSYSTEM_DEFINITION_DESTINATIONS = [
|
||||
]
|
||||
HEADER_DEFINITION_DESTINATIONS = [
|
||||
f"{OBSW_ROOT_DIR}/mission/", f"{OBSW_ROOT_DIR}/fsfw/", f"{FSFW_CONFIG_ROOT}",
|
||||
f"{OBSW_ROOT_DIR}/test/"
|
||||
f"{OBSW_ROOT_DIR}/test/", f"{OBSW_ROOT_DIR}/bsp_q7s"
|
||||
]
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @brief Auto-generated event translation file. Contains 102 translations.
|
||||
* @brief Auto-generated event translation file. Contains 106 translations.
|
||||
* @details
|
||||
* Generated on: 2021-08-07 18:11:16
|
||||
* Generated on: 2021-08-31 10:50:10
|
||||
*/
|
||||
#include "translateEvents.h"
|
||||
|
||||
@ -101,12 +101,16 @@ const char *SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING = "SUPV_MEMORY_READ_RPT_CRC_
|
||||
const char *SUPV_ACK_FAILURE_STRING = "SUPV_ACK_FAILURE";
|
||||
const char *SUPV_EXE_FAILURE_STRING = "SUPV_EXE_FAILURE";
|
||||
const char *SUPV_CRC_FAILURE_EVENT_STRING = "SUPV_CRC_FAILURE_EVENT";
|
||||
const char *SANITIZATION_FAILED_STRING = "SANITIZATION_FAILED";
|
||||
const char *UPDATE_FILE_NOT_EXISTS_STRING = "UPDATE_FILE_NOT_EXISTS";
|
||||
const char *ACTION_COMMANDING_FAILED_STRING = "ACTION_COMMANDING_FAILED";
|
||||
const char *UPDATE_AVAILABLE_FAILED_STRING = "UPDATE_AVAILABLE_FAILED";
|
||||
const char *UPDATE_TRANSFER_FAILED_STRING = "UPDATE_TRANSFER_FAILED";
|
||||
const char *UPDATE_VERIFY_FAILED_STRING = "UPDATE_VERIFY_FAILED";
|
||||
const char *UPDATE_FINISHED_STRING = "UPDATE_FINISHED";
|
||||
const char *SEND_MRAM_DUMP_FAILED_STRING = "SEND_MRAM_DUMP_FAILED";
|
||||
const char *MRAM_DUMP_FAILED_STRING = "MRAM_DUMP_FAILED";
|
||||
const char *MRAM_DUMP_FINISHED_STRING = "MRAM_DUMP_FINISHED";
|
||||
|
||||
const char * translateEvents(Event event) {
|
||||
switch( (event & 0xffff) ) {
|
||||
@ -302,6 +306,8 @@ const char * translateEvents(Event event) {
|
||||
return SUPV_EXE_FAILURE_STRING;
|
||||
case(11504):
|
||||
return SUPV_CRC_FAILURE_EVENT_STRING;
|
||||
case(11600):
|
||||
return SANITIZATION_FAILED_STRING;
|
||||
case(11700):
|
||||
return UPDATE_FILE_NOT_EXISTS_STRING;
|
||||
case(11701):
|
||||
@ -314,6 +320,12 @@ const char * translateEvents(Event event) {
|
||||
return UPDATE_VERIFY_FAILED_STRING;
|
||||
case(11705):
|
||||
return UPDATE_FINISHED_STRING;
|
||||
case(11800):
|
||||
return SEND_MRAM_DUMP_FAILED_STRING;
|
||||
case(11801):
|
||||
return MRAM_DUMP_FAILED_STRING;
|
||||
case(11802):
|
||||
return MRAM_DUMP_FINISHED_STRING;
|
||||
default:
|
||||
return "UNKNOWN_EVENT";
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
/**
|
||||
* @brief Auto-generated object translation file.
|
||||
* @details
|
||||
* Contains 104 translations.
|
||||
* Generated on: 2021-08-07 18:08:35
|
||||
* Contains 105 translations.
|
||||
* Generated on: 2021-08-31 10:31:24
|
||||
*/
|
||||
#include "translateObjects.h"
|
||||
|
||||
@ -10,10 +10,6 @@ const char *P60DOCK_TEST_TASK_STRING = "P60DOCK_TEST_TASK";
|
||||
const char *CORE_CONTROLLER_STRING = "CORE_CONTROLLER";
|
||||
const char *ACS_CONTROLLER_STRING = "ACS_CONTROLLER";
|
||||
const char *THERMAL_CONTROLLER_STRING = "THERMAL_CONTROLLER";
|
||||
const char *RW1_STRING = "RW1";
|
||||
const char *RW2_STRING = "RW2";
|
||||
const char *RW3_STRING = "RW3";
|
||||
const char *RW4_STRING = "RW4";
|
||||
const char *MGM_0_LIS3_HANDLER_STRING = "MGM_0_LIS3_HANDLER";
|
||||
const char *GYRO_0_ADIS_HANDLER_STRING = "GYRO_0_ADIS_HANDLER";
|
||||
const char *SUS_1_STRING = "SUS_1";
|
||||
@ -29,12 +25,16 @@ const char *SUS_10_STRING = "SUS_10";
|
||||
const char *SUS_11_STRING = "SUS_11";
|
||||
const char *SUS_12_STRING = "SUS_12";
|
||||
const char *SUS_13_STRING = "SUS_13";
|
||||
const char *RW1_STRING = "RW1";
|
||||
const char *MGM_1_RM3100_HANDLER_STRING = "MGM_1_RM3100_HANDLER";
|
||||
const char *GYRO_1_L3G_HANDLER_STRING = "GYRO_1_L3G_HANDLER";
|
||||
const char *RW2_STRING = "RW2";
|
||||
const char *MGM_2_LIS3_HANDLER_STRING = "MGM_2_LIS3_HANDLER";
|
||||
const char *GYRO_2_ADIS_HANDLER_STRING = "GYRO_2_ADIS_HANDLER";
|
||||
const char *RW3_STRING = "RW3";
|
||||
const char *MGM_3_RM3100_HANDLER_STRING = "MGM_3_RM3100_HANDLER";
|
||||
const char *GYRO_3_L3G_HANDLER_STRING = "GYRO_3_L3G_HANDLER";
|
||||
const char *RW4_STRING = "RW4";
|
||||
const char *START_TRACKER_STRING = "START_TRACKER";
|
||||
const char *GPS0_HANDLER_STRING = "GPS0_HANDLER";
|
||||
const char *GPS1_HANDLER_STRING = "GPS1_HANDLER";
|
||||
@ -46,6 +46,7 @@ const char *PDU2_HANDLER_STRING = "PDU2_HANDLER";
|
||||
const char *ACU_HANDLER_STRING = "ACU_HANDLER";
|
||||
const char *RAD_SENSOR_STRING = "RAD_SENSOR";
|
||||
const char *PLOC_UPDATER_STRING = "PLOC_UPDATER";
|
||||
const char *PLOC_MEMORY_DUMPER_STRING = "PLOC_MEMORY_DUMPER";
|
||||
const char *PLOC_MPSOC_HANDLER_STRING = "PLOC_MPSOC_HANDLER";
|
||||
const char *PLOC_SUPERVISOR_HANDLER_STRING = "PLOC_SUPERVISOR_HANDLER";
|
||||
const char *SOLAR_ARRAY_DEPL_HANDLER_STRING = "SOLAR_ARRAY_DEPL_HANDLER";
|
||||
@ -121,14 +122,6 @@ const char* translateObject(object_id_t object) {
|
||||
return ACS_CONTROLLER_STRING;
|
||||
case 0x43400001:
|
||||
return THERMAL_CONTROLLER_STRING;
|
||||
case 0x44120001:
|
||||
return RW1_STRING;
|
||||
case 0x44120002:
|
||||
return RW2_STRING;
|
||||
case 0x44120003:
|
||||
return RW3_STRING;
|
||||
case 0x44120004:
|
||||
return RW4_STRING;
|
||||
case 0x44120006:
|
||||
return MGM_0_LIS3_HANDLER_STRING;
|
||||
case 0x44120010:
|
||||
@ -159,18 +152,26 @@ const char* translateObject(object_id_t object) {
|
||||
return SUS_12_STRING;
|
||||
case 0x44120044:
|
||||
return SUS_13_STRING;
|
||||
case 0x44120047:
|
||||
return RW1_STRING;
|
||||
case 0x44120107:
|
||||
return MGM_1_RM3100_HANDLER_STRING;
|
||||
case 0x44120111:
|
||||
return GYRO_1_L3G_HANDLER_STRING;
|
||||
case 0x44120148:
|
||||
return RW2_STRING;
|
||||
case 0x44120208:
|
||||
return MGM_2_LIS3_HANDLER_STRING;
|
||||
case 0x44120212:
|
||||
return GYRO_2_ADIS_HANDLER_STRING;
|
||||
case 0x44120249:
|
||||
return RW3_STRING;
|
||||
case 0x44120309:
|
||||
return MGM_3_RM3100_HANDLER_STRING;
|
||||
case 0x44120313:
|
||||
return GYRO_3_L3G_HANDLER_STRING;
|
||||
case 0x44120350:
|
||||
return RW4_STRING;
|
||||
case 0x44130001:
|
||||
return START_TRACKER_STRING;
|
||||
case 0x44130045:
|
||||
@ -193,6 +194,8 @@ const char* translateObject(object_id_t object) {
|
||||
return RAD_SENSOR_STRING;
|
||||
case 0x44330000:
|
||||
return PLOC_UPDATER_STRING;
|
||||
case 0x44330001:
|
||||
return PLOC_MEMORY_DUMPER_STRING;
|
||||
case 0x44330015:
|
||||
return PLOC_MPSOC_HANDLER_STRING;
|
||||
case 0x44330016:
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @brief Auto-generated event translation file. Contains 102 translations.
|
||||
* @brief Auto-generated event translation file. Contains 106 translations.
|
||||
* @details
|
||||
* Generated on: 2021-08-07 18:11:16
|
||||
* Generated on: 2021-08-31 10:50:10
|
||||
*/
|
||||
#include "translateEvents.h"
|
||||
|
||||
@ -101,12 +101,16 @@ const char *SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING = "SUPV_MEMORY_READ_RPT_CRC_
|
||||
const char *SUPV_ACK_FAILURE_STRING = "SUPV_ACK_FAILURE";
|
||||
const char *SUPV_EXE_FAILURE_STRING = "SUPV_EXE_FAILURE";
|
||||
const char *SUPV_CRC_FAILURE_EVENT_STRING = "SUPV_CRC_FAILURE_EVENT";
|
||||
const char *SANITIZATION_FAILED_STRING = "SANITIZATION_FAILED";
|
||||
const char *UPDATE_FILE_NOT_EXISTS_STRING = "UPDATE_FILE_NOT_EXISTS";
|
||||
const char *ACTION_COMMANDING_FAILED_STRING = "ACTION_COMMANDING_FAILED";
|
||||
const char *UPDATE_AVAILABLE_FAILED_STRING = "UPDATE_AVAILABLE_FAILED";
|
||||
const char *UPDATE_TRANSFER_FAILED_STRING = "UPDATE_TRANSFER_FAILED";
|
||||
const char *UPDATE_VERIFY_FAILED_STRING = "UPDATE_VERIFY_FAILED";
|
||||
const char *UPDATE_FINISHED_STRING = "UPDATE_FINISHED";
|
||||
const char *SEND_MRAM_DUMP_FAILED_STRING = "SEND_MRAM_DUMP_FAILED";
|
||||
const char *MRAM_DUMP_FAILED_STRING = "MRAM_DUMP_FAILED";
|
||||
const char *MRAM_DUMP_FINISHED_STRING = "MRAM_DUMP_FINISHED";
|
||||
|
||||
const char * translateEvents(Event event) {
|
||||
switch( (event & 0xffff) ) {
|
||||
@ -302,6 +306,8 @@ const char * translateEvents(Event event) {
|
||||
return SUPV_EXE_FAILURE_STRING;
|
||||
case(11504):
|
||||
return SUPV_CRC_FAILURE_EVENT_STRING;
|
||||
case(11600):
|
||||
return SANITIZATION_FAILED_STRING;
|
||||
case(11700):
|
||||
return UPDATE_FILE_NOT_EXISTS_STRING;
|
||||
case(11701):
|
||||
@ -314,6 +320,12 @@ const char * translateEvents(Event event) {
|
||||
return UPDATE_VERIFY_FAILED_STRING;
|
||||
case(11705):
|
||||
return UPDATE_FINISHED_STRING;
|
||||
case(11800):
|
||||
return SEND_MRAM_DUMP_FAILED_STRING;
|
||||
case(11801):
|
||||
return MRAM_DUMP_FAILED_STRING;
|
||||
case(11802):
|
||||
return MRAM_DUMP_FINISHED_STRING;
|
||||
default:
|
||||
return "UNKNOWN_EVENT";
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
/**
|
||||
* @brief Auto-generated object translation file.
|
||||
* @details
|
||||
* Contains 104 translations.
|
||||
* Generated on: 2021-08-07 18:08:35
|
||||
* Contains 105 translations.
|
||||
* Generated on: 2021-08-31 10:31:24
|
||||
*/
|
||||
#include "translateObjects.h"
|
||||
|
||||
@ -10,10 +10,6 @@ const char *P60DOCK_TEST_TASK_STRING = "P60DOCK_TEST_TASK";
|
||||
const char *CORE_CONTROLLER_STRING = "CORE_CONTROLLER";
|
||||
const char *ACS_CONTROLLER_STRING = "ACS_CONTROLLER";
|
||||
const char *THERMAL_CONTROLLER_STRING = "THERMAL_CONTROLLER";
|
||||
const char *RW1_STRING = "RW1";
|
||||
const char *RW2_STRING = "RW2";
|
||||
const char *RW3_STRING = "RW3";
|
||||
const char *RW4_STRING = "RW4";
|
||||
const char *MGM_0_LIS3_HANDLER_STRING = "MGM_0_LIS3_HANDLER";
|
||||
const char *GYRO_0_ADIS_HANDLER_STRING = "GYRO_0_ADIS_HANDLER";
|
||||
const char *SUS_1_STRING = "SUS_1";
|
||||
@ -29,12 +25,16 @@ const char *SUS_10_STRING = "SUS_10";
|
||||
const char *SUS_11_STRING = "SUS_11";
|
||||
const char *SUS_12_STRING = "SUS_12";
|
||||
const char *SUS_13_STRING = "SUS_13";
|
||||
const char *RW1_STRING = "RW1";
|
||||
const char *MGM_1_RM3100_HANDLER_STRING = "MGM_1_RM3100_HANDLER";
|
||||
const char *GYRO_1_L3G_HANDLER_STRING = "GYRO_1_L3G_HANDLER";
|
||||
const char *RW2_STRING = "RW2";
|
||||
const char *MGM_2_LIS3_HANDLER_STRING = "MGM_2_LIS3_HANDLER";
|
||||
const char *GYRO_2_ADIS_HANDLER_STRING = "GYRO_2_ADIS_HANDLER";
|
||||
const char *RW3_STRING = "RW3";
|
||||
const char *MGM_3_RM3100_HANDLER_STRING = "MGM_3_RM3100_HANDLER";
|
||||
const char *GYRO_3_L3G_HANDLER_STRING = "GYRO_3_L3G_HANDLER";
|
||||
const char *RW4_STRING = "RW4";
|
||||
const char *START_TRACKER_STRING = "START_TRACKER";
|
||||
const char *GPS0_HANDLER_STRING = "GPS0_HANDLER";
|
||||
const char *GPS1_HANDLER_STRING = "GPS1_HANDLER";
|
||||
@ -46,6 +46,7 @@ const char *PDU2_HANDLER_STRING = "PDU2_HANDLER";
|
||||
const char *ACU_HANDLER_STRING = "ACU_HANDLER";
|
||||
const char *RAD_SENSOR_STRING = "RAD_SENSOR";
|
||||
const char *PLOC_UPDATER_STRING = "PLOC_UPDATER";
|
||||
const char *PLOC_MEMORY_DUMPER_STRING = "PLOC_MEMORY_DUMPER";
|
||||
const char *PLOC_MPSOC_HANDLER_STRING = "PLOC_MPSOC_HANDLER";
|
||||
const char *PLOC_SUPERVISOR_HANDLER_STRING = "PLOC_SUPERVISOR_HANDLER";
|
||||
const char *SOLAR_ARRAY_DEPL_HANDLER_STRING = "SOLAR_ARRAY_DEPL_HANDLER";
|
||||
@ -121,14 +122,6 @@ const char* translateObject(object_id_t object) {
|
||||
return ACS_CONTROLLER_STRING;
|
||||
case 0x43400001:
|
||||
return THERMAL_CONTROLLER_STRING;
|
||||
case 0x44120001:
|
||||
return RW1_STRING;
|
||||
case 0x44120002:
|
||||
return RW2_STRING;
|
||||
case 0x44120003:
|
||||
return RW3_STRING;
|
||||
case 0x44120004:
|
||||
return RW4_STRING;
|
||||
case 0x44120006:
|
||||
return MGM_0_LIS3_HANDLER_STRING;
|
||||
case 0x44120010:
|
||||
@ -159,18 +152,26 @@ const char* translateObject(object_id_t object) {
|
||||
return SUS_12_STRING;
|
||||
case 0x44120044:
|
||||
return SUS_13_STRING;
|
||||
case 0x44120047:
|
||||
return RW1_STRING;
|
||||
case 0x44120107:
|
||||
return MGM_1_RM3100_HANDLER_STRING;
|
||||
case 0x44120111:
|
||||
return GYRO_1_L3G_HANDLER_STRING;
|
||||
case 0x44120148:
|
||||
return RW2_STRING;
|
||||
case 0x44120208:
|
||||
return MGM_2_LIS3_HANDLER_STRING;
|
||||
case 0x44120212:
|
||||
return GYRO_2_ADIS_HANDLER_STRING;
|
||||
case 0x44120249:
|
||||
return RW3_STRING;
|
||||
case 0x44120309:
|
||||
return MGM_3_RM3100_HANDLER_STRING;
|
||||
case 0x44120313:
|
||||
return GYRO_3_L3G_HANDLER_STRING;
|
||||
case 0x44120350:
|
||||
return RW4_STRING;
|
||||
case 0x44130001:
|
||||
return START_TRACKER_STRING;
|
||||
case 0x44130045:
|
||||
@ -193,6 +194,8 @@ const char* translateObject(object_id_t object) {
|
||||
return RAD_SENSOR_STRING;
|
||||
case 0x44330000:
|
||||
return PLOC_UPDATER_STRING;
|
||||
case 0x44330001:
|
||||
return PLOC_MEMORY_DUMPER_STRING;
|
||||
case 0x44330015:
|
||||
return PLOC_MPSOC_HANDLER_STRING;
|
||||
case 0x44330016:
|
||||
|
@ -556,6 +556,9 @@ ReturnValue_t pst::pstUart(FixedTimeslotTaskIF *thisSequence) {
|
||||
DeviceHandlerIF::GET_READ);
|
||||
#endif
|
||||
|
||||
thisSequence->addSlot(objects::PLOC_UPDATER, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::PLOC_MEMORY_DUMPER, length * 0,
|
||||
DeviceHandlerIF::PERFORM_OPERATION);
|
||||
#if OBSW_ADD_PLOC_SUPERVISOR == 1
|
||||
thisSequence->addSlot(objects::PLOC_SUPERVISOR_HANDLER, length * 0,
|
||||
DeviceHandlerIF::PERFORM_OPERATION);
|
||||
@ -851,6 +854,10 @@ ReturnValue_t pst::pollingSequenceTE0720(FixedTimeslotTaskIF *thisSequence) {
|
||||
thisSequence->addSlot(objects::PLOC_SUPERVISOR_HANDLER, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||
#endif
|
||||
|
||||
thisSequence->addSlot(objects::PLOC_UPDATER, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
thisSequence->addSlot(objects::PLOC_MEMORY_DUMPER, length * 0,
|
||||
DeviceHandlerIF::PERFORM_OPERATION);
|
||||
|
||||
if (thisSequence->checkSequence() != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::error << "Initialization of TE0720 PST failed" << std::endl;
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
|
Loading…
Reference in New Issue
Block a user