retval replacements
This commit is contained in:
@ -11,6 +11,7 @@
|
||||
#include "mission/devices/devicedefinitions/ScexDefinitions.h"
|
||||
|
||||
using std::ofstream;
|
||||
using namespace returnvalue;
|
||||
|
||||
ScexDeviceHandler::ScexDeviceHandler(object_id_t objectId, ScexUartReader& reader, CookieIF* cookie,
|
||||
SdCardMountedIF* sdcMan)
|
||||
@ -26,11 +27,11 @@ void ScexDeviceHandler::doStartUp() {
|
||||
void ScexDeviceHandler::doShutDown() { setMode(_MODE_POWER_DOWN); }
|
||||
|
||||
ReturnValue_t ScexDeviceHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) {
|
||||
return RETURN_OK;
|
||||
return OK;
|
||||
}
|
||||
|
||||
ReturnValue_t ScexDeviceHandler::buildTransitionDeviceCommand(DeviceCommandId_t* id) {
|
||||
return RETURN_OK;
|
||||
return OK;
|
||||
}
|
||||
|
||||
ReturnValue_t ScexDeviceHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
||||
@ -113,7 +114,7 @@ ReturnValue_t ScexDeviceHandler::buildCommandFromCommand(DeviceCommandId_t devic
|
||||
}
|
||||
commandActive = true;
|
||||
rawPacket = cmdBuf.data();
|
||||
return RETURN_OK;
|
||||
return OK;
|
||||
}
|
||||
|
||||
void ScexDeviceHandler::fillCommandAndReplyMap() {
|
||||
@ -144,14 +145,14 @@ ReturnValue_t ScexDeviceHandler::scanForReply(const uint8_t* start, size_t remai
|
||||
*foundId = helper.getCmd();
|
||||
*foundLen = remainingSize;
|
||||
|
||||
return RETURN_OK;
|
||||
return OK;
|
||||
}
|
||||
|
||||
ReturnValue_t ScexDeviceHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) {
|
||||
// cmd auswertung (in file reinschreiben)
|
||||
using namespace scex;
|
||||
|
||||
ReturnValue_t status = RETURN_OK;
|
||||
ReturnValue_t status = OK;
|
||||
auto oneFileHandler = [&](std::string cmdName) {
|
||||
fileId = random_string(6);
|
||||
std::ostringstream oss("/tmp/scex-", std::ostringstream::ate);
|
||||
@ -162,12 +163,12 @@ ReturnValue_t ScexDeviceHandler::interpretDeviceReply(DeviceCommandId_t id, cons
|
||||
if (out.bad()) {
|
||||
sif::error << "ScexDeviceHandler::interpretDeviceReply: Could not open file " << fileName
|
||||
<< std::endl;
|
||||
return RETURN_FAILED;
|
||||
return FAILED;
|
||||
}
|
||||
if (debugMode) {
|
||||
out << helper;
|
||||
}
|
||||
return RETURN_OK;
|
||||
return OK;
|
||||
};
|
||||
auto multiFileHandler = [&](std::string cmdName) {
|
||||
if ((helper.getPacketCounter() == 1) or (not fileNameSet)) {
|
||||
@ -181,7 +182,7 @@ ReturnValue_t ScexDeviceHandler::interpretDeviceReply(DeviceCommandId_t id, cons
|
||||
if (out.bad()) {
|
||||
sif::error << "ScexDeviceHandler::interpretDeviceReply: Could not open file " << fileName
|
||||
<< std::endl;
|
||||
return RETURN_FAILED;
|
||||
return FAILED;
|
||||
}
|
||||
} else {
|
||||
ofstream out(fileName,
|
||||
@ -191,7 +192,7 @@ ReturnValue_t ScexDeviceHandler::interpretDeviceReply(DeviceCommandId_t id, cons
|
||||
}
|
||||
}
|
||||
|
||||
return RETURN_OK;
|
||||
return OK;
|
||||
};
|
||||
switch (id) {
|
||||
case (PING): {
|
||||
@ -249,16 +250,16 @@ void ScexDeviceHandler::performOperationHook() {
|
||||
}
|
||||
|
||||
uint32_t ScexDeviceHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) {
|
||||
return RETURN_OK;
|
||||
return OK;
|
||||
}
|
||||
|
||||
ReturnValue_t ScexDeviceHandler::getSwitches(const uint8_t** switches, uint8_t* numberOfSwitches) {
|
||||
return RETURN_OK;
|
||||
return OK;
|
||||
}
|
||||
|
||||
ReturnValue_t ScexDeviceHandler::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||
LocalDataPoolManager& poolManager) {
|
||||
return RETURN_OK;
|
||||
return OK;
|
||||
}
|
||||
|
||||
std::string ScexDeviceHandler::random_string(std::string::size_type length) {
|
||||
|
Reference in New Issue
Block a user