Exemplo n.º 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);
 }
Exemplo n.º 2
0
            public QueryPause(UsbDaqConnection conn)
            {
                if (null == conn)
                {
                    throw new ArgumentNullException("conn");
                }

                Conn           = conn;
                QueryWasActive = conn._queryActive;

                if (QueryWasActive)
                {
                    Conn.PauseQuery();
                }
            }
Exemplo n.º 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;
            }
Exemplo n.º 4
0
 public ConnectionIsolator(UsbDaqConnection conn)
     : this(conn, true)
 {
 }