internal Sensor(int nid, UsbDaqConnection parentConnection) { _nid = nid; _connection = parentConnection; if (null == _connection) { throw new ArgumentNullException("parentConnection"); } _maxReadings = DefaultMaxReadingsValue; _latestReadings = new List <PackedReading>(_maxReadings); }
public QueryPause(UsbDaqConnection conn) { if (null == conn) { throw new ArgumentNullException("conn"); } Conn = conn; QueryWasActive = conn._queryActive; if (QueryWasActive) { Conn.PauseQuery(); } }
public ConnectionIsolator(UsbDaqConnection conn, bool cleanQueue) { if (null == conn) { throw new ArgumentNullException("conn"); } Monitor.Enter(conn._connLock); if (cleanQueue) { conn.UsbConn.ClearPacketQueue(); } Conn = conn; }
public ConnectionIsolator(UsbDaqConnection conn) : this(conn, true) { }