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

Method Process

src/libcec/adapter/Pulse-Eight/USBCECAdapterCommunication.cpp:271–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269}
270
271void *CUSBCECAdapterCommunication::Process(void)
272{
273 LIB_CEC->AddLog(CEC_LOG_DEBUG, "communication thread started");
274
275 while (!IsStopped())
276 {
277 /* read from the serial port */
278 if (!ReadFromDevice(50, 5))
279 {
280 libcec_parameter param;
281 param.paramData = NULL; param.paramType = CEC_PARAMETER_TYPE_UNKOWN;
282 LIB_CEC->Alert(CEC_ALERT_CONNECTION_LOST, param);
283
284 break;
285 }
286
287 /* TODO sleep 5 ms so other threads can get a lock */
288 if (!IsStopped())
289 Sleep(5);
290 }
291
292 m_adapterMessageQueue->Clear();
293 LIB_CEC->AddLog(CEC_LOG_DEBUG, "communication thread ended");
294 return NULL;
295}
296
297bool CUSBCECAdapterCommunication::HandlePoll(const CCECAdapterMessage &msg)
298{

Callers

nothing calls this directly

Calls 7

InitMethod · 0.80
WriteEEPROMMethod · 0.80
AddLogMethod · 0.45
AlertMethod · 0.45
ClearMethod · 0.45
PingAdapterMethod · 0.45
WaitMethod · 0.45

Tested by

no test coverage detected