case CEC_OPCODE_ROUTING_CHANGE:
HandleRoutingChange(command);
break;
+ case CEC_OPCODE_ROUTING_INFORMATION:
+ HandleRoutingInformation(command);
+ break;
case CEC_OPCODE_STANDBY:
HandleStandby(command);
break;
case CEC_OPCODE_ACTIVE_SOURCE:
HandleActiveSource(command);
break;
+ case CEC_OPCODE_REPORT_PHYSICAL_ADDRESS:
+ HandleReportPhysicalAddress(command);
+ break;
default:
UnhandledCommand(command);
if (command.destination == CECDEVICE_BROADCAST || m_busDevice->MyLogicalAddressContains(command.destination))
return false;
}
+bool CCECCommandHandler::HandleReportPhysicalAddress(const cec_command &command)
+{
+ if (command.parameters.size == 2)
+ {
+ uint16_t iNewAddress = ((uint16_t)command.parameters[0] << 8) | ((uint16_t)command.parameters[1]);
+
+ CCECBusDevice *device = GetDevice(command.initiator);
+ if (device)
+ device->SetPhysicalAddress(iNewAddress);
+ }
+ return true;
+}
+
bool CCECCommandHandler::HandleReportPowerStatus(const cec_command &command)
{
if (command.parameters.size == 1)
return true;
}
+bool CCECCommandHandler::HandleRoutingInformation(const cec_command &command)
+{
+ if (command.parameters.size == 2)
+ {
+ uint16_t iNewAddress = ((uint16_t)command.parameters[0] << 8) | ((uint16_t)command.parameters[1]);
+
+ CCECBusDevice *device = GetDevice(command.initiator);
+ if (device)
+ device->SetPhysicalAddress(iNewAddress);
+ }
+}
+
bool CCECCommandHandler::HandleSetMenuLanguage(const cec_command &command)
{
if (command.parameters.size == 3)
virtual bool HandleGiveOSDName(const cec_command &command);
virtual bool HandleGivePhysicalAddress(const cec_command &command);
virtual bool HandleMenuRequest(const cec_command &command);
+ virtual bool HandleReportPhysicalAddress(const cec_command &command);
virtual bool HandleReportPowerStatus(const cec_command &command);
virtual bool HandleRequestActiveSource(const cec_command &command);
virtual bool HandleRoutingChange(const cec_command &command);
+ virtual bool HandleRoutingInformation(const cec_command &command);
virtual bool HandleSetMenuLanguage(const cec_command &command);
virtual bool HandleSetStreamPath(const cec_command &command);
virtual bool HandleSetSystemAudioModeRequest(const cec_command &command);