public static extern UInt32 SetCalibrationPins(
     short handle,
     PinStates pinStates,
     WaveType waveType,
     double frequency,
     uint amplitude,
     uint offset);
Exemplo n.º 2
0
        public void SetPinStates(PinStates state)
        {
            var pins = GetPins();

            foreach (var pin in pins)
            {
                pin.Value.State = state;
            }
        }
Exemplo n.º 3
0
        public void SetSecureCorePinStates(PinStates state)
        {
            var pins = GetSecureCorePins();

            foreach (var pin in pins)
            {
                pin.State = state;
            }
        }
        private PinStates Step(int times)
        {
            var ps = new PinStates();

            for (var i = 0; i < times; i++)
            {
                ps = _sut.Step();
            }

            return(ps);
        }
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            PinStates pinStates = (PinStates)value;

            if (pinStates == PinStates.Connected)
            {
                return(1);
            }
            if (pinStates != PinStates.Connecting)
            {
                return(0);
            }
            return(2);
        }
Exemplo n.º 6
0
 public PinViewModel(BestVpnServerConnector connector, IEventAggregator eventAggregator, IAnalyticsManager appEventManager, double leftOffset, double topOffset, Country country) : base(eventAggregator)
 {
     this.LeftOffset       = leftOffset;
     this.TopOffset        = topOffset;
     this.Coutry           = country;
     this.Width            = 34.0;
     this.Height           = 55.0;
     this._state           = PinViewModel.Map(connector.GetState(country.get_Identifier()));
     this.PinClick         = new RelayCommand(new Action(this.PinClickCommand));
     this._connector       = connector;
     this._appEventManager = appEventManager;
     this._connector.GeoServerConnectionStatusChanged += new ConnectionEventHandler <GeographicalServer>(this.AppStateChanged);
     this.PlaceTooltipRight();
     this.PlaceTooltipBottom();
 }
        public void Setup()
        {
            _byteFactory = TestUtils.CreateByteFactory();
            _fullByte    = _byteFactory.Create(255);
            var bus = new Bus <IByte>(new BusMessage <IByte> {
                Data = new Byte(), Name = "Bus"
            });
            var ioBus = new Bus <IByte>(new BusMessage <IByte> {
                Data = new Byte(), Name = "IoBus"
            });
            var byteRegisterFactory = TestUtils.CreateByteRegisterFactory();
            var ram = TestUtils.CreateRam(bus);

            _pinStates = new PinStates();
            _sut       = new ComputerState(byteRegisterFactory, ram, TestUtils.CreateBus1Factory(),
                                           new ArithmeticLogicUnitFactory(), TestUtils.CreateCaezRegisterFactory(), new BitRegisterFactory(TestUtils.CreateMemoryGateFactory()), bus, ioBus);
        }