public void StartSync(Constants.ScanType scanType)
        {
            this.ScanType = scanType;
            this.ProcessQeueue.Clear();
            this.StartIncrementProgress = false;

            if (this.ScanType == Constants.ScanType.ACTIVATION)
            {
                this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.WriteScreenDisplay);
            }
            else if (this.ScanType == Constants.ScanType.SYNCING)
            {
                Debug.WriteLine("SyncDeviceHandler939: Start syncing-...");
                //this.GetServicesCharacterisitic();
                this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.EnableFF07);
                this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.EnableFF08);
                this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadModel);
                this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadSerial);
                this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadFwVersion);
                this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadBatteryLevel);
                this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadManufacturer);
                //this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.GetWsDeviceInfo);
                this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadUserSettings);
                this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadDeviceStatus);
                this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadDeviceSettings);
                this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadStepsHeader);
                this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadCurrentHour);
            }
            this.ProcessCommands();
        }
Esempio n. 2
0
        public void StartSync(Constants.ScanType scanType)
        {
            Debug.WriteLine("SyncDeviceHandlerStriiv: Start syncing....");

            Char9A0A = GetServicesCharacteristic(Constants.CharacteristicsUUID._9A0A);
            this.ProcessQeueue.Enqueue(Constants.StriivSyncHandlerSequence.EnableFE23);
            this.ProcessQeueue.Enqueue(Constants.StriivSyncHandlerSequence.RegisterRead);
            //this.ProcessQeueue.Enqueue(Constants.StriivSyncHandlerSequence.RegisterWrite);

            this.ProcessCommands();
        }
Esempio n. 3
0
        public async void StartScan(Constants.ScanType scanType)
        {
            Debug.WriteLine("SyncHandler: StartScan");

            this.ScanType = scanType;
            if (this.Adapter != null && !this.Adapter.IsScanning)
            {
                this.ScanStarted(this, new EventArgs()
                {
                });
                await Task.Delay(500);

                this.InScanningMode = true;
                this.Adapter.StartScanningForDevices(this.serviceList);
                this.ScanStarted(this, new EventArgs());
            }
            else
            {
                Debug.WriteLine("SyncHandler is null");
            }
        }
		public void StartSync(Constants.ScanType scanType)
		{
			this.ScanType = scanType;
			this.ProcessQeueue.Clear();
			this.StartIncrementProgress = false;

			TrioDeviceInformationInstance = new TrioDeviceInformation();

			if (this.ScanType == Constants.ScanType.ACTIVATION)
			{
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.WriteScreenDisplay);
			}
			else if (this.ScanType == Constants.ScanType.SYNCING)
			{
				Debug.WriteLine("SyncDeviceHandler939: Start syncing-...");
				//this.GetServicesCharacterisitic();
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.EnableFF07);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.EnableFF08);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadModel);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadSerial);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadFwVersion);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadBatteryLevel);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadManufacturer);



				//this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.GetWsDeviceInfo);
				//this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadUserSettings);
				//this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadDeviceStatus);
				//this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadDeviceSettings);
				//this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadStepsHeader);
				//this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadCurrentHour);
			}
			this.ProcessCommands();
		}
 public void StartSync(Constants.ScanType scanType)
 {
     throw new NotImplementedException();
 }
		public void StartSync(Constants.ScanType scanType)
		{
			
			this.ScanType = scanType;
			this.ProcessQeueue.Clear();
			this.StartIncrementProgress = false;
			this.isReadingCurrentHour = false;
			this.isUnFlaggingTableHeaderDueToTimeChange = false;
			this.clearMessagesOnly = false;
			this.isValidateAppInfo = false;


			this.SyncStarted(this, new EventArgs());
			if (this.ScanType == Constants.ScanType.ACTIVATION)
			{
				
				Debug.WriteLine("SyncDeviceHandler961: Start activation...");

				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.EnableFF07);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.EnableFF08);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadModel);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadSerial);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadFwVersion);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadBatteryLevel);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadManufacturer);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.WriteScreenDisplay);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.WsActivateDeviceWithMember);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.WriteDeviceSettings);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ClearEEProm);
				//this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.WriteUserSettings);
				//this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.WriteExerciseSettings);
				//this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.WriteCompanySettings);
				//this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.WriteSignatureSettings);
				//this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.WriteSeizureSettings);
				//this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.WriteScreenFlow);
				//this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.WriteDeviceSensitivity);
				//this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.WriteDeviceStatus);
				//this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.WriteDeviceMode);



			}
			else if (this.ScanType == Constants.ScanType.SYNCING)
			{
				
				Debug.WriteLine("SyncDeviceHandler961: Start syncing...");
				//this.GetServicesCharacterisitic();
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.EnableFF07);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.EnableFF08);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadModel);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadSerial);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadFwVersion);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadBatteryLevel);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadManufacturer);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadDeviceSettings);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadDeviceStatus);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.WsGetDeviceInfo);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadTallies);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.WsUploadTallies);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadSeizureSettings);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadSeizureBlocks);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadStepsHeader);
				this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadUserSettings);


				//this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadTallies);
				//this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadDeviceInformation);
				//this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadUserSettings);
				//this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadDeviceStatus);
				//this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadDeviceSettings);
				//this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadStepsHeader);
				//this.ProcessQeueue.Enqueue(Constants.SyncHandlerSequence.ReadCurrentHour);
			}
			this.ProcessCommands();
		}
Esempio n. 7
0
		public async void StartScan(Constants.ScanType scanType)
		{
			Debug.WriteLine("SyncHandler: StartScan");

			this.ScanType = scanType;
			if (this.Adapter != null && !this.Adapter.IsScanning)
			{
				this.ScanStarted(this, new EventArgs() { });
				await Task.Delay(500);
				this.InScanningMode = true;
				this.Adapter.StartScanningForDevices(this.serviceList);

			}
			else {
				Debug.WriteLine("SyncHandler is null");
			}
		}