Пример #1
0
 internal Sensor(int nid, UsbDaqConnection parentConnection)
 {
     _nid        = nid;
     _connection = parentConnection;
     if (null == _connection)
     {
         throw new ArgumentNullException("parentConnection");
     }
     _maxReadings    = DefaultMaxReadingsValue;
     _latestReadings = new List <PackedReading>(_maxReadings);
 }
Пример #2
0
            public QueryPause(UsbDaqConnection conn)
            {
                if (null == conn)
                {
                    throw new ArgumentNullException("conn");
                }

                Conn           = conn;
                QueryWasActive = conn._queryActive;

                if (QueryWasActive)
                {
                    Conn.PauseQuery();
                }
            }
Пример #3
0
            public ConnectionIsolator(UsbDaqConnection conn, bool cleanQueue)
            {
                if (null == conn)
                {
                    throw new ArgumentNullException("conn");
                }

                Monitor.Enter(conn._connLock);
                if (cleanQueue)
                {
                    conn.UsbConn.ClearPacketQueue();
                }

                Conn = conn;
            }
Пример #4
0
 public ConnectionIsolator(UsbDaqConnection conn)
     : this(conn, true)
 {
 }