Exemple #1
0
        protected virtual InputEvent SendDataAndWaitResponse(EventType eventType, byte[] data)
        {
            var outputReport = CreateOutputReport(eventType, data);
            var sync         = new ResponseSync(outputReport.MessageId);

            DataRecieved += sync.OnDataReceived;
            Write(outputReport); // write the output report
            sync.ResetEvent.WaitOne(ResponseTimeout);
            return(sync.Response);
        }
Exemple #2
0
 protected virtual InputEvent SendDataAndWaitResponse(EventType eventType, byte[] data)
 {
     var outputReport = CreateOutputReport(eventType,data);
     var sync = new ResponseSync(outputReport.MessageId);
     DataRecieved += sync.OnDataReceived;
     Write(outputReport); // write the output report
     sync.ResetEvent.WaitOne(ResponseTimeout);
     return sync.Response;
 }