public void Connect()
        {
            _spaceSensorWirelessDongleObj = new SpaceSensorWirelessDongle(COM_PORT);

            _spaceSensorWirelessDongleObj.Connect();
            _spaceSensor1 = new SpaceSensorDevice(_sensor1LogicalID, _spaceSensorWirelessDongleObj);
            _spaceSensor2 = new SpaceSensorDevice(_sensor2LogicalID, _spaceSensorWirelessDongleObj);
            _spaceSensor1.SetRange();
            _spaceSensor2.SetRange();
            _spaceSensorWirelessDongleObj.Disconnect();

            _spaceSensorWirelessDongleObj.Connect();
            _spaceSensor1 = new SpaceSensorDevice(_sensor1LogicalID, _spaceSensorWirelessDongleObj);
            _spaceSensor2 = new SpaceSensorDevice(_sensor2LogicalID, _spaceSensorWirelessDongleObj);
        }
Пример #2
0
        public void Connect()
        {
            _spaceSensorWirelessDongleObj = new SpaceSensorWirelessDongle(COM_PORT);

            _spaceSensorWirelessDongleObj.Connect();
            _spaceSensor1 = new SpaceSensorDevice(_sensor1LogicalID, _spaceSensorWirelessDongleObj);
            _spaceSensor2 = new SpaceSensorDevice(_sensor2LogicalID, _spaceSensorWirelessDongleObj);
            _spaceSensor1.SetRange();
            _spaceSensor2.SetRange();
            _spaceSensorWirelessDongleObj.Disconnect();

            _spaceSensorWirelessDongleObj.Connect();
            _spaceSensor1 = new SpaceSensorDevice(_sensor1LogicalID, _spaceSensorWirelessDongleObj);
            _spaceSensor2 = new SpaceSensorDevice(_sensor2LogicalID, _spaceSensorWirelessDongleObj);
        }
Пример #3
0
        public void Connect()
        {
            try
            {
                _spaceSensorWirelessDongleObj = new SpaceSensorWirelessDongle(COM_PORT);

                _spaceSensorWirelessDongleObj.Connect();
                _spaceSensor1 = new SpaceSensorDevice(_sensor1LogicalID, _spaceSensorWirelessDongleObj);
                _spaceSensor2 = new SpaceSensorDevice(_sensor2LogicalID, _spaceSensorWirelessDongleObj);
                _spaceSensor1.SetRange();
                _spaceSensor2.SetRange();
                _spaceSensorWirelessDongleObj.Disconnect();

                _spaceSensorWirelessDongleObj.Connect();
                _spaceSensor1 = new SpaceSensorDevice(_sensor1LogicalID, _spaceSensorWirelessDongleObj);
                _spaceSensor2 = new SpaceSensorDevice(_sensor2LogicalID, _spaceSensorWirelessDongleObj);
            }
            catch (Exception ex)
            {
                throw;
            }
        }
        public void Connect()
        {
            try
            {
                _spaceSensorWirelessDongleObj = new SpaceSensorWirelessDongle(COM_PORT);

                _spaceSensorWirelessDongleObj.Connect();
                _spaceSensor1 = new SpaceSensorDevice(_sensor1LogicalID, _spaceSensorWirelessDongleObj);
                _spaceSensor2 = new SpaceSensorDevice(_sensor2LogicalID, _spaceSensorWirelessDongleObj);
                _spaceSensor1.SetRange();
                _spaceSensor2.SetRange();
                _spaceSensorWirelessDongleObj.Disconnect();

                _spaceSensorWirelessDongleObj.Connect();
                _spaceSensor1 = new SpaceSensorDevice(_sensor1LogicalID, _spaceSensorWirelessDongleObj);
                _spaceSensor2 = new SpaceSensorDevice(_sensor2LogicalID, _spaceSensorWirelessDongleObj);

            }
            catch (Exception ex)
            {

                throw;
            }
        }
 public SpaceSensorDevice(byte sensorLogicalID,SpaceSensorWirelessDongle wirelessDongle)
 {
     _sensorLogicalID = sensorLogicalID;
     _wirelessDongle = wirelessDongle;
 }
Пример #6
0
 public SpaceSensorDevice(byte sensorLogicalID, SpaceSensorWirelessDongle wirelessDongle)
 {
     _sensorLogicalID = sensorLogicalID;
     _wirelessDongle  = wirelessDongle;
 }