class WQueue: method 'T remove(const long delay)' removed.

This commit is contained in:
Roland Jax
2014-06-21 15:34:18 +02:00
parent 081f1eefe7
commit da2d943fce
3 changed files with 25 additions and 72 deletions
+24 -40
View File
@@ -96,27 +96,22 @@ std::string BaseLoop::decodeMessage(const std::string& data)
m_ebusloop->addBusCommand(new BusCommand(type, ebusCommand));
BusCommand* busCommand = m_ebusloop->getBusCommand();
if (busCommand != NULL) {
if (busCommand->getResult().c_str()[0] != '-') {
// decode data
Command* command = new Command(index, (*m_commands)[index], busCommand->getResult());
if (busCommand->getResult().c_str()[0] != '-') {
// decode data
Command* command = new Command(index, (*m_commands)[index], busCommand->getResult());
// return result
result << command->calcResult(cmd);
// return result
result << command->calcResult(cmd);
delete command;
} else {
L.log(bas, error, " %s", busCommand->getResult().c_str());
result << busCommand->getResult();
}
delete busCommand;
delete command;
} else {
L.log(bas, error, " -7: receive timeout");
result << "-7: receive timeout";
L.log(bas, error, " %s", busCommand->getResult().c_str());
result << busCommand->getResult();
}
delete busCommand;
} else {
result << "ebus command not found";
}
@@ -155,25 +150,19 @@ std::string BaseLoop::decodeMessage(const std::string& data)
m_ebusloop->addBusCommand(new BusCommand(type, ebusCommand));
BusCommand* busCommand = m_ebusloop->getBusCommand();
if (busCommand != NULL) {
if (busCommand->getResult().c_str()[0] != '-') {
// decode result
if (busCommand->getResult().substr(busCommand->getResult().length()-8) == "00000000")
result << "done";
else
result << "error";
if (busCommand->getResult().c_str()[0] != '-') {
// decode result
if (busCommand->getResult().substr(busCommand->getResult().length()-8) == "00000000")
result << "done";
else
result << "error";
} else {
L.log(bas, error, " %s", busCommand->getResult().c_str());
result << busCommand->getResult();
}
delete busCommand;
} else {
L.log(bas, error, " -7: receive timeout");
result << "-7: receive timeout";
L.log(bas, error, " %s", busCommand->getResult().c_str());
result << busCommand->getResult();
}
delete busCommand;
delete command;
} else {
@@ -231,17 +220,12 @@ std::string BaseLoop::decodeMessage(const std::string& data)
m_ebusloop->addBusCommand(new BusCommand(type, ebusCommand));
BusCommand* busCommand = m_ebusloop->getBusCommand();
if (busCommand != NULL) {
if (busCommand->getResult().c_str()[0] == '-')
L.log(bas, error, " %s", busCommand->getResult().c_str());
if (busCommand->getResult().c_str()[0] == '-')
L.log(bas, error, " %s", busCommand->getResult().c_str());
result << busCommand->getResult();
result << busCommand->getResult();
delete busCommand;
} else {
L.log(bas, error, " -7: receive timeout");
result << "-7: receive timeout";
}
delete busCommand;
} else {
result << "specified message type is incorrect";
+1 -1
View File
@@ -40,7 +40,7 @@ public:
std::string getData() { return m_cycBuffer.remove(); }
void addBusCommand(BusCommand* busCommand) { m_sendBuffer.add(busCommand); }
BusCommand* getBusCommand() { return m_recvBuffer.remove(10); }
BusCommand* getBusCommand() { return m_recvBuffer.remove(); }
void dump(const bool dumpState) { m_bus->setDumpState(dumpState); }