コード例 #1
0
        public ProcessorContainer(IPacketsProcessor processor, AdaptiveInterval adaptiveInterval = null)
        {
            this.Processor = processor;

            this.QuarantineEndTime = DateTime.MinValue;

            this.quarantineTimeSeconds = 10;
            this.adaptiveInterval      = adaptiveInterval ?? new AdaptiveInterval(TimeSpan.FromMilliseconds(100), TimeSpan.FromMilliseconds(5000), TimeSpan.FromMilliseconds(100));
        }
コード例 #2
0
ファイル: MainPage.xaml.cs プロジェクト: WhiteFossa/yiff-l
        public MainPage(IBluetoothDevicesLister bluetoothDevicesLister,
                        IBluetoothCommunicator bluetoothCommunicator,
                        IPacketsProcessor packetsProcessor)
        {
            InitializeComponent();

            var connectToFoxPage = new ConnectToFoxPage(bluetoothDevicesLister,
                                                        bluetoothCommunicator);

            var foxSettingsPage = new FoxSettingsPage(bluetoothCommunicator,
                                                      packetsProcessor);

            btnConnectToFox.Clicked += (s, e) => Navigation.PushModalAsync(connectToFoxPage);
            btnFoxSettings.Clicked  += (s, e) => Navigation.PushModalAsync(foxSettingsPage);
        }
コード例 #3
0
        public FoxSettingsPage(IBluetoothCommunicator bluetoothCommunicator,
                               IPacketsProcessor packetsProcessor)
        {
            this.bluetoothCommunicator = bluetoothCommunicator;
            this.packetsProcessor      = packetsProcessor;

            App.NewByteReadDelegate = packetsProcessor.NewByteReceived;

            InitializeComponent();

            // Fox codes
            pkCode.Items.Add("Finish");
            pkCode.Items.Add("Fox #1");
            pkCode.Items.Add("Fox #2");
            pkCode.Items.Add("Fox #3");
            pkCode.Items.Add("Fox #4");
            pkCode.Items.Add("Fox #5");
            pkCode.Items.Add("Beacon");

            // Registering events handlers
            packetsProcessor.RegisterOnFoxArmedEventHandler(OnFoxIsArmed);
            packetsProcessor.RegisterOnAntennaMatchingMeasurementEventHandler(OnAntennaMatchingMeasurement);
            packetsProcessor.RegisterOnEnteringSleepmodeEventHandler(OnEnteringSleepmode);
        }
コード例 #4
0
 public GetAntennaMatchingDataCommand(IPacketsProcessor packetsProcessor)
 {
     _packetsProcessor = packetsProcessor;
     _packetsProcessor.SetOnGetAntennaMatchingDataResponse(OnGetAntennaMatchingDataResponse);
 }
コード例 #5
0
 public GetP80mFactorsCommand(IPacketsProcessor packetsProcessor)
 {
     _packetsProcessor = packetsProcessor;
     _packetsProcessor.SetOnGetP80mFactorsResponse(OnGetP80mFactorsResponse);
 }
コード例 #6
0
 public SetDisarmOnDischargeThresholdCommand(IPacketsProcessor packetsProcessor)
 {
     _packetsProcessor = packetsProcessor;
     _packetsProcessor.SetOnSetDisarmOnDischargeThresholdResponse(OnSetDisarmOnDischargeThresholdResponse);
 }
コード例 #7
0
 public AddNewProfileCommand(IPacketsProcessor packetsProcessor)
 {
     _packetsProcessor = packetsProcessor;
     _packetsProcessor.SetOnAddNewProfileResponse(OnAddNewProfileResponse);
 }
コード例 #8
0
 public GetFrequencyCommand(IPacketsProcessor packetsProcessor)
 {
     _packetsProcessor = packetsProcessor;
     _packetsProcessor.SetOnGetFrequencyResponse(OnGetFrequencyResponse);
 }
コード例 #9
0
 public AddNewProfileCommand(IPacketsProcessor packetsProcessor)
 {
     this.packetsProcessor = packetsProcessor ?? throw new ArgumentNullException(nameof(packetsProcessor));
     packetsProcessor.SetOnAddNewProfileResponse(OnAddNewProfileResponse);
 }
コード例 #10
0
 public ArmFoxCommand(IPacketsProcessor packetsProcessor)
 {
     _packetsProcessor = packetsProcessor;
     _packetsProcessor.SetOnArmFoxResponse(OnArmFoxResponse);
 }
コード例 #11
0
 public GetLastErrorCodeCommand(IPacketsProcessor packetsProcessor)
 {
     _packetsProcessor = packetsProcessor;
     _packetsProcessor.SetOnGetLastFailureCodeResponse(OnGetLastErrorCodeResponse);
 }
コード例 #12
0
 public GetUantVoltsCommand(IPacketsProcessor packetsProcessor)
 {
     _packetsProcessor = packetsProcessor;
     _packetsProcessor.SetOnGetUAntVoltsResponse(OnGetUantVoltsResponse);
 }
コード例 #13
0
 public GetBatteryLevelCommand(IPacketsProcessor packetsProcessor)
 {
     _packetsProcessor = packetsProcessor;
     _packetsProcessor.SetOnGetBatteryLevelResponse(OnGetBatteryLevelResponse);
 }
コード例 #14
0
 public GetUbattADCCommand(IPacketsProcessor packetsProcessor)
 {
     _packetsProcessor = packetsProcessor;
     _packetsProcessor.SetOnGetUBattADCResponse(OnGetUBattADCResponse);
 }
コード例 #15
0
 public MarkMatchingAsSeenCommand(IPacketsProcessor packetsProcessor)
 {
     _packetsProcessor = packetsProcessor;
     _packetsProcessor.SetOnMarkMatchingAsSeenResponse(OnMarkMatchingAsSeenResponse);
 }
コード例 #16
0
 public GetFoxNameCommand(IPacketsProcessor packetsProcessor)
 {
     _packetsProcessor = packetsProcessor;
     _packetsProcessor.SetOnGetFoxNameResponse(OnGetFoxNameResponse);
 }
コード例 #17
0
 public GetFrequencyCommand(IPacketsProcessor packetsProcessor)
 {
     this.packetsProcessor = packetsProcessor ?? throw new ArgumentNullException(nameof(packetsProcessor));
     packetsProcessor.SetOnGetFrequencyResponse(OnGetFrequencyResponse);
 }
コード例 #18
0
 public IsFoxArmedCommand(IPacketsProcessor packetsProcessor)
 {
     _packetsProcessor = packetsProcessor;
     _packetsProcessor.SetOnIsFoxArmedResponse(OnIsFoxArmedResponse);
 }
コード例 #19
0
ファイル: SetSpeedCommand.cs プロジェクト: WhiteFossa/yiff-l
 public SetSpeedCommand(IPacketsProcessor packetsProcessor)
 {
     this.packetsProcessor = packetsProcessor ?? throw new ArgumentNullException(nameof(packetsProcessor));
     packetsProcessor.SetOnSetSpeedResponse(OnSetSpeedResponse);
 }
コード例 #20
0
 public NoOperationCommand(IPacketsProcessor packetsProcessor)
 {
     this.packetsProcessor = packetsProcessor ?? throw new ArgumentNullException(nameof(packetsProcessor));
     packetsProcessor.SetOnNoOperationResponse(OnNoOperationResponse);
 }
コード例 #21
0
 public SetEndingToneDurationCommand(IPacketsProcessor packetsProcessor)
 {
     _packetsProcessor = packetsProcessor;
     packetsProcessor.SetOnSetEndingToneDurationResponse(OnSetEndingToneDurationResponse);
 }
コード例 #22
0
 public GetLastFailureCodeCommand(IPacketsProcessor packetsProcessor)
 {
     this.packetsProcessor = packetsProcessor ?? throw new ArgumentNullException(nameof(packetsProcessor));
     packetsProcessor.SetOnGetLastFailureCodeResponse(OnGetLastFailureCodeResponse);
 }
コード例 #23
0
ファイル: DisarmFoxCommand.cs プロジェクト: WhiteFossa/yiff-l
 public DisarmFoxCommand(IPacketsProcessor packetsProcessor)
 {
     this.packetsProcessor = packetsProcessor ?? throw new ArgumentNullException(nameof(packetsProcessor));
     packetsProcessor.SetOnDisarmFoxResponse(OnDisarmFoxResponse);
 }
コード例 #24
0
 public GetBatteryLevelCommand(IPacketsProcessor packetsProcessor)
 {
     this.packetsProcessor = packetsProcessor ?? throw new ArgumentNullException(nameof(packetsProcessor));
     packetsProcessor.SetOnGetBatteryLevelResponse(OnGetBatteryLevelResponse);
 }
コード例 #25
0
 public GetProfilesCountCommand(IPacketsProcessor packetsProcessor)
 {
     this.packetsProcessor = packetsProcessor ?? throw new ArgumentNullException(nameof(packetsProcessor));
     packetsProcessor.SetOnGetProfilesCountResponse(OnGetProfilesCountResponse);
 }
コード例 #26
0
 public GetEndingToneDurationCommand(IPacketsProcessor packetsProcessor)
 {
     _packetsProcessor = packetsProcessor ?? throw new ArgumentNullException(nameof(packetsProcessor));
     _packetsProcessor.SetOnGetEndingToneDurationResponse(OnGetEndingToneDurationResponse);
 }
コード例 #27
0
 public SetRTCCalibrationValueCommand(IPacketsProcessor packetsProcessor)
 {
     _packetsProcessor = packetsProcessor;
     _packetsProcessor.SetOnSetRTCCalibrationValueResponse(OnSetRTCCalibrationValueResponse);
 }
コード例 #28
0
 public SetCodeCommand(IPacketsProcessor packetsProcessor)
 {
     _packetsProcessor = packetsProcessor;
     _packetsProcessor.SetOnSetCodeResponse(OnSetCodeResponse);
 }
コード例 #29
0
 public SetDateAndTimeCommand(IPacketsProcessor packetsProcessor)
 {
     this.packetsProcessor = packetsProcessor ?? throw new ArgumentNullException(nameof(packetsProcessor));
     packetsProcessor.SetOnSetDateAndTimeResponse(OnSetCurrentDateAndTimeResponse);
 }
コード例 #30
0
 public GetBeginAndEndTimesCommand(IPacketsProcessor packetsProcessor)
 {
     this.packetsProcessor = packetsProcessor ?? throw new ArgumentNullException(nameof(packetsProcessor));
     packetsProcessor.SetOnGetBeginAndEndTimesResponse(OnGetBeginAndEndTimesResponse);
 }