Beispiel #1
0
void CCECProcessor::ProcessCommand(const cec_command &command)
{
  // log the command
  m_libcec->AddLog(CEC_LOG_TRAFFIC, ToString(command).c_str());

  // find the initiator
  CCECBusDevice *device = m_busDevices->At(command.initiator);

  if (device)
    device->HandleCommand(command);
}
Beispiel #2
0
void CCECProcessor::ProcessCommand(const cec_command &command)
{
  // log the command
  CStdString dataStr;
  dataStr.Format(">> %1x%1x", command.initiator, command.destination);
  if (command.opcode_set == 1)
    dataStr.AppendFormat(":%02x", command.opcode);
  for (uint8_t iPtr = 0; iPtr < command.parameters.size; iPtr++)
    dataStr.AppendFormat(":%02x", (unsigned int)command.parameters[iPtr]);
  m_libcec->AddLog(CEC_LOG_TRAFFIC, dataStr.c_str());

  // find the initiator
  CCECBusDevice *device = m_busDevices->At(command.initiator);

  if (device)
    device->HandleCommand(command);
}