}
}
+void CCECBusDevice::SetPhysicalAddress(uint16_t iNewAddress, uint16_t iOldAddress /* = 0 */)
+{
+ CStdString strLog;
+ strLog.Format(">> %i changed physical address from %04x to %04x", GetLogicalAddress(), m_iPhysicalAddress, iNewAddress);
+ AddLog(CEC_LOG_DEBUG, strLog.c_str());
+
+ m_iPhysicalAddress = iNewAddress;
+}
+
const char *CCECBusDevice::CECVendorIdToString(const uint64_t iVendorId)
{
switch (iVendorId)
virtual cec_logical_address GetLogicalAddress(void) const { return m_iLogicalAddress; }
virtual uint16_t GetPhysicalAddress(void) const { return m_iPhysicalAddress; }
+ virtual void SetPhysicalAddress(uint16_t iNewAddress, uint16_t iOldAddress = 0);
virtual cec_logical_address GetMyLogicalAddress(void) const;
virtual uint16_t GetMyPhysicalAddress(void) const;
{
uint16_t iOldAddress = ((uint16_t)command.parameters[0] << 8) | ((uint16_t)command.parameters[1]);
uint16_t iNewAddress = ((uint16_t)command.parameters[2] << 8) | ((uint16_t)command.parameters[3]);
- CStdString strLog;
- strLog.Format(">> %i changed physical address from %04x to %04x", command.initiator, iOldAddress, iNewAddress);
- m_busDevice->AddLog(CEC_LOG_DEBUG, strLog.c_str());
- m_busDevice->GetProcessor()->AddCommand(command);
+ m_busDevice->SetPhysicalAddress(iNewAddress, iOldAddress);
}
return true;
}