m_controller->AddLog(CEC_LOG_TRAFFIC, strTx.c_str());
}
-bool CCECProcessor::Transmit(const cec_command &data, bool bWaitForAck /* = true */)
-{
- LogOutput(data);
-
- CCECAdapterMessage output(data);
- return TransmitFormatted(output, bWaitForAck);
-}
-
bool CCECProcessor::SetLogicalAddress(cec_logical_address iLogicalAddress)
{
CStdString strLog;
return m_communication && m_communication->SetAckMask(0x1 << (uint8_t)m_iLogicalAddress);
}
-bool CCECProcessor::TransmitFormatted(const CCECAdapterMessage &data, bool bWaitForAck /* = true */)
+bool CCECProcessor::Transmit(const cec_command &data, bool bWaitForAck /* = true */)
{
bool bReturn(false);
+ LogOutput(data);
+
+ CCECAdapterMessage output(data);
+
CLockObject lock(&m_mutex);
- if (!m_communication || !m_communication->Write(data))
+ if (!m_communication || !m_communication->Write(output))
return bReturn;
if (bWaitForAck)
while (!bReturn && now < target && !bError)
{
- bReturn = WaitForAck(&bError, data.size(), (uint32_t) (target - now));
+ bReturn = WaitForAck(&bError, output.size(), (uint32_t) (target - now));
now = GetTimeMs();
}
virtual void AddKey(void);
virtual void AddLog(cec_log_level level, const CStdString &strMessage);
- virtual bool TransmitFormatted(const CCECAdapterMessage &data, bool bWaitForAck = true);
virtual void TransmitAbort(cec_logical_address address, cec_opcode opcode, ECecAbortReason reason = CEC_ABORT_REASON_UNRECOGNIZED_OPCODE);
CCECBusDevice *m_busDevices[16];