perform renaming
This commit is contained in:
@@ -50,7 +50,7 @@ bool AssemblyBase::isInTransition() {
|
||||
bool AssemblyBase::handleChildrenChanged() {
|
||||
if (childrenChangedMode) {
|
||||
ReturnValue_t result = checkChildrenState();
|
||||
if (result != RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
handleChildrenLostMode(result);
|
||||
}
|
||||
return true;
|
||||
@@ -116,7 +116,7 @@ void AssemblyBase::handleChildrenTransition() {
|
||||
break;
|
||||
}
|
||||
ReturnValue_t result = checkChildrenState();
|
||||
if (result == RETURN_OK) {
|
||||
if (result == returnvalue::OK) {
|
||||
handleModeReached();
|
||||
} else {
|
||||
handleModeTransitionFailed(result);
|
||||
@@ -149,7 +149,7 @@ void AssemblyBase::handleModeTransitionFailed(ReturnValue_t result) {
|
||||
void AssemblyBase::sendHealthCommand(MessageQueueId_t sendTo, HealthState health) {
|
||||
CommandMessage command;
|
||||
HealthMessage::setHealthMessage(&command, HealthMessage::HEALTH_SET, health);
|
||||
if (commandQueue->sendMessage(sendTo, &command) == RETURN_OK) {
|
||||
if (commandQueue->sendMessage(sendTo, &command) == returnvalue::OK) {
|
||||
commandsOutstanding++;
|
||||
}
|
||||
}
|
||||
@@ -164,25 +164,25 @@ ReturnValue_t AssemblyBase::checkChildrenState() {
|
||||
|
||||
ReturnValue_t AssemblyBase::checkChildrenStateOff() {
|
||||
for (const auto& childIter : childrenMap) {
|
||||
if (checkChildOff(childIter.first) != RETURN_OK) {
|
||||
if (checkChildOff(childIter.first) != returnvalue::OK) {
|
||||
return NOT_ENOUGH_CHILDREN_IN_CORRECT_STATE;
|
||||
}
|
||||
}
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t AssemblyBase::checkChildOff(uint32_t objectId) {
|
||||
ChildInfo childInfo = childrenMap.find(objectId)->second;
|
||||
if (healthHelper.healthTable->isCommandable(objectId)) {
|
||||
if (childInfo.submode != SUBMODE_NONE) {
|
||||
return RETURN_FAILED;
|
||||
return returnvalue::FAILED;
|
||||
} else {
|
||||
if ((childInfo.mode != MODE_OFF) && (childInfo.mode != DeviceHandlerIF::MODE_ERROR_ON)) {
|
||||
return RETURN_FAILED;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
}
|
||||
}
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t AssemblyBase::checkModeCommand(Mode_t mode, Submode_t submode,
|
||||
@@ -192,7 +192,7 @@ ReturnValue_t AssemblyBase::checkModeCommand(Mode_t mode, Submode_t submode,
|
||||
if (submode != SUBMODE_NONE) {
|
||||
return INVALID_SUBMODE;
|
||||
}
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
if ((mode != MODE_ON) && (mode != DeviceHandlerIF::MODE_NORMAL)) {
|
||||
@@ -212,7 +212,7 @@ ReturnValue_t AssemblyBase::handleHealthReply(CommandMessage* message) {
|
||||
if (health != EXTERNAL_CONTROL) {
|
||||
updateChildChangedHealth(message->getSender(), true);
|
||||
}
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
if (message->getCommand() == HealthMessage::REPLY_HEALTH_SET ||
|
||||
(message->getCommand() == CommandMessage::REPLY_REJECTED &&
|
||||
@@ -220,9 +220,9 @@ ReturnValue_t AssemblyBase::handleHealthReply(CommandMessage* message) {
|
||||
if (isInTransition()) {
|
||||
commandsOutstanding--;
|
||||
}
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
return RETURN_FAILED;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
|
||||
bool AssemblyBase::checkAndHandleRecovery() {
|
||||
|
@@ -79,7 +79,7 @@ class AssemblyBase : public SubsystemBase {
|
||||
* @param submode The targeted submmode
|
||||
* @return Any information why this combination is invalid from HasModesIF
|
||||
* like HasModesIF::INVALID_SUBMODE.
|
||||
* On success return HasReturnvaluesIF::RETURN_OK
|
||||
* On success return returnvalue::OK
|
||||
*/
|
||||
virtual ReturnValue_t isModeCombinationValid(Mode_t mode, Submode_t submode) = 0;
|
||||
|
||||
|
@@ -19,7 +19,7 @@ ChildHandlerBase::~ChildHandlerBase() {}
|
||||
|
||||
ReturnValue_t ChildHandlerBase::initialize() {
|
||||
ReturnValue_t result = DeviceHandlerBase::initialize();
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ ReturnValue_t ChildHandlerBase::initialize() {
|
||||
if (parentId != objects::NO_OBJECT) {
|
||||
SubsystemBase* parent = ObjectManager::instance()->get<SubsystemBase>(parentId);
|
||||
if (parent == NULL) {
|
||||
return RETURN_FAILED;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
parentQueue = parent->getCommandQueue();
|
||||
|
||||
@@ -39,5 +39,5 @@ ReturnValue_t ChildHandlerBase::initialize() {
|
||||
|
||||
modeHelper.setParentQueue(parentQueue);
|
||||
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
@@ -34,7 +34,7 @@
|
||||
* @ingroup interfaces
|
||||
* @ingroup comm
|
||||
*/
|
||||
class DeviceCommunicationIF : public HasReturnvaluesIF {
|
||||
class DeviceCommunicationIF {
|
||||
public:
|
||||
static const uint8_t INTERFACE_ID = CLASS_ID::DEVICE_COMMUNICATION_IF;
|
||||
|
||||
|
@@ -32,7 +32,7 @@ DeviceHandlerBase::DeviceHandlerBase(object_id_t setObjectId, object_id_t device
|
||||
parameterHelper(this),
|
||||
actionHelper(this, nullptr),
|
||||
poolManager(this, nullptr),
|
||||
childTransitionFailure(RETURN_OK),
|
||||
childTransitionFailure(returnvalue::OK),
|
||||
fdirInstance(fdirInstance),
|
||||
defaultFDIRUsed(fdirInstance == nullptr),
|
||||
switchOffWasReported(false),
|
||||
@@ -46,7 +46,7 @@ DeviceHandlerBase::DeviceHandlerBase(object_id_t setObjectId, object_id_t device
|
||||
cookieInfo.pendingCommand = deviceCommandMap.end();
|
||||
if (comCookie == nullptr) {
|
||||
printWarningOrError(sif::OutputTypes::OUT_ERROR, "DeviceHandlerBase",
|
||||
HasReturnvaluesIF::RETURN_FAILED, "Invalid cookie");
|
||||
returnvalue::FAILED, "Invalid cookie");
|
||||
}
|
||||
if (this->fdirInstance == nullptr) {
|
||||
this->fdirInstance = new DeviceHandlerFailureIsolation(setObjectId, defaultFdirParentId);
|
||||
@@ -79,7 +79,7 @@ ReturnValue_t DeviceHandlerBase::performOperation(uint8_t counter) {
|
||||
this->lastStep = this->pstStep;
|
||||
|
||||
if (getComAction() == CommunicationAction::NOTHING) {
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
if (getComAction() == CommunicationAction::PERFORM_OPERATION) {
|
||||
@@ -90,11 +90,11 @@ ReturnValue_t DeviceHandlerBase::performOperation(uint8_t counter) {
|
||||
decrementDeviceReplyMap();
|
||||
fdirInstance->checkForFailures();
|
||||
performOperationHook();
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
if (mode == MODE_OFF) {
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
switch (getComAction()) {
|
||||
@@ -120,12 +120,12 @@ ReturnValue_t DeviceHandlerBase::performOperation(uint8_t counter) {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t DeviceHandlerBase::initialize() {
|
||||
ReturnValue_t result = SystemObject::initialize();
|
||||
if (result != RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ ReturnValue_t DeviceHandlerBase::initialize() {
|
||||
}
|
||||
|
||||
result = communicationInterface->initializeInterface(comCookie);
|
||||
if (result != RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
printWarningOrError(sif::OutputTypes::OUT_ERROR, "initialize",
|
||||
ObjectManagerIF::CHILD_INIT_FAILED, "ComIF initialization failed");
|
||||
return result;
|
||||
@@ -192,30 +192,30 @@ ReturnValue_t DeviceHandlerBase::initialize() {
|
||||
}
|
||||
|
||||
result = healthHelper.initialize();
|
||||
if (result != RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
|
||||
result = modeHelper.initialize();
|
||||
if (result != RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
result = actionHelper.initialize(commandQueue);
|
||||
if (result != RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
result = fdirInstance->initialize();
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
|
||||
result = parameterHelper.initialize();
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
|
||||
result = poolManager.initialize(commandQueue);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -224,14 +224,14 @@ ReturnValue_t DeviceHandlerBase::initialize() {
|
||||
if (thermalSet != nullptr) {
|
||||
// Set temperature target state to NON_OP.
|
||||
result = thermalSet->read();
|
||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result == returnvalue::OK) {
|
||||
thermalSet->heaterRequest.value = ThermalComponentIF::STATE_REQUEST_NON_OPERATIONAL;
|
||||
thermalSet->heaterRequest.setValid(true);
|
||||
thermalSet->commit();
|
||||
}
|
||||
}
|
||||
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
void DeviceHandlerBase::decrementDeviceReplyMap() {
|
||||
@@ -265,42 +265,42 @@ void DeviceHandlerBase::readCommandQueue() {
|
||||
|
||||
CommandMessage command;
|
||||
ReturnValue_t result = commandQueue->receiveMessage(&command);
|
||||
if (result != RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return;
|
||||
}
|
||||
|
||||
result = healthHelper.handleHealthCommand(&command);
|
||||
if (result == RETURN_OK) {
|
||||
if (result == returnvalue::OK) {
|
||||
return;
|
||||
}
|
||||
|
||||
result = modeHelper.handleModeCommand(&command);
|
||||
if (result == RETURN_OK) {
|
||||
if (result == returnvalue::OK) {
|
||||
return;
|
||||
}
|
||||
|
||||
result = actionHelper.handleActionMessage(&command);
|
||||
if (result == RETURN_OK) {
|
||||
if (result == returnvalue::OK) {
|
||||
return;
|
||||
}
|
||||
|
||||
result = parameterHelper.handleParameterMessage(&command);
|
||||
if (result == RETURN_OK) {
|
||||
if (result == returnvalue::OK) {
|
||||
return;
|
||||
}
|
||||
|
||||
result = poolManager.handleHousekeepingMessage(&command);
|
||||
if (result == RETURN_OK) {
|
||||
if (result == returnvalue::OK) {
|
||||
return;
|
||||
}
|
||||
|
||||
result = handleDeviceHandlerMessage(&command);
|
||||
if (result == RETURN_OK) {
|
||||
if (result == returnvalue::OK) {
|
||||
return;
|
||||
}
|
||||
|
||||
result = letChildHandleMessage(&command);
|
||||
if (result == RETURN_OK) {
|
||||
if (result == returnvalue::OK) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -328,7 +328,7 @@ void DeviceHandlerBase::doStateMachine() {
|
||||
sprintf(printout, "Transition timeout (%lu) occured !",
|
||||
static_cast<unsigned long>(childTransitionDelay));
|
||||
/* Common configuration error for development, so print it */
|
||||
printWarningOrError(sif::OutputTypes::OUT_WARNING, "doStateMachine", RETURN_FAILED,
|
||||
printWarningOrError(sif::OutputTypes::OUT_WARNING, "doStateMachine", returnvalue::FAILED,
|
||||
printout);
|
||||
#endif
|
||||
triggerEvent(MODE_TRANSITION_FAILED, childTransitionFailure, 0);
|
||||
@@ -407,7 +407,7 @@ ReturnValue_t DeviceHandlerBase::isModeCombinationValid(Mode_t mode, Submode_t s
|
||||
case MODE_NORMAL:
|
||||
case MODE_RAW:
|
||||
if (submode == SUBMODE_NONE) {
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
} else {
|
||||
return INVALID_SUBMODE;
|
||||
}
|
||||
@@ -444,9 +444,9 @@ ReturnValue_t DeviceHandlerBase::insertInReplyMap(DeviceCommandId_t replyId,
|
||||
info.countdown = countdown;
|
||||
auto resultPair = deviceReplyMap.emplace(replyId, info);
|
||||
if (resultPair.second) {
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
} else {
|
||||
return RETURN_FAILED;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -461,9 +461,9 @@ ReturnValue_t DeviceHandlerBase::insertInCommandMap(DeviceCommandId_t deviceComm
|
||||
info.alternativeReplyId = alternativeReplyId;
|
||||
auto resultPair = deviceCommandMap.emplace(deviceCommand, info);
|
||||
if (resultPair.second) {
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
} else {
|
||||
return RETURN_FAILED;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -499,7 +499,7 @@ ReturnValue_t DeviceHandlerBase::updateReplyMapEntry(DeviceCommandId_t deviceRep
|
||||
}
|
||||
info->delayCycles = delayCycles;
|
||||
info->periodic = periodic;
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -529,17 +529,17 @@ ReturnValue_t DeviceHandlerBase::updatePeriodicReply(bool enable, DeviceCommandI
|
||||
}
|
||||
}
|
||||
}
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t DeviceHandlerBase::setReplyDataset(DeviceCommandId_t replyId,
|
||||
LocalPoolDataSetBase* dataSet) {
|
||||
auto replyIter = deviceReplyMap.find(replyId);
|
||||
if (replyIter == deviceReplyMap.end()) {
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
replyIter->second.dataSet = dataSet;
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
void DeviceHandlerBase::callChildStatemachine() {
|
||||
@@ -578,7 +578,7 @@ void DeviceHandlerBase::setMode(Mode_t newMode, uint8_t newSubmode) {
|
||||
|
||||
if (mode == MODE_OFF and thermalSet != nullptr) {
|
||||
ReturnValue_t result = thermalSet->read();
|
||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result == returnvalue::OK) {
|
||||
if (thermalSet->heaterRequest.value != ThermalComponentIF::STATE_REQUEST_IGNORE) {
|
||||
thermalSet->heaterRequest.value = ThermalComponentIF::STATE_REQUEST_NON_OPERATIONAL;
|
||||
}
|
||||
@@ -593,7 +593,7 @@ void DeviceHandlerBase::setMode(Mode_t newMode) { setMode(newMode, submode); }
|
||||
|
||||
void DeviceHandlerBase::replyReturnvalueToCommand(ReturnValue_t status, uint32_t parameter) {
|
||||
// This is actually the reply protocol for raw and misc DH commands.
|
||||
if (status == RETURN_OK) {
|
||||
if (status == returnvalue::OK) {
|
||||
CommandMessage reply(CommandMessage::REPLY_COMMAND_OK, 0, parameter);
|
||||
commandQueue->reply(&reply);
|
||||
} else {
|
||||
@@ -606,7 +606,7 @@ void DeviceHandlerBase::replyToCommand(ReturnValue_t status, uint32_t parameter)
|
||||
// Check if we reply to a raw command.
|
||||
if (cookieInfo.pendingCommand->first == RAW_COMMAND_ID) {
|
||||
if (status == NO_REPLY_EXPECTED) {
|
||||
status = RETURN_OK;
|
||||
status = returnvalue::OK;
|
||||
}
|
||||
replyReturnvalueToCommand(status, parameter);
|
||||
// Always delete data from a raw command.
|
||||
@@ -617,7 +617,7 @@ void DeviceHandlerBase::replyToCommand(ReturnValue_t status, uint32_t parameter)
|
||||
if (cookieInfo.pendingCommand->second.sendReplyTo != NO_COMMANDER) {
|
||||
MessageQueueId_t queueId = cookieInfo.pendingCommand->second.sendReplyTo;
|
||||
if (status == NO_REPLY_EXPECTED) {
|
||||
actionHelper.finish(true, queueId, cookieInfo.pendingCommand->first, RETURN_OK);
|
||||
actionHelper.finish(true, queueId, cookieInfo.pendingCommand->first, returnvalue::OK);
|
||||
} else {
|
||||
actionHelper.step(1, queueId, cookieInfo.pendingCommand->first, status);
|
||||
}
|
||||
@@ -635,7 +635,7 @@ void DeviceHandlerBase::replyToReply(const DeviceCommandId_t command, DeviceRepl
|
||||
DeviceCommandInfo* info = &replyInfo.command->second;
|
||||
if (info == nullptr) {
|
||||
printWarningOrError(sif::OutputTypes::OUT_ERROR, "replyToReply",
|
||||
HasReturnvaluesIF::RETURN_FAILED, "Command pointer not found");
|
||||
returnvalue::FAILED, "Command pointer not found");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -649,7 +649,7 @@ void DeviceHandlerBase::replyToReply(const DeviceCommandId_t command, DeviceRepl
|
||||
// Don't send any replies in that case.
|
||||
if (info->sendReplyTo != NO_COMMANDER) {
|
||||
bool success = false;
|
||||
if (status == HasReturnvaluesIF::RETURN_OK) {
|
||||
if (status == returnvalue::OK) {
|
||||
success = true;
|
||||
}
|
||||
actionHelper.finish(success, info->sendReplyTo, command, status);
|
||||
@@ -662,7 +662,7 @@ void DeviceHandlerBase::doSendWrite() {
|
||||
if (cookieInfo.state == COOKIE_WRITE_READY) {
|
||||
ReturnValue_t result = communicationInterface->sendMessage(comCookie, rawPacket, rawPacketLen);
|
||||
|
||||
if (result == RETURN_OK) {
|
||||
if (result == returnvalue::OK) {
|
||||
cookieInfo.state = COOKIE_WRITE_SENT;
|
||||
} else {
|
||||
// always generate a failure event, so that FDIR knows what's up
|
||||
@@ -680,7 +680,7 @@ void DeviceHandlerBase::doGetWrite() {
|
||||
}
|
||||
cookieInfo.state = COOKIE_UNUSED;
|
||||
ReturnValue_t result = communicationInterface->getSendSuccess(comCookie);
|
||||
if (result == RETURN_OK) {
|
||||
if (result == returnvalue::OK) {
|
||||
if (wiretappingMode == RAW) {
|
||||
replyRawData(rawPacket, rawPacketLen, requestedRawTraffic, true);
|
||||
}
|
||||
@@ -694,7 +694,7 @@ void DeviceHandlerBase::doGetWrite() {
|
||||
// always generate a failure event, so that FDIR knows what's up
|
||||
triggerEvent(DEVICE_SENDING_COMMAND_FAILED, result, cookieInfo.pendingCommand->first);
|
||||
}
|
||||
if (result != RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
cookieInfo.pendingCommand->second.isExecuting = false;
|
||||
}
|
||||
replyToCommand(result);
|
||||
@@ -704,7 +704,7 @@ void DeviceHandlerBase::doSendRead() {
|
||||
ReturnValue_t result;
|
||||
|
||||
result = doSendReadHook();
|
||||
if (result != RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -715,7 +715,7 @@ void DeviceHandlerBase::doSendRead() {
|
||||
|
||||
result = communicationInterface->requestReceiveMessage(comCookie, replyLen);
|
||||
|
||||
if (result == RETURN_OK) {
|
||||
if (result == returnvalue::OK) {
|
||||
cookieInfo.state = COOKIE_READ_SENT;
|
||||
} else {
|
||||
triggerEvent(DEVICE_REQUESTING_REPLY_FAILED, result);
|
||||
@@ -741,7 +741,7 @@ void DeviceHandlerBase::doGetRead() {
|
||||
ReturnValue_t result =
|
||||
communicationInterface->readReceivedMessage(comCookie, &receivedData, &receivedDataLen);
|
||||
|
||||
if (result != RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
triggerEvent(DEVICE_REQUESTING_REPLY_FAILED, result);
|
||||
// I think we can allow to ignore one missedReply.
|
||||
ignoreMissedRepliesCount++;
|
||||
@@ -764,7 +764,7 @@ void DeviceHandlerBase::doGetRead() {
|
||||
}
|
||||
|
||||
void DeviceHandlerBase::parseReply(const uint8_t* receivedData, size_t receivedDataLen) {
|
||||
ReturnValue_t result = HasReturnvaluesIF::RETURN_FAILED;
|
||||
ReturnValue_t result = returnvalue::FAILED;
|
||||
DeviceCommandId_t foundId = DeviceHandlerIF::NO_COMMAND_ID;
|
||||
size_t foundLen = 0;
|
||||
/* The loop may not execute more often than the number of received bytes
|
||||
@@ -773,7 +773,7 @@ void DeviceHandlerBase::parseReply(const uint8_t* receivedData, size_t receivedD
|
||||
for (uint32_t count = 0; count < receivedDataLen; count++) {
|
||||
result = scanForReply(receivedData, remainingLength, &foundId, &foundLen);
|
||||
switch (result) {
|
||||
case RETURN_OK:
|
||||
case returnvalue::OK:
|
||||
handleReply(receivedData, foundId, foundLen);
|
||||
if (foundLen == 0) {
|
||||
printWarningOrError(sif::OutputTypes::OUT_WARNING, "parseReply",
|
||||
@@ -783,7 +783,7 @@ void DeviceHandlerBase::parseReply(const uint8_t* receivedData, size_t receivedD
|
||||
break;
|
||||
case APERIODIC_REPLY: {
|
||||
result = interpretDeviceReply(foundId, receivedData);
|
||||
if (result != RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
replyRawReplyIfnotWiretapped(receivedData, foundLen);
|
||||
triggerEvent(DEVICE_INTERPRETING_REPLY_FAILED, result, foundId);
|
||||
}
|
||||
@@ -846,7 +846,7 @@ void DeviceHandlerBase::handleReply(const uint8_t* receivedData, DeviceCommandId
|
||||
resetDelayCyclesControlledReply(info);
|
||||
}
|
||||
|
||||
if (result != RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
// Report failed interpretation to FDIR.
|
||||
replyRawReplyIfnotWiretapped(receivedData, foundLen);
|
||||
triggerEvent(DEVICE_INTERPRETING_REPLY_FAILED, result, foundId);
|
||||
@@ -887,12 +887,12 @@ ReturnValue_t DeviceHandlerBase::getStorageData(store_address_t storageAddress,
|
||||
if (IPCStore == nullptr) {
|
||||
*data = nullptr;
|
||||
*len = 0;
|
||||
return RETURN_FAILED;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
ReturnValue_t result = IPCStore->modifyData(storageAddress, data, &lenTmp);
|
||||
if (result == RETURN_OK) {
|
||||
if (result == returnvalue::OK) {
|
||||
*len = lenTmp;
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
} else {
|
||||
triggerEvent(StorageManagerIF::GET_DATA_FAILED, result, storageAddress.raw);
|
||||
*data = nullptr;
|
||||
@@ -909,7 +909,7 @@ void DeviceHandlerBase::replyRawData(const uint8_t* data, size_t len, MessageQue
|
||||
store_address_t address;
|
||||
ReturnValue_t result = IPCStore->addData(&address, data, len);
|
||||
|
||||
if (result != RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
triggerEvent(StorageManagerIF::STORE_DATA_FAILED, result);
|
||||
return;
|
||||
}
|
||||
@@ -921,7 +921,7 @@ void DeviceHandlerBase::replyRawData(const uint8_t* data, size_t len, MessageQue
|
||||
|
||||
result = commandQueue->sendMessage(sendTo, &command);
|
||||
|
||||
if (result != RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
IPCStore->deleteData(address);
|
||||
// Silently discard data, this indicates heavy TM traffic which
|
||||
// should not be increased by additional events.
|
||||
@@ -957,7 +957,7 @@ MessageQueueId_t DeviceHandlerBase::getCommandQueue() const { return commandQueu
|
||||
void DeviceHandlerBase::buildRawDeviceCommand(CommandMessage* commandMessage) {
|
||||
storedRawData = DeviceHandlerMessage::getStoreAddress(commandMessage);
|
||||
ReturnValue_t result = getStorageData(storedRawData, &rawPacket, &rawPacketLen);
|
||||
if (result != RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
replyReturnvalueToCommand(result, RAW_COMMAND_ID);
|
||||
storedRawData.raw = StorageManagerIF::INVALID_ADDRESS;
|
||||
} else {
|
||||
@@ -974,7 +974,7 @@ void DeviceHandlerBase::commandSwitch(ReturnValue_t onOff) {
|
||||
const uint8_t* switches;
|
||||
uint8_t numberOfSwitches = 0;
|
||||
ReturnValue_t result = getSwitches(&switches, &numberOfSwitches);
|
||||
if (result == RETURN_OK) {
|
||||
if (result == returnvalue::OK) {
|
||||
while (numberOfSwitches > 0) {
|
||||
powerSwitcher->sendSwitchCommand(switches[numberOfSwitches - 1], onOff);
|
||||
numberOfSwitches--;
|
||||
@@ -982,7 +982,7 @@ void DeviceHandlerBase::commandSwitch(ReturnValue_t onOff) {
|
||||
}
|
||||
}
|
||||
|
||||
ReturnValue_t DeviceHandlerBase::doSendReadHook() { return RETURN_OK; }
|
||||
ReturnValue_t DeviceHandlerBase::doSendReadHook() { return returnvalue::OK; }
|
||||
|
||||
ReturnValue_t DeviceHandlerBase::getSwitches(const uint8_t** switches, uint8_t* numberOfSwitches) {
|
||||
return DeviceHandlerBase::NO_SWITCH;
|
||||
@@ -1011,7 +1011,7 @@ ReturnValue_t DeviceHandlerBase::enableReplyInReplyMap(DeviceCommandMap::iterato
|
||||
info->countdown->resetTimer();
|
||||
}
|
||||
info->active = true;
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
} else {
|
||||
return NO_REPLY_EXPECTED;
|
||||
}
|
||||
@@ -1029,7 +1029,7 @@ ReturnValue_t DeviceHandlerBase::getStateOfSwitches(void) {
|
||||
const uint8_t* switches;
|
||||
|
||||
ReturnValue_t result = getSwitches(&switches, &numberOfSwitches);
|
||||
if ((result == RETURN_OK) && (numberOfSwitches != 0)) {
|
||||
if ((result == returnvalue::OK) && (numberOfSwitches != 0)) {
|
||||
while (numberOfSwitches > 0) {
|
||||
if (powerSwitcher->getSwitchState(switches[numberOfSwitches - 1]) ==
|
||||
PowerSwitchIF::SWITCH_OFF) {
|
||||
@@ -1074,7 +1074,7 @@ ReturnValue_t DeviceHandlerBase::checkModeCommand(Mode_t commandedMode, Submode_
|
||||
|
||||
if ((commandedMode == MODE_ON) && (mode == MODE_OFF) and (thermalSet != nullptr)) {
|
||||
ReturnValue_t result = thermalSet->read();
|
||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result == returnvalue::OK) {
|
||||
if ((thermalSet->heaterRequest.value != ThermalComponentIF::STATE_REQUEST_IGNORE) and
|
||||
(not ThermalComponentIF::isOperational(thermalSet->thermalState.value))) {
|
||||
triggerEvent(ThermalComponentIF::TEMP_NOT_IN_OP_RANGE, thermalSet->thermalState.value);
|
||||
@@ -1134,7 +1134,7 @@ void DeviceHandlerBase::handleTransitionToOnMode(Mode_t commandedMode, Submode_t
|
||||
triggerEvent(CHANGING_MODE, commandedMode, commandedSubmode);
|
||||
if (thermalSet != nullptr) {
|
||||
ReturnValue_t result = thermalSet->read();
|
||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result == returnvalue::OK) {
|
||||
if (thermalSet->heaterRequest != ThermalComponentIF::STATE_REQUEST_IGNORE) {
|
||||
thermalSet->heaterRequest = ThermalComponentIF::STATE_REQUEST_OPERATIONAL;
|
||||
thermalSet->commit();
|
||||
@@ -1169,7 +1169,7 @@ HasHealthIF::HealthState DeviceHandlerBase::getHealth() { return healthHelper.ge
|
||||
|
||||
ReturnValue_t DeviceHandlerBase::setHealth(HealthState health) {
|
||||
healthHelper.setHealth(health);
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
void DeviceHandlerBase::checkSwitchState() {
|
||||
@@ -1191,7 +1191,7 @@ ReturnValue_t DeviceHandlerBase::acceptExternalDeviceCommands() {
|
||||
if ((mode != MODE_ON) && (mode != MODE_NORMAL)) {
|
||||
return WRONG_MODE_FOR_COMMAND;
|
||||
}
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
void DeviceHandlerBase::replyRawReplyIfnotWiretapped(const uint8_t* data, size_t len) {
|
||||
@@ -1220,10 +1220,10 @@ ReturnValue_t DeviceHandlerBase::handleDeviceHandlerMessage(CommandMessage* mess
|
||||
default:
|
||||
replyReturnvalueToCommand(INVALID_COMMAND_PARAMETER);
|
||||
wiretappingMode = OFF;
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
replyReturnvalueToCommand(RETURN_OK);
|
||||
return RETURN_OK;
|
||||
replyReturnvalueToCommand(returnvalue::OK);
|
||||
return returnvalue::OK;
|
||||
case DeviceHandlerMessage::CMD_RAW:
|
||||
if ((mode != MODE_RAW)) {
|
||||
DeviceHandlerMessage::clear(message);
|
||||
@@ -1231,9 +1231,9 @@ ReturnValue_t DeviceHandlerBase::handleDeviceHandlerMessage(CommandMessage* mess
|
||||
} else {
|
||||
buildRawDeviceCommand(message);
|
||||
}
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
default:
|
||||
return RETURN_FAILED;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1254,7 +1254,7 @@ bool DeviceHandlerBase::isAwaitingReply() {
|
||||
}
|
||||
|
||||
ReturnValue_t DeviceHandlerBase::letChildHandleMessage(CommandMessage* message) {
|
||||
return RETURN_FAILED;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
|
||||
void DeviceHandlerBase::handleDeviceTM(SerializeIF* dataSet, DeviceCommandId_t replyId,
|
||||
@@ -1316,7 +1316,7 @@ void DeviceHandlerBase::handleDeviceTM(SerializeIF* dataSet, DeviceCommandId_t r
|
||||
ReturnValue_t DeviceHandlerBase::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
|
||||
const uint8_t* data, size_t size) {
|
||||
ReturnValue_t result = acceptExternalDeviceCommands();
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
DeviceCommandMap::iterator iter = deviceCommandMap.find(actionId);
|
||||
@@ -1327,7 +1327,7 @@ ReturnValue_t DeviceHandlerBase::executeAction(ActionId_t actionId, MessageQueue
|
||||
} else {
|
||||
result = buildCommandFromCommand(actionId, data, size);
|
||||
}
|
||||
if (result == RETURN_OK) {
|
||||
if (result == returnvalue::OK) {
|
||||
iter->second.sendReplyTo = commandedBy;
|
||||
iter->second.isExecuting = true;
|
||||
cookieInfo.pendingCommand = iter;
|
||||
@@ -1345,7 +1345,7 @@ void DeviceHandlerBase::buildInternalCommand(void) {
|
||||
if (result == BUSY) {
|
||||
/* So we can track misconfigurations */
|
||||
printWarningOrError(sif::OutputTypes::OUT_WARNING, "buildInternalCommand",
|
||||
HasReturnvaluesIF::RETURN_FAILED, "Busy.");
|
||||
returnvalue::FAILED, "Busy.");
|
||||
/* No need to report this */
|
||||
result = NOTHING_TO_SEND;
|
||||
}
|
||||
@@ -1361,7 +1361,7 @@ void DeviceHandlerBase::buildInternalCommand(void) {
|
||||
if (result == NOTHING_TO_SEND) {
|
||||
return;
|
||||
}
|
||||
if (result == RETURN_OK) {
|
||||
if (result == returnvalue::OK) {
|
||||
DeviceCommandMap::iterator iter = deviceCommandMap.find(deviceCommandId);
|
||||
if (iter == deviceCommandMap.end()) {
|
||||
#if FSFW_VERBOSE_LEVEL >= 1
|
||||
@@ -1378,7 +1378,7 @@ void DeviceHandlerBase::buildInternalCommand(void) {
|
||||
sprintf(output, "Command 0x%08x is executing", static_cast<unsigned int>(deviceCommandId));
|
||||
// so we can track misconfigurations
|
||||
printWarningOrError(sif::OutputTypes::OUT_WARNING, "buildInternalCommand",
|
||||
HasReturnvaluesIF::RETURN_FAILED, output);
|
||||
returnvalue::FAILED, output);
|
||||
#endif
|
||||
// this is an internal command, no need to report a failure here,
|
||||
// missed reply will track if a reply is too late, otherwise, it's ok
|
||||
@@ -1390,7 +1390,7 @@ void DeviceHandlerBase::buildInternalCommand(void) {
|
||||
cookieInfo.state = COOKIE_WRITE_READY;
|
||||
}
|
||||
}
|
||||
if (result != RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
triggerEvent(DEVICE_BUILDING_COMMAND_FAILED, result, deviceCommandId);
|
||||
}
|
||||
}
|
||||
@@ -1466,7 +1466,7 @@ ReturnValue_t DeviceHandlerBase::initializeLocalDataPool(localpool::DataPool& lo
|
||||
localDataPoolMap.emplace(thermalSet->heaterRequestPoolId,
|
||||
new PoolEntry<DeviceHandlerIF::dh_heater_request_t>);
|
||||
}
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t DeviceHandlerBase::initializeAfterTaskCreation() {
|
||||
@@ -1480,7 +1480,7 @@ ReturnValue_t DeviceHandlerBase::initializeAfterTaskCreation() {
|
||||
if (setStartupImmediately) {
|
||||
startTransition(MODE_ON, SUBMODE_NONE);
|
||||
}
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
LocalPoolDataSetBase* DeviceHandlerBase::getDataSetHandle(sid_t sid) {
|
||||
@@ -1518,7 +1518,7 @@ void DeviceHandlerBase::printWarningOrError(sif::OutputTypes errorType, const ch
|
||||
if (errorPrint == nullptr) {
|
||||
if (errorCode == ObjectManagerIF::CHILD_INIT_FAILED) {
|
||||
errorPrint = "Initialization error";
|
||||
} else if (errorCode == HasReturnvaluesIF::RETURN_FAILED) {
|
||||
} else if (errorCode == returnvalue::FAILED) {
|
||||
if (errorType == sif::OutputTypes::OUT_WARNING) {
|
||||
errorPrint = "Generic Warning";
|
||||
} else {
|
||||
|
@@ -78,7 +78,6 @@ class StorageManagerIF;
|
||||
* @ingroup devices
|
||||
*/
|
||||
class DeviceHandlerBase : public DeviceHandlerIF,
|
||||
public HasReturnvaluesIF,
|
||||
public ExecutableObjectIF,
|
||||
public SystemObject,
|
||||
public HasModesIF,
|
||||
@@ -359,7 +358,7 @@ class DeviceHandlerBase : public DeviceHandlerIF,
|
||||
* buffer is scanned at previous position + foundLen.
|
||||
* @return
|
||||
* - @c RETURN_OK a valid packet was found at @c start, @c foundLen is valid
|
||||
* - @c RETURN_FAILED no reply could be found starting at @c start,
|
||||
* - @c returnvalue::FAILED no reply could be found starting at @c start,
|
||||
* implies @c foundLen is not valid, base class will call scanForReply()
|
||||
* again with ++start
|
||||
* - @c DeviceHandlerIF::INVALID_DATA a packet was found but it is invalid,
|
||||
@@ -391,7 +390,7 @@ class DeviceHandlerBase : public DeviceHandlerIF,
|
||||
* - @c RETURN_OK when the reply was interpreted.
|
||||
* - @c IGNORE_REPLY_DATA Ignore the reply and don't reset reply cycle
|
||||
* counter.
|
||||
* - @c RETURN_FAILED when the reply could not be interpreted,
|
||||
* - @c returnvalue::FAILED when the reply could not be interpreted,
|
||||
* e.g. logical errors or range violations occurred
|
||||
*/
|
||||
virtual ReturnValue_t interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) = 0;
|
||||
@@ -452,7 +451,7 @@ class DeviceHandlerBase : public DeviceHandlerIF,
|
||||
* to provide a pointer to a Countdown object which will signal the timeout
|
||||
* when expired
|
||||
* @return - @c RETURN_OK when the command was successfully inserted,
|
||||
* - @c RETURN_FAILED else.
|
||||
* - @c returnvalue::FAILED else.
|
||||
*/
|
||||
ReturnValue_t insertInCommandAndReplyMap(DeviceCommandId_t deviceCommand, uint16_t maxDelayCycles,
|
||||
LocalPoolDataSetBase *replyDataSet = nullptr,
|
||||
@@ -473,7 +472,7 @@ class DeviceHandlerBase : public DeviceHandlerIF,
|
||||
* to provide a pointer to a Countdown object which will signal the timeout
|
||||
* when expired
|
||||
* @return - @c RETURN_OK when the command was successfully inserted,
|
||||
* - @c RETURN_FAILED else.
|
||||
* - @c returnvalue::FAILED else.
|
||||
*/
|
||||
ReturnValue_t insertInReplyMap(DeviceCommandId_t deviceCommand, uint16_t maxDelayCycles,
|
||||
LocalPoolDataSetBase *dataSet = nullptr, size_t replyLen = 0,
|
||||
@@ -483,7 +482,7 @@ class DeviceHandlerBase : public DeviceHandlerIF,
|
||||
* @brief A simple command to add a command to the commandList.
|
||||
* @param deviceCommand The command to add
|
||||
* @return - @c RETURN_OK when the command was successfully inserted,
|
||||
* - @c RETURN_FAILED else.
|
||||
* - @c returnvalue::FAILED else.
|
||||
*/
|
||||
ReturnValue_t insertInCommandMap(DeviceCommandId_t deviceCommand,
|
||||
bool useAlternativeReply = false,
|
||||
@@ -520,7 +519,7 @@ class DeviceHandlerBase : public DeviceHandlerIF,
|
||||
* by the device repeatedly without request) or not. Default is aperiodic (0).
|
||||
* Warning: The setting always overrides the value that was entered in the map.
|
||||
* @return - @c RETURN_OK when the command was successfully inserted,
|
||||
* - @c RETURN_FAILED else.
|
||||
* - @c returnvalue::FAILED else.
|
||||
*/
|
||||
ReturnValue_t updateReplyMapEntry(DeviceCommandId_t deviceReply, uint16_t delayCycles,
|
||||
uint16_t maxDelayCycles, bool periodic = false);
|
||||
@@ -604,7 +603,7 @@ class DeviceHandlerBase : public DeviceHandlerIF,
|
||||
* @param submode
|
||||
* @return
|
||||
* - @c RETURN_OK if valid
|
||||
* - @c RETURN_FAILED if invalid
|
||||
* - @c returnvalue::FAILED if invalid
|
||||
*/
|
||||
virtual ReturnValue_t isModeCombinationValid(Mode_t mode, Submode_t submode);
|
||||
/**
|
||||
@@ -624,7 +623,7 @@ class DeviceHandlerBase : public DeviceHandlerIF,
|
||||
* @param[out] numberOfSwitches length of returned array
|
||||
* @return
|
||||
* - @c RETURN_OK if the parameters were set
|
||||
* - @c RETURN_FAILED if no switches exist
|
||||
* - @c returnvalue::FAILED if no switches exist
|
||||
*/
|
||||
virtual ReturnValue_t getSwitches(const uint8_t **switches, uint8_t *numberOfSwitches);
|
||||
|
||||
@@ -1033,7 +1032,7 @@ class DeviceHandlerBase : public DeviceHandlerIF,
|
||||
* by #switches are on
|
||||
* - @c PowerSwitchIF::SWITCH_OFF one of the switches specified by
|
||||
* #switches are off
|
||||
* - @c PowerSwitchIF::RETURN_FAILED if an error occured
|
||||
* - @c PowerSwitchIF::returnvalue::FAILED if an error occured
|
||||
*/
|
||||
ReturnValue_t getStateOfSwitches();
|
||||
|
||||
@@ -1275,7 +1274,7 @@ class DeviceHandlerBase : public DeviceHandlerIF,
|
||||
* @param[out] len
|
||||
* @return
|
||||
* - @c RETURN_OK @c data is valid
|
||||
* - @c RETURN_FAILED IPCStore is nullptr
|
||||
* - @c returnvalue::FAILED IPCStore is nullptr
|
||||
* - the return value from the IPCStore if it was not @c RETURN_OK
|
||||
*/
|
||||
ReturnValue_t getStorageData(store_address_t storageAddress, uint8_t **data, size_t *len);
|
||||
@@ -1306,7 +1305,7 @@ class DeviceHandlerBase : public DeviceHandlerIF,
|
||||
* @param errorPrint
|
||||
*/
|
||||
void printWarningOrError(sif::OutputTypes errorType, const char *functionName,
|
||||
ReturnValue_t errorCode = HasReturnvaluesIF::RETURN_FAILED,
|
||||
ReturnValue_t errorCode = returnvalue::FAILED,
|
||||
const char *errorPrint = nullptr);
|
||||
};
|
||||
|
||||
|
@@ -23,9 +23,9 @@ DeviceHandlerFailureIsolation::~DeviceHandlerFailureIsolation() {}
|
||||
|
||||
ReturnValue_t DeviceHandlerFailureIsolation::eventReceived(EventMessage* event) {
|
||||
if (isFdirInActionOrAreWeFaulty(event)) {
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
ReturnValue_t result = RETURN_FAILED;
|
||||
ReturnValue_t result = returnvalue::FAILED;
|
||||
switch (event->getEvent()) {
|
||||
case HasModesIF::MODE_TRANSITION_FAILED:
|
||||
case HasModesIF::OBJECT_IN_INVALID_MODE:
|
||||
@@ -48,7 +48,7 @@ ReturnValue_t DeviceHandlerFailureIsolation::eventReceived(EventMessage* event)
|
||||
// The two above should never be confirmed.
|
||||
case DeviceHandlerIF::DEVICE_MISSED_REPLY:
|
||||
result = sendConfirmationRequest(event);
|
||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result == returnvalue::OK) {
|
||||
break;
|
||||
}
|
||||
// else
|
||||
@@ -72,7 +72,7 @@ ReturnValue_t DeviceHandlerFailureIsolation::eventReceived(EventMessage* event)
|
||||
case PowerSwitchIF::SWITCH_WENT_OFF:
|
||||
if (powerConfirmation != MessageQueueIF::NO_QUEUE) {
|
||||
result = sendConfirmationRequest(event, powerConfirmation);
|
||||
if (result == RETURN_OK) {
|
||||
if (result == returnvalue::OK) {
|
||||
setFdirState(DEVICE_MIGHT_BE_OFF);
|
||||
}
|
||||
}
|
||||
@@ -106,9 +106,9 @@ ReturnValue_t DeviceHandlerFailureIsolation::eventReceived(EventMessage* event)
|
||||
// break;
|
||||
default:
|
||||
// We don't know the event, someone else should handle it.
|
||||
return RETURN_FAILED;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
void DeviceHandlerFailureIsolation::eventConfirmed(EventMessage* event) {
|
||||
@@ -162,7 +162,7 @@ void DeviceHandlerFailureIsolation::clearFaultCounters() {
|
||||
|
||||
ReturnValue_t DeviceHandlerFailureIsolation::initialize() {
|
||||
ReturnValue_t result = FailureIsolationBase::initialize();
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "DeviceHandlerFailureIsolation::initialize: Could not"
|
||||
" initialize FailureIsolationBase."
|
||||
@@ -176,7 +176,7 @@ ReturnValue_t DeviceHandlerFailureIsolation::initialize() {
|
||||
powerConfirmation = power->getEventReceptionQueue();
|
||||
}
|
||||
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
void DeviceHandlerFailureIsolation::setFdirState(FDIRState state) {
|
||||
|
@@ -12,11 +12,11 @@ ReturnValue_t DeviceTmReportingWrapper::serialize(uint8_t** buffer, size_t* size
|
||||
Endianness streamEndianness) const {
|
||||
ReturnValue_t result =
|
||||
SerializeAdapter::serialize(&objectId, buffer, size, maxSize, streamEndianness);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
result = SerializeAdapter::serialize(&actionId, buffer, size, maxSize, streamEndianness);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
return data->serialize(buffer, size, maxSize, streamEndianness);
|
||||
@@ -29,11 +29,11 @@ size_t DeviceTmReportingWrapper::getSerializedSize() const {
|
||||
ReturnValue_t DeviceTmReportingWrapper::deSerialize(const uint8_t** buffer, size_t* size,
|
||||
Endianness streamEndianness) {
|
||||
ReturnValue_t result = SerializeAdapter::deSerialize(&objectId, buffer, size, streamEndianness);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
result = SerializeAdapter::deSerialize(&actionId, buffer, size, streamEndianness);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
return data->deSerialize(buffer, size, streamEndianness);
|
||||
|
@@ -16,7 +16,7 @@ HealthDevice::~HealthDevice() { QueueFactory::instance()->deleteMessageQueue(com
|
||||
ReturnValue_t HealthDevice::performOperation(uint8_t opCode) {
|
||||
CommandMessage command;
|
||||
ReturnValue_t result = commandQueue->receiveMessage(&command);
|
||||
if (result == HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result == returnvalue::OK) {
|
||||
result = healthHelper.handleHealthCommand(&command);
|
||||
}
|
||||
return result;
|
||||
@@ -24,7 +24,7 @@ ReturnValue_t HealthDevice::performOperation(uint8_t opCode) {
|
||||
|
||||
ReturnValue_t HealthDevice::initialize() {
|
||||
ReturnValue_t result = SystemObject::initialize();
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
if (parentQueue != 0) {
|
||||
@@ -50,7 +50,7 @@ bool HealthDevice::hasHealthChanged() {
|
||||
|
||||
ReturnValue_t HealthDevice::setHealth(HealthState health) {
|
||||
healthHelper.setHealth(health);
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
HasHealthIF::HealthState HealthDevice::getHealth() { return healthHelper.getHealth(); }
|
||||
|
Reference in New Issue
Block a user