compiles
This commit is contained in:
parent
a3b5993fdc
commit
7bcc4b18b7
@ -163,6 +163,8 @@ ReturnValue_t CoreController::initializeAfterTaskCreation() {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ReturnValue_t CoreController::executeAction(Action *action) { return action->handle(); }
|
||||||
|
|
||||||
ReturnValue_t CoreController::handleAction(core::SwitchRebootFileHandlingAction *action) {
|
ReturnValue_t CoreController::handleAction(core::SwitchRebootFileHandlingAction *action) {
|
||||||
std::string path = sdcMan->getCurrentMountPrefix() + REBOOT_FILE;
|
std::string path = sdcMan->getCurrentMountPrefix() + REBOOT_FILE;
|
||||||
// Disable the reboot file mechanism
|
// Disable the reboot file mechanism
|
||||||
@ -749,24 +751,24 @@ ReturnValue_t CoreController::handleAction(core::ListDirectoryIntoFileAction *ac
|
|||||||
// 2 bytes for a and R flag, at least 5 bytes for minimum valid path /tmp with
|
// 2 bytes for a and R flag, at least 5 bytes for minimum valid path /tmp with
|
||||||
// null termination, at least 7 bytes for minimum target file name /tmp/a with
|
// null termination, at least 7 bytes for minimum target file name /tmp/a with
|
||||||
// null termination.
|
// null termination.
|
||||||
//TODO make work again
|
// TODO make work again
|
||||||
// if (size < 14) {
|
// if (size < 14) {
|
||||||
// return HasActionsIF::INVALID_PARAMETERS;
|
// return HasActionsIF::INVALID_PARAMETERS;
|
||||||
// }
|
// }
|
||||||
// We could also make -l optional, but I can't think of a reason why to not use -l..
|
// We could also make -l optional, but I can't think of a reason why to not use -l..
|
||||||
|
|
||||||
// This flag specifies to run ls with -a
|
// This flag specifies to run ls with -a
|
||||||
bool aFlag = 0;//data[0];
|
bool aFlag = 0; // data[0];
|
||||||
//data += 1;
|
// data += 1;
|
||||||
// This flag specifies to run ls with -R
|
// This flag specifies to run ls with -R
|
||||||
bool RFlag = 0;//data[1];
|
bool RFlag = 0; // data[1];
|
||||||
//data += 1;
|
// data += 1;
|
||||||
|
|
||||||
size_t remainingSize = 0;//size - 2;
|
size_t remainingSize = 0; // size - 2;
|
||||||
// One larger for null termination, which prevents undefined behaviour if the sent
|
// One larger for null termination, which prevents undefined behaviour if the sent
|
||||||
// strings are not 0 terminated properly
|
// strings are not 0 terminated properly
|
||||||
std::vector<uint8_t> repoAndTargetFileBuffer(remainingSize + 1, 0);
|
std::vector<uint8_t> repoAndTargetFileBuffer(remainingSize + 1, 0);
|
||||||
//std::memcpy(repoAndTargetFileBuffer.data(), data, remainingSize);
|
// std::memcpy(repoAndTargetFileBuffer.data(), data, remainingSize);
|
||||||
const char *currentCharPtr = reinterpret_cast<const char *>(repoAndTargetFileBuffer.data());
|
const char *currentCharPtr = reinterpret_cast<const char *>(repoAndTargetFileBuffer.data());
|
||||||
// Full target file name
|
// Full target file name
|
||||||
std::string repoName(currentCharPtr);
|
std::string repoName(currentCharPtr);
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include "fsfw/globalfunctions/CRC.h"
|
#include "fsfw/globalfunctions/CRC.h"
|
||||||
#include "linux/devices/devicedefinitions/PlocSupervisorDefinitions.h"
|
#include "linux/devices/devicedefinitions/PlocSupervisorDefinitions.h"
|
||||||
|
|
||||||
//TODO this is work in progress in adapting to new actions
|
// TODO this is work in progress in adapting to new actions
|
||||||
|
|
||||||
PlocMPSoCHandler::PlocMPSoCHandler(object_id_t objectId, object_id_t uartComIFid,
|
PlocMPSoCHandler::PlocMPSoCHandler(object_id_t objectId, object_id_t uartComIFid,
|
||||||
CookieIF* comCookie, PlocMPSoCHelper* plocMPSoCHelper,
|
CookieIF* comCookie, PlocMPSoCHelper* plocMPSoCHelper,
|
||||||
@ -199,8 +199,6 @@ ReturnValue_t PlocMPSoCHandler::buildTransitionDeviceCommand(DeviceCommandId_t*
|
|||||||
return NOTHING_TO_SEND;
|
return NOTHING_TO_SEND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void PlocMPSoCHandler::fillCommandAndReplyMap() {
|
void PlocMPSoCHandler::fillCommandAndReplyMap() {
|
||||||
this->insertInCommandMap(static_cast<DeviceCommandId_t>(PlocMpSoCCommands::TC_MEM_WRITE));
|
this->insertInCommandMap(static_cast<DeviceCommandId_t>(PlocMpSoCCommands::TC_MEM_WRITE));
|
||||||
this->insertInCommandMap(static_cast<DeviceCommandId_t>(PlocMpSoCCommands::TC_MEM_READ));
|
this->insertInCommandMap(static_cast<DeviceCommandId_t>(PlocMpSoCCommands::TC_MEM_READ));
|
||||||
@ -329,6 +327,12 @@ void PlocMPSoCHandler::handleEvent(EventMessage* eventMessage) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ReturnValue_t PlocMPSoCHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
||||||
|
const uint8_t* commandData,
|
||||||
|
size_t commandDataLen) {
|
||||||
|
return NOTHING_TO_SEND;
|
||||||
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHandler::handleAction(PlocMpSoCMemWriteAction* action) {
|
ReturnValue_t PlocMPSoCHandler::handleAction(PlocMpSoCMemWriteAction* action) {
|
||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = RETURN_OK;
|
||||||
sequenceCount++;
|
sequenceCount++;
|
||||||
@ -345,7 +349,7 @@ ReturnValue_t PlocMPSoCHandler::handleAction(PlocMpSoCMemReadAction* action) {
|
|||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = RETURN_OK;
|
||||||
sequenceCount++;
|
sequenceCount++;
|
||||||
mpsoc::TcMemRead tcMemRead(sequenceCount);
|
mpsoc::TcMemRead tcMemRead(sequenceCount);
|
||||||
//result = tcMemRead.createPacket(commandData, commandDataLen);
|
// result = tcMemRead.createPacket(commandData, commandDataLen);
|
||||||
if (result != RETURN_OK) {
|
if (result != RETURN_OK) {
|
||||||
sequenceCount--;
|
sequenceCount--;
|
||||||
return result;
|
return result;
|
||||||
@ -361,8 +365,8 @@ ReturnValue_t PlocMPSoCHandler::handleAction(PlocMpSoCFlashDeleteAction* action)
|
|||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = RETURN_OK;
|
||||||
sequenceCount++;
|
sequenceCount++;
|
||||||
mpsoc::TcFlashDelete tcFlashDelete(sequenceCount);
|
mpsoc::TcFlashDelete tcFlashDelete(sequenceCount);
|
||||||
//result = tcFlashDelete.createPacket(
|
// result = tcFlashDelete.createPacket(
|
||||||
// std::string(reinterpret_cast<const char*>(commandData), commandDataLen));
|
// std::string(reinterpret_cast<const char*>(commandData), commandDataLen));
|
||||||
if (result != RETURN_OK) {
|
if (result != RETURN_OK) {
|
||||||
sequenceCount--;
|
sequenceCount--;
|
||||||
return result;
|
return result;
|
||||||
@ -374,7 +378,7 @@ ReturnValue_t PlocMPSoCHandler::handleAction(PlocMpSoCReplayStartAction* action)
|
|||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = RETURN_OK;
|
||||||
sequenceCount++;
|
sequenceCount++;
|
||||||
mpsoc::TcReplayStart tcReplayStart(sequenceCount);
|
mpsoc::TcReplayStart tcReplayStart(sequenceCount);
|
||||||
//result = tcReplayStart.createPacket(commandData, commandDataLen);
|
// result = tcReplayStart.createPacket(commandData, commandDataLen);
|
||||||
if (result != RETURN_OK) {
|
if (result != RETURN_OK) {
|
||||||
sequenceCount--;
|
sequenceCount--;
|
||||||
return result;
|
return result;
|
||||||
@ -399,7 +403,7 @@ ReturnValue_t PlocMPSoCHandler::handleAction(PlocMpSoCDownlinkPwrOnAction* actio
|
|||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = RETURN_OK;
|
||||||
sequenceCount++;
|
sequenceCount++;
|
||||||
mpsoc::TcDownlinkPwrOn tcDownlinkPwrOn(sequenceCount);
|
mpsoc::TcDownlinkPwrOn tcDownlinkPwrOn(sequenceCount);
|
||||||
//result = tcDownlinkPwrOn.createPacket(commandData, commandDataLen);
|
// result = tcDownlinkPwrOn.createPacket(commandData, commandDataLen);
|
||||||
if (result != RETURN_OK) {
|
if (result != RETURN_OK) {
|
||||||
sequenceCount--;
|
sequenceCount--;
|
||||||
return result;
|
return result;
|
||||||
@ -424,7 +428,7 @@ ReturnValue_t PlocMPSoCHandler::handleAction(PlocMpSoCReplayWriteSequenceAction*
|
|||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = RETURN_OK;
|
||||||
sequenceCount++;
|
sequenceCount++;
|
||||||
mpsoc::TcReplayWriteSeq tcReplayWriteSeq(sequenceCount);
|
mpsoc::TcReplayWriteSeq tcReplayWriteSeq(sequenceCount);
|
||||||
//result = tcReplayWriteSeq.createPacket(commandData, commandDataLen);
|
// result = tcReplayWriteSeq.createPacket(commandData, commandDataLen);
|
||||||
if (result != RETURN_OK) {
|
if (result != RETURN_OK) {
|
||||||
sequenceCount--;
|
sequenceCount--;
|
||||||
return result;
|
return result;
|
||||||
@ -469,7 +473,7 @@ ReturnValue_t PlocMPSoCHandler::handleAction(PlocMpSoCCamCmdSendAction* action)
|
|||||||
ReturnValue_t result = RETURN_OK;
|
ReturnValue_t result = RETURN_OK;
|
||||||
sequenceCount++;
|
sequenceCount++;
|
||||||
mpsoc::TcCamcmdSend tcCamCmdSend(sequenceCount);
|
mpsoc::TcCamcmdSend tcCamCmdSend(sequenceCount);
|
||||||
//result = tcCamCmdSend.createPacket(commandData, commandDataLen);
|
// result = tcCamCmdSend.createPacket(commandData, commandDataLen);
|
||||||
if (result != RETURN_OK) {
|
if (result != RETURN_OK) {
|
||||||
sequenceCount--;
|
sequenceCount--;
|
||||||
return result;
|
return result;
|
||||||
@ -485,7 +489,7 @@ ReturnValue_t PlocMPSoCHandler::handleAction(PlocMpSoCFlashWriteAction* action)
|
|||||||
// return MPSoCReturnValuesIF::FILENAME_TOO_LONG;
|
// return MPSoCReturnValuesIF::FILENAME_TOO_LONG;
|
||||||
// }
|
// }
|
||||||
mpsoc::FlashWritePusCmd flashWritePusCmd;
|
mpsoc::FlashWritePusCmd flashWritePusCmd;
|
||||||
//result = flashWritePusCmd.extractFields(data, size);
|
// result = flashWritePusCmd.extractFields(data, size);
|
||||||
if (result != RETURN_OK) {
|
if (result != RETURN_OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -59,6 +59,8 @@ ReturnValue_t PlocMemoryDumper::handleAction(DumpMemoryAction* action) {
|
|||||||
|
|
||||||
MessageQueueId_t PlocMemoryDumper::getCommandQueue() const { return commandQueue->getId(); }
|
MessageQueueId_t PlocMemoryDumper::getCommandQueue() const { return commandQueue->getId(); }
|
||||||
|
|
||||||
|
ActionHelper* PlocMemoryDumper::getActionHelper() { return &actionHelper; }
|
||||||
|
|
||||||
MessageQueueIF* PlocMemoryDumper::getCommandQueuePtr() { return commandQueue; }
|
MessageQueueIF* PlocMemoryDumper::getCommandQueuePtr() { return commandQueue; }
|
||||||
|
|
||||||
void PlocMemoryDumper::readCommandQueue() {
|
void PlocMemoryDumper::readCommandQueue() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user