| 379 | } |
| 380 | |
| 381 | void CCECProcessor::LogOutput(const cec_command &data) |
| 382 | { |
| 383 | std::string strTx; |
| 384 | |
| 385 | // initiator and destination |
| 386 | strTx = StringUtils::Format("<< %02x", ((uint8_t)data.initiator << 4) + (uint8_t)data.destination); |
| 387 | |
| 388 | // append the opcode |
| 389 | if (data.opcode_set) |
| 390 | strTx += StringUtils::Format(":%02x", (uint8_t)data.opcode); |
| 391 | |
| 392 | // append the parameters |
| 393 | for (uint8_t iPtr = 0; iPtr < data.parameters.size; iPtr++) |
| 394 | strTx += StringUtils::Format(":%02x", data.parameters[iPtr]); |
| 395 | |
| 396 | // and log it |
| 397 | m_libcec->AddLog(CEC_LOG_TRAFFIC, strTx.c_str()); |
| 398 | } |
| 399 | |
| 400 | bool CCECProcessor::PollDevice(cec_logical_address iAddress) |
| 401 | { |