Beispiel #1
0
        public void OscillographControllerCreateTest()
        {
            IDeviceOutput  deviceOutput   = new ExternalDevicesController(_externalDevice);
            DevicesFactory devicesFactory = new DevicesFactory(deviceOutput);

            IDeviceInput oscillographController = devicesFactory.GetOscillograph();

            Assert.IsInstanceOfType(oscillographController, typeof(OscillographController));
        }
Beispiel #2
0
        public void KeypadAndIndicationControllerCreateTest()
        {
            IDeviceOutput  deviceOutput   = new ExternalDevicesController(_externalDevice);
            DevicesFactory devicesFactory = new DevicesFactory(deviceOutput);

            IDeviceInput keypadAndIndicationController = devicesFactory.GetKeypadAndIndication(1, 1);

            Assert.IsInstanceOfType(keypadAndIndicationController, typeof(KeypadAndIndicationController));
        }
Beispiel #3
0
        public DevicesVM(SerialPortVM serialPortVM, IRUSConnectionInterface connectionInterface, BusyObject isBusy)
        {
            IsBusy = isBusy;
            new DefaultFilesKeeper().CreateAllFiles(TEMPLATES_DIR_PATH, WidgetsLocator.Resolve <IFileExtensionFactory>());

            SupportedDevices = DevicesFactory
                               .InstantiateSupported(connectionInterface)
                               .OrderBy(d => d.Id)
                               .Select(d => new DeviceSlimVM(serialPortVM, d, IsBusy, d.Children.OrderBy(cd => cd.Id).Select(cd => new DeviceSlimVM(serialPortVM, cd, IsBusy)).ToArray()))
                               .ToObservable();
            PropertyChanged += _propertyHolder_PropertyChanged;
        }
Beispiel #4
0
        public void KeypadAndIndicationSetAndGetMemoryTest()
        {
            IDeviceOutput  deviceOutput   = new ExternalDevicesController(_externalDevice);
            DevicesFactory devicesFactory = new DevicesFactory(deviceOutput);


            int[]            mas = { 0x10, 0x12, 0x13 };
            ExtendedBitArray extendedBitArray = new ExtendedBitArray(1);
            IDeviceInput     keypadAndIndicationController = devicesFactory.GetKeypadAndIndication(0x1, 1);

            foreach (var m in mas)
            {
                keypadAndIndicationController.SetMemory(extendedBitArray, m);
                Assert.AreEqual(extendedBitArray, keypadAndIndicationController.GetMemory(m));
            }
        }
Beispiel #5
0
 public ExternalDevicesController(IExternalDevicesControllerOutput output)
 {
     _devicesFactory = new DevicesFactory(this);
     _output         = output;
 }