flash write tc, fix in pus data extraction
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
This commit is contained in:
parent
78b3f28188
commit
f99e96a20a
@ -290,7 +290,7 @@ public:
|
|||||||
size_t nameSize = filename.size();
|
size_t nameSize = filename.size();
|
||||||
std::memcpy(this->getPacketData(), filename.c_str(),
|
std::memcpy(this->getPacketData(), filename.c_str(),
|
||||||
nameSize);
|
nameSize);
|
||||||
std::memcpy(this->getPacketData() + nameSize, &accessMode,
|
std::memcpy(this->getPacketData() + nameSize + 1, &accessMode,
|
||||||
sizeof(accessMode));
|
sizeof(accessMode));
|
||||||
this->setPacketDataLength(nameSize + CRC_SIZE - 1);
|
this->setPacketDataLength(nameSize + CRC_SIZE - 1);
|
||||||
result = addCrc();
|
result = addCrc();
|
||||||
@ -588,11 +588,12 @@ class FlashWritePusCmd : public MPSoCReturnValuesIF {
|
|||||||
if (obcFile.size() > (config::MAX_PATH_SIZE + config::MAX_FILENAME_SIZE)) {
|
if (obcFile.size() > (config::MAX_PATH_SIZE + config::MAX_FILENAME_SIZE)) {
|
||||||
return FILENAME_TOO_LONG;
|
return FILENAME_TOO_LONG;
|
||||||
}
|
}
|
||||||
mpsocFile = std::string(reinterpret_cast<const char*>(commandData + obcFile.size()));
|
mpsocFile = std::string(
|
||||||
|
reinterpret_cast<const char*>(commandData + obcFile.size() + SIZE_NULL_TERMINATOR));
|
||||||
if (mpsocFile.size() > MAX_FILENAME_SIZE) {
|
if (mpsocFile.size() > MAX_FILENAME_SIZE) {
|
||||||
return MPSOC_FILENAME_TOO_LONG;
|
return MPSOC_FILENAME_TOO_LONG;
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::HasReturnvaluesIF::RETURN_OK;
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string getObcFile() {
|
std::string getObcFile() {
|
||||||
@ -605,6 +606,7 @@ class FlashWritePusCmd : public MPSoCReturnValuesIF {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
static const size_t SIZE_NULL_TERMINATOR = 1;
|
||||||
std::string obcFile = "";
|
std::string obcFile = "";
|
||||||
std::string mpsocFile = "";
|
std::string mpsocFile = "";
|
||||||
};
|
};
|
||||||
|
@ -90,6 +90,10 @@ ReturnValue_t PlocMPSoCHandler::executeAction(ActionId_t actionId, MessageQueueI
|
|||||||
return MPSoCReturnValuesIF::FILENAME_TOO_LONG;
|
return MPSoCReturnValuesIF::FILENAME_TOO_LONG;
|
||||||
}
|
}
|
||||||
mpsoc::FlashWritePusCmd flashWritePusCmd;
|
mpsoc::FlashWritePusCmd flashWritePusCmd;
|
||||||
|
result = flashWritePusCmd.extractFields(data, size);
|
||||||
|
if (result != RETURN_OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
result = plocMPSoCHelper->startFlashWrite(flashWritePusCmd.getObcFile(),
|
result = plocMPSoCHelper->startFlashWrite(flashWritePusCmd.getObcFile(),
|
||||||
flashWritePusCmd.getMPSoCFile());
|
flashWritePusCmd.getMPSoCFile());
|
||||||
if (result != RETURN_OK) {
|
if (result != RETURN_OK) {
|
||||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
|||||||
Subproject commit b96ecce483fa26bb031dac53fd6eeb8889521093
|
Subproject commit 71c16f78aebadbc7b3d52bd5b09838937bbbc7d1
|
Loading…
x
Reference in New Issue
Block a user