Esempio n. 1
0
        public void OscillographControllerCreateTest()
        {
            IDeviceOutput  deviceOutput   = new ExternalDevicesController(_externalDevice);
            DevicesFactory devicesFactory = new DevicesFactory(deviceOutput);

            IDeviceInput oscillographController = devicesFactory.GetOscillograph();

            Assert.IsInstanceOfType(oscillographController, typeof(OscillographController));
        }
Esempio n. 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));
        }
Esempio n. 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;
        }
Esempio n. 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));
            }
        }
Esempio n. 5
0
 public ExternalDevicesController(IExternalDevicesControllerOutput output)
 {
     _devicesFactory = new DevicesFactory(this);
     _output         = output;
 }