removed BusCommand::getCommandStr() and getResultStr()
This commit is contained in:
+3
-3
@@ -159,7 +159,7 @@ std::string BaseLoop::decodeMessage(const std::string& data)
|
|||||||
|
|
||||||
if (!busCommand->isErrorResult()) {
|
if (!busCommand->isErrorResult()) {
|
||||||
// decode data
|
// decode data
|
||||||
Command* command = new Command(index, (*m_commands)[index], busCommand->getResultStr()); // TODO use getResult()
|
Command* command = new Command(index, (*m_commands)[index], busCommand->getMessageStr()); // TODO use getCommand()+getResult()
|
||||||
|
|
||||||
// return result
|
// return result
|
||||||
result << command->calcResult(cmd);
|
result << command->calcResult(cmd);
|
||||||
@@ -214,7 +214,7 @@ std::string BaseLoop::decodeMessage(const std::string& data)
|
|||||||
// decode result
|
// decode result
|
||||||
if (busCommand->getType()==broadcast)
|
if (busCommand->getType()==broadcast)
|
||||||
result << "done";
|
result << "done";
|
||||||
else if (busCommand->getResultStr().substr(busCommand->getResultStr().length()-8) == "00000000") // TODO use getResult()
|
else if (busCommand->getMessageStr().substr(busCommand->getMessageStr().length()-8) == "00000000") // TODO use getResult()
|
||||||
result << "done";
|
result << "done";
|
||||||
else
|
else
|
||||||
result << "error";
|
result << "error";
|
||||||
@@ -283,7 +283,7 @@ std::string BaseLoop::decodeMessage(const std::string& data)
|
|||||||
L.log(bas, error, " %s", busCommand->getResultCodeCStr());
|
L.log(bas, error, " %s", busCommand->getResultCodeCStr());
|
||||||
result << busCommand->getResultCodeCStr();
|
result << busCommand->getResultCodeCStr();
|
||||||
} else {
|
} else {
|
||||||
result << busCommand->getResultStr(); // TODO use getResult()
|
result << busCommand->getMessageStr(); // TODO use getCommand()+getResult()
|
||||||
}
|
}
|
||||||
|
|
||||||
delete busCommand;
|
delete busCommand;
|
||||||
|
|||||||
+3
-3
@@ -115,7 +115,7 @@ void* EBusLoop::run()
|
|||||||
// add new bus command to send
|
// add new bus command to send
|
||||||
if (busResult == RESULT_SYN && busCommandActive == false && m_sendBuffer.size() != 0) {
|
if (busResult == RESULT_SYN && busCommandActive == false && m_sendBuffer.size() != 0) {
|
||||||
BusCommand* busCommand = m_sendBuffer.remove();
|
BusCommand* busCommand = m_sendBuffer.remove();
|
||||||
L.log(bus, debug, " msg: %s", busCommand->getCommandStr().c_str());
|
L.log(bus, debug, " msg: %s", busCommand->getCommand().getDataStr(true).c_str());
|
||||||
m_bus->addCommand(busCommand);
|
m_bus->addCommand(busCommand);
|
||||||
L.log(bus, debug, " addCommand success");
|
L.log(bus, debug, " addCommand success");
|
||||||
busCommandActive = true;
|
busCommandActive = true;
|
||||||
@@ -167,7 +167,7 @@ void* EBusLoop::run()
|
|||||||
lookbusretries = 0;
|
lookbusretries = 0;
|
||||||
m_bus->sendCommand();
|
m_bus->sendCommand();
|
||||||
BusCommand* busCommand = m_bus->recvCommand();
|
BusCommand* busCommand = m_bus->recvCommand();
|
||||||
L.log(bus, trace, " %s", busCommand->getResultStr().c_str());
|
L.log(bus, trace, " %s", busCommand->getMessageStr().c_str());
|
||||||
|
|
||||||
if (busCommand->isErrorResult() == true && retries < m_retries) {
|
if (busCommand->isErrorResult() == true && retries < m_retries) {
|
||||||
retries++;
|
retries++;
|
||||||
@@ -179,7 +179,7 @@ void* EBusLoop::run()
|
|||||||
if (pollCommandActive == true) {
|
if (pollCommandActive == true) {
|
||||||
// only save correct results
|
// only save correct results
|
||||||
if (busCommand->isErrorResult() == false)
|
if (busCommand->isErrorResult() == false)
|
||||||
m_commands->storePolData(busCommand->getResultStr().c_str()); // TODO use getResult()
|
m_commands->storePolData(busCommand->getMessageStr().c_str()); // TODO use getResult()
|
||||||
|
|
||||||
delete busCommand;
|
delete busCommand;
|
||||||
pollCommandActive = false;
|
pollCommandActive = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user