예제 #1
0
        public PiEngineeringKeypad(PiEngineeringDevice device)
        {
            _history = new LinkedList <IKeypadState>();
            _history.AddLast(new ReadOnlyKeypadState(new ReadOnlyKeypadButtonState[0]));

            _device = device;

            _device.BackingObject.SetDataCallback(this, DataCallbackFilterType.callOnNewData);
        }
예제 #2
0
        public PiEngineeringKeypad(PiEngineeringDevice device)
        {
            _history = new LinkedList<IKeypadState>();
            _history.AddLast(new ReadOnlyKeypadState(new ReadOnlyKeypadButtonState[0]));

            _device = device;

            _device.BackingObject.SetDataCallback(this, DataCallbackFilterType.callOnNewData);
        }
예제 #3
0
        public IEnumerable<PiEngineeringDevice> ScanForNewDevices()
        {
            var backingObjects = ScanForNewBackingDevices();
            var newDevices = new List<PiEngineeringDevice>();

            foreach (var backingObject in backingObjects)
            {
                var device = new PiEngineeringDevice(this, backingObject)
                    {
                        Address = (_devices.Count + 1).ToString()
                    };

                _devices.Add(device);
                newDevices.Add(device);
            }

            return newDevices;
        }
예제 #4
0
        public IEnumerable <PiEngineeringDevice> ScanForNewDevices()
        {
            var backingObjects = ScanForNewBackingDevices();
            var newDevices     = new List <PiEngineeringDevice>();

            foreach (var backingObject in backingObjects)
            {
                var device = new PiEngineeringDevice(this, backingObject)
                {
                    Address = (_devices.Count + 1).ToString()
                };

                _devices.Add(device);
                newDevices.Add(device);
            }

            return(newDevices);
        }