Пример #1
0
 /// <summary>
 ///
 /// </summary>
 public virtual int EnterInputFrame()
 {
     //
     if (m_Stream == null)
     {
         return(-1);
     }
     //
     if (m_IsDynamicStream)
     {
         if (!isDirty)
         {
             return(0);
         }
     }
     else
     {
         m_Stream.GetReadBuffer(out m_Buffer, out m_BufferOffset, out m_BufferSize);
         Parse(m_Buffer, m_BufferOffset, m_BufferSize);
     }
     //
     for (int i = 0; i < m_NumSensors; ++i)
     {
         sensors[i].UpdateInput();
     }
     //
     isDirty = false;
     return(0);
 }
Пример #2
0
 /// <summary>
 ///
 /// </summary>
 public virtual void OnStreamRead(IStreamable stream)
 {
     //
     if (m_Stream == stream)
     {
         //if(useUnitTest) {
         //	++m_CountRec;
         //}
         stream.GetReadBuffer(out m_Buffer, out m_BufferOffset, out m_BufferSize);
         //Log.i("DeviceBase","OnStreamRead()@size : "+size);return;
         Parse(m_Buffer, m_BufferOffset, m_BufferSize);
         isDirty = true;
     }
 }
Пример #3
0
 /// <summary>
 ///
 /// </summary>
 public virtual void OnStreamRead(IStreamable stream)
 {
     ++m_TimestampRec;
     //
     stream.GetReadBuffer(out m_BufferRead, out m_OffsetRead, out m_SizeRead);
     //if(size>0) {
     if (m_IsDebug)
     {
         m_TextRead = m_BufferRead.ToHexString();
     }
     Parse(m_BufferRead, m_OffsetRead, m_SizeRead);
     //
     m_IsGUIDirty = true;
     //}
 }
Пример #4
0
 /// <summary>
 ///
 /// </summary>
 public void OnStreamRead(IStreamable stream)
 {
     stream.GetReadBuffer(out buffer, out offset, out count);
     //Log.i("LibXHawkAPI$UsbProxy",buffer.ToHexString(offset,count));
     XHawkSetReadBuffer(buffer, offset, count);
 }
Пример #5
0
 /// <summary>
 ///
 /// </summary>
 public virtual void OnStreamRead(IStreamable stream)
 {
     byte[] buffer; int offset, count;
     stream.GetReadBuffer(out buffer, out offset, out count);
     OnStreamRead(buffer, offset);
 }