MCPcopy Create free account
hub / github.com/Pulse-Eight/libcec / MessageReceived

Method MessageReceived

src/libcec/adapter/RPi/RPiCECAdapterMessageQueue.cpp:75–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75bool CRPiCECAdapterMessageQueueEntry::MessageReceived(cec_opcode opcode, cec_logical_address initiator, cec_logical_address destination, uint32_t response)
76{
77 if ((m_command.opcode_set && m_command.opcode == opcode &&
78 m_command.initiator == initiator &&
79 m_command.destination == destination)
80 ||
81 (!m_command.opcode_set &&
82 m_command.destination == destination))
83 {
84 CLockObject lock(m_mutex);
85 m_retval = response;
86 m_bSucceeded = true;
87 m_condition.Signal();
88 return true;
89 }
90
91 return false;
92}
93
94bool CRPiCECAdapterMessageQueueEntry::Wait(uint32_t iTimeout)
95{

Callers 1

OnDataReceivedMethod · 0.45

Calls 2

SignalMethod · 0.80
AddLogMethod · 0.45

Tested by

no test coverage detected