removed BusCommand::getCommandStr() and getResultStr()

This commit is contained in:
john30
2014-10-21 09:23:38 +02:00
parent b47d3f5f3b
commit dcbe8e6157
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -159,7 +159,7 @@ std::string BaseLoop::decodeMessage(const std::string& data)
if (!busCommand->isErrorResult()) {
// 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
result << command->calcResult(cmd);
@@ -214,7 +214,7 @@ std::string BaseLoop::decodeMessage(const std::string& data)
// decode result
if (busCommand->getType()==broadcast)
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";
else
result << "error";
@@ -283,7 +283,7 @@ std::string BaseLoop::decodeMessage(const std::string& data)
L.log(bas, error, " %s", busCommand->getResultCodeCStr());
result << busCommand->getResultCodeCStr();
} else {
result << busCommand->getResultStr(); // TODO use getResult()
result << busCommand->getMessageStr(); // TODO use getCommand()+getResult()
}
delete busCommand;
+3 -3
View File
@@ -115,7 +115,7 @@ void* EBusLoop::run()
// add new bus command to send
if (busResult == RESULT_SYN && busCommandActive == false && m_sendBuffer.size() != 0) {
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);
L.log(bus, debug, " addCommand success");
busCommandActive = true;
@@ -167,7 +167,7 @@ void* EBusLoop::run()
lookbusretries = 0;
m_bus->sendCommand();
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) {
retries++;
@@ -179,7 +179,7 @@ void* EBusLoop::run()
if (pollCommandActive == true) {
// only save correct results
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;
pollCommandActive = false;