+ switch(msg.message())
+ {
+ case MSGCODE_TIMEOUT_ERROR:
+ case MSGCODE_HIGH_ERROR:
+ case MSGCODE_LOW_ERROR:
+ {
+ CStdString logStr;
+ if (msg.message() == MSGCODE_TIMEOUT_ERROR)
+ logStr = "MSGCODE_TIMEOUT";
+ else if (msg.message() == MSGCODE_HIGH_ERROR)
+ logStr = "MSGCODE_HIGH_ERROR";
+ else
+ logStr = "MSGCODE_LOW_ERROR";
+
+ int iLine = (msg.size() >= 3) ? (msg[1] << 8) | (msg[2]) : 0;
+ uint32_t iTime = (msg.size() >= 7) ? (msg[3] << 24) | (msg[4] << 16) | (msg[5] << 8) | (msg[6]) : 0;
+ logStr.AppendFormat(" line:%i", iLine);
+ logStr.AppendFormat(" time:%u", iTime);
+ m_controller->AddLog(CEC_LOG_WARNING, logStr.c_str());
+ *bError = true;
+ }
+ break;
+ case MSGCODE_COMMAND_ACCEPTED:
+ m_controller->AddLog(CEC_LOG_DEBUG, "MSGCODE_COMMAND_ACCEPTED");
+ iPacketsLeft--;
+ break;
+ case MSGCODE_TRANSMIT_SUCCEEDED:
+ m_controller->AddLog(CEC_LOG_DEBUG, "MSGCODE_TRANSMIT_SUCCEEDED");
+ bTransmitSucceeded = (iPacketsLeft == 0);
+ *bError = !bTransmitSucceeded;
+ break;
+ case MSGCODE_RECEIVE_FAILED:
+ m_controller->AddLog(CEC_LOG_WARNING, "MSGCODE_RECEIVE_FAILED");
+ *bError = true;
+ break;
+ case MSGCODE_COMMAND_REJECTED:
+ m_controller->AddLog(CEC_LOG_WARNING, "MSGCODE_COMMAND_REJECTED");
+ *bError = true;
+ break;
+ case MSGCODE_TRANSMIT_FAILED_LINE:
+ m_controller->AddLog(CEC_LOG_WARNING, "MSGCODE_TRANSMIT_FAILED_LINE");
+ *bError = true;
+ break;
+ case MSGCODE_TRANSMIT_FAILED_ACK:
+ m_controller->AddLog(CEC_LOG_WARNING, "MSGCODE_TRANSMIT_FAILED_ACK");
+ *bError = true;
+ break;
+ case MSGCODE_TRANSMIT_FAILED_TIMEOUT_DATA:
+ m_controller->AddLog(CEC_LOG_WARNING, "MSGCODE_TRANSMIT_FAILED_TIMEOUT_DATA");
+ *bError = true;
+ break;
+ case MSGCODE_TRANSMIT_FAILED_TIMEOUT_LINE:
+ m_controller->AddLog(CEC_LOG_WARNING, "MSGCODE_TRANSMIT_FAILED_TIMEOUT_LINE");
+ *bError = true;
+ break;
+ default:
+ CCECAdapterMessagePtr msgPtr = CCECAdapterMessagePtr(new CCECAdapterMessage(msg));
+ m_frameBuffer.Push(msgPtr);
+ break;
+ }
+