flash read command
This commit is contained in:
@ -154,14 +154,14 @@ ReturnValue_t StrHelper::startFlashWrite(std::string flashWriteFile_, uint8_t re
|
||||
return RETURN_OK;
|
||||
}
|
||||
|
||||
ReturnValue_t StrHelper::startFlashRead(std::string flashReadFile_, uint8_t region,
|
||||
uint32_t address, uint16_t length) {
|
||||
ReturnValue_t result = checkPath(flashReadFile_);
|
||||
ReturnValue_t StrHelper::startFlashRead(std::string flashReadPath_, uint8_t region,
|
||||
uint32_t address, uint32_t length) {
|
||||
ReturnValue_t result = checkPath(flashReadPath_);
|
||||
if (result != RETURN_OK) {
|
||||
return result;
|
||||
}
|
||||
flashReadFile = flashReadFile_;
|
||||
if(not std::filesystem::exists(flashReadFile)) {
|
||||
flashReadPath = flashReadPath_;
|
||||
if(not std::filesystem::exists(flashReadPath)) {
|
||||
return FILE_NOT_EXISTS;
|
||||
}
|
||||
flashReadAddress = address;
|
||||
@ -456,14 +456,13 @@ ReturnValue_t StrHelper::checkReply() {
|
||||
if (type != TMTC_ACTIONREPLY) {
|
||||
sif::warning << "StrHelper::checkReply: Received reply with invalid type ID"
|
||||
<< std::endl;
|
||||
triggerEvent(INVALID_TYPE_ID);
|
||||
return RETURN_FAILED;
|
||||
return INVALID_TYPE_ID;
|
||||
}
|
||||
uint8_t status = datalinkLayer.getStatusField();
|
||||
if (status != ArcsecDatalinkLayer::STATUS_OK) {
|
||||
triggerEvent(STATUS_ERROR);
|
||||
sif::warning << "StrHelper::checkReply: Status failure" << std::endl;
|
||||
return RETURN_FAILED;
|
||||
sif::warning << "StrHelper::checkReply: Status failure: "
|
||||
<< static_cast<unsigned int>(status) << std::endl;
|
||||
return STATUS_ERROR;
|
||||
}
|
||||
return RETURN_OK;
|
||||
}
|
||||
@ -511,7 +510,7 @@ ReturnValue_t StrHelper::checkFlashActionReply(uint8_t region_, uint32_t address
|
||||
if (address != address_) {
|
||||
return ADDRESS_MISMATCH;
|
||||
}
|
||||
if (region != length_) {
|
||||
if (length != length_) {
|
||||
return LENGTH_MISMATCH;
|
||||
}
|
||||
return RETURN_OK;
|
||||
|
Reference in New Issue
Block a user