| 887 | } |
| 888 | |
| 889 | void CCECCommandHandler::SetPhysicalAddress(cec_logical_address iAddress, uint16_t iNewAddress) |
| 890 | { |
| 891 | if (!m_processor->IsHandledByLibCEC(iAddress)) |
| 892 | { |
| 893 | CCECBusDevice *otherDevice = m_processor->GetDeviceByPhysicalAddress(iNewAddress); |
| 894 | CECClientPtr client = otherDevice ? otherDevice->GetClient() : CECClientPtr(); |
| 895 | |
| 896 | CCECBusDevice *device = m_processor->GetDevice(iAddress); |
| 897 | if (device) |
| 898 | device->SetPhysicalAddress(iNewAddress); |
| 899 | else |
| 900 | LIB_CEC->AddLog(CEC_LOG_DEBUG, "device with logical address %X not found", iAddress); |
| 901 | |
| 902 | /* another device reported the same physical address as ours */ |
| 903 | if (client) |
| 904 | { |
| 905 | libcec_parameter param; |
| 906 | param.paramType = CEC_PARAMETER_TYPE_STRING; |
| 907 | param.paramData = (void*)"Physical address in use by another device. Please verify your settings"; |
| 908 | client->Alert(CEC_ALERT_PHYSICAL_ADDRESS_ERROR, param); |
| 909 | client->ResetPhysicalAddress(); |
| 910 | } |
| 911 | } |
| 912 | else |
| 913 | { |
| 914 | LIB_CEC->AddLog(CEC_LOG_DEBUG, "ignore physical address report for device %s (%X) because it's marked as handled by libCEC", ToString(iAddress), iAddress); |
| 915 | } |
| 916 | } |
| 917 | |
| 918 | bool CCECCommandHandler::PowerOn(const cec_logical_address iInitiator, const cec_logical_address iDestination) |
| 919 | { |
no test coverage detected