From c268638b3711cf36483cd970d5e3eedc56f34637 Mon Sep 17 00:00:00 2001 From: Carlson Lam <4546682+ksclam@users.noreply.github.com> Date: Fri, 17 May 2019 11:53:16 +0800 Subject: [PATCH] Updates for 8K Block Read/Write - UCODE DNA Demo - Updates for Axzon UI - 8K block read/write features - 10 seconds interval when more the one block write (size large then 255) --- .../BLE.Client.Droid/BLE.Client.Droid.csproj | 6 - .../Properties/AndroidManifest.xml | 2 +- .../Resources/values/style.xml | 1 + .../BLE.Client/BLE.Client.iOS/Info.plist | 6 +- .../BLE.Client/BLE.Client/BLE.Client.csproj | 20 + .../BLE.Client/BleMvxApplication.cs | 24 +- .../BLE.Client/BLE.Client/PageBlockWrite.xaml | 39 ++ .../BLE.Client/PageBlockWrite.xaml.cs | 122 +++++++ .../BLE.Client/BLE.Client/Pages/Page1.xaml | 10 - .../BLE.Client/BLE.Client/Pages/Page1.xaml.cs | 20 - .../BLE.Client/Pages/PageBlockWrite.xaml | 55 +++ .../BLE.Client/Pages/PageBlockWrite.xaml.cs | 65 ++++ .../BLE.Client/Pages/PageRFMicroSetting.xaml | 64 +++- .../Pages/PageRFMicroSetting.xaml.cs | 163 ++++++++- .../Pages/PageRFMicronInventory.xaml | 16 +- .../Pages/PageRFMicronNickName.xaml.cs | 18 + .../Pages/PageRFMicronNickname.xaml | 43 +++ .../Pages/PageSpecialFunctionsMenu.xaml | 1 + .../BLE.Client/Pages/PageUCODEDNA.xaml | 148 ++++---- .../BLE.Client/Pages/PageUCODEDNA.xaml.cs | 117 ------ .../ViewModels/ViewModelBlockWrite.cs | 309 ++++++++++++++++ .../ViewModels/ViewModelMainMenu.cs | 1 + .../ViewModels/ViewModelRFMicroInventory.cs | 343 +++++++++++++++++- .../ViewModels/ViewModelRFMicroNickname.cs | 85 +++++ .../ViewModels/ViewModelRFMicroSetting .cs | 22 +- .../ViewModelSpecialFunctionsMenu.cs | 6 + .../ViewModels/ViewModelUCODEDNA.cs | 105 ++++-- .../RFIDReader/ClassRFID.Private.Write.cs | 95 +++++ .../CSLibrary/RFIDReader/ClassRFID.Private.cs | 10 +- .../RFIDReader/ClassRFID.Public.Operation.cs | 4 + CSLibrary/CSLibrary/RFIDReader/ClassRFID.cs | 54 ++- .../Constants/CSLibrary.Constants.cs | 12 + .../CSLibrary.Structures.TagWrite.cs | 87 +++-- .../Structures/CSLibrary.Structures.cs | Bin 313662 -> 314070 bytes 34 files changed, 1727 insertions(+), 346 deletions(-) create mode 100755 CS108 Demo/Source/BLE.Client/BLE.Client/PageBlockWrite.xaml create mode 100755 CS108 Demo/Source/BLE.Client/BLE.Client/PageBlockWrite.xaml.cs delete mode 100755 CS108 Demo/Source/BLE.Client/BLE.Client/Pages/Page1.xaml delete mode 100755 CS108 Demo/Source/BLE.Client/BLE.Client/Pages/Page1.xaml.cs create mode 100755 CS108 Demo/Source/BLE.Client/BLE.Client/Pages/PageBlockWrite.xaml create mode 100755 CS108 Demo/Source/BLE.Client/BLE.Client/Pages/PageBlockWrite.xaml.cs create mode 100755 CS108 Demo/Source/BLE.Client/BLE.Client/Pages/PageRFMicronNickName.xaml.cs create mode 100755 CS108 Demo/Source/BLE.Client/BLE.Client/Pages/PageRFMicronNickname.xaml create mode 100755 CS108 Demo/Source/BLE.Client/BLE.Client/ViewModels/ViewModelBlockWrite.cs create mode 100755 CS108 Demo/Source/BLE.Client/BLE.Client/ViewModels/ViewModelRFMicroNickname.cs diff --git a/CS108 Demo/Source/BLE.Client/BLE.Client.Droid/BLE.Client.Droid.csproj b/CS108 Demo/Source/BLE.Client/BLE.Client.Droid/BLE.Client.Droid.csproj index 0636a66..048b347 100755 --- a/CS108 Demo/Source/BLE.Client/BLE.Client.Droid/BLE.Client.Droid.csproj +++ b/CS108 Demo/Source/BLE.Client/BLE.Client.Droid/BLE.Client.Droid.csproj @@ -44,9 +44,6 @@ Xamarin btls Xamarin.Android.Net.AndroidClientHandler - false - false - false pdbonly @@ -61,9 +58,6 @@ 1G Xamarin False - false - false - false diff --git a/CS108 Demo/Source/BLE.Client/BLE.Client.Droid/Properties/AndroidManifest.xml b/CS108 Demo/Source/BLE.Client/BLE.Client.Droid/Properties/AndroidManifest.xml index 2d3e785..78425fa 100755 --- a/CS108 Demo/Source/BLE.Client/BLE.Client.Droid/Properties/AndroidManifest.xml +++ b/CS108 Demo/Source/BLE.Client/BLE.Client.Droid/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@  - + diff --git a/CS108 Demo/Source/BLE.Client/BLE.Client.Droid/Resources/values/style.xml b/CS108 Demo/Source/BLE.Client/BLE.Client.Droid/Resources/values/style.xml index 1691936..89c110d 100755 --- a/CS108 Demo/Source/BLE.Client/BLE.Client.Droid/Resources/values/style.xml +++ b/CS108 Demo/Source/BLE.Client/BLE.Client.Droid/Resources/values/style.xml @@ -8,5 +8,6 @@ @color/accent @color/window_background true + false \ No newline at end of file diff --git a/CS108 Demo/Source/BLE.Client/BLE.Client.iOS/Info.plist b/CS108 Demo/Source/BLE.Client/BLE.Client.iOS/Info.plist index d82502c..176f762 100755 --- a/CS108 Demo/Source/BLE.Client/BLE.Client.iOS/Info.plist +++ b/CS108 Demo/Source/BLE.Client/BLE.Client.iOS/Info.plist @@ -25,7 +25,7 @@ UILaunchStoryboardName LaunchScreen CFBundleShortVersionString - 2.0.15 + 2.0.18 NSCalendarsUsageDescription Only for testing, we don't need the data to do anything UIApplicationExitsOnSuspend @@ -54,6 +54,8 @@ CFBundleVersion - 163 + 174 + NSLocationWhenInUseUsageDescription + The Program reads the RFID tag ID and couples that with the location of the reader and then send this to the cloud server so that the location of the RFID tag ID is de facto reported and saved in Cloud Server diff --git a/CS108 Demo/Source/BLE.Client/BLE.Client/BLE.Client.csproj b/CS108 Demo/Source/BLE.Client/BLE.Client/BLE.Client.csproj index 81e8f02..2ce69c3 100755 --- a/CS108 Demo/Source/BLE.Client/BLE.Client/BLE.Client.csproj +++ b/CS108 Demo/Source/BLE.Client/BLE.Client/BLE.Client.csproj @@ -50,9 +50,15 @@ PageBarcodeScan.xaml + + PageBlockWrite.xaml + PageFilter.xaml + + PageRFMicronNickname.xaml + PageRFMicroReadTemp.xaml @@ -120,6 +126,7 @@ DeviceListPage.xaml + @@ -128,6 +135,7 @@ + @@ -395,6 +403,18 @@ Designer + + + MSBuild:UpdateDesignTimeXaml + Designer + + + + + MSBuild:UpdateDesignTimeXaml + Designer + + diff --git a/CS108 Demo/Source/BLE.Client/BLE.Client/BleMvxApplication.cs b/CS108 Demo/Source/BLE.Client/BLE.Client/BleMvxApplication.cs index 3b01c29..d1f783d 100755 --- a/CS108 Demo/Source/BLE.Client/BLE.Client/BleMvxApplication.cs +++ b/CS108 Demo/Source/BLE.Client/BLE.Client/BleMvxApplication.cs @@ -184,14 +184,32 @@ public class BleMvxApplication : MvxApplication public static bool _batteryLow = false; // for RFMicro - public static int _sensorValueType = 0; // 0 = Temp, 1 = Sensor Code - public static uint _minOCRSSI = 0; - public static uint _maxOCRSSI = 0; + public static int _rfMicro_Power; // 0 ~ 4 + public static int _rfMicro_SensorType; // 0=Sensor code, 1=Temperature + public static int _rfMicro_SensorUnit; // 0=code, 1=f, 2=c, 3=% + public static int _rfMicro_minOCRSSI; + public static int _rfMicro_maxOCRSSI; + public static int _rfMicro_thresholdComparison; // 0 ~ 1 + public static int _rfMicro_thresholdValue; + public static string _rfMicro_thresholdColor; public override void Initialize() { + RFMicroTagNicknameViewModel item; + item = new RFMicroTagNicknameViewModel(); item.EPC = "000000000000000000000417"; item.Nickname = "Test Tag 1"; ViewModelRFMicroNickname._TagNicknameList.Add(item); + item = new RFMicroTagNicknameViewModel(); item.EPC = "000000000000000000000001"; item.Nickname = "Motor 1"; ViewModelRFMicroNickname._TagNicknameList.Add(item); + item = new RFMicroTagNicknameViewModel(); item.EPC = "000000000000000000000002"; item.Nickname = "Motor 2"; ViewModelRFMicroNickname._TagNicknameList.Add(item); + item = new RFMicroTagNicknameViewModel(); item.EPC = "000000000000000000000003"; item.Nickname = "Motor 3"; ViewModelRFMicroNickname._TagNicknameList.Add(item); + item = new RFMicroTagNicknameViewModel(); item.EPC = "000000000000000000000004"; item.Nickname = "Milk 1"; ViewModelRFMicroNickname._TagNicknameList.Add(item); + item = new RFMicroTagNicknameViewModel(); item.EPC = "000000000000000000000005"; item.Nickname = "Milk 2"; ViewModelRFMicroNickname._TagNicknameList.Add(item); + item = new RFMicroTagNicknameViewModel(); item.EPC = "000000000000000000000006"; item.Nickname = "Milk 3"; ViewModelRFMicroNickname._TagNicknameList.Add(item); + item = new RFMicroTagNicknameViewModel(); item.EPC = "000000000000000000000007"; item.Nickname = "Diaper 1"; ViewModelRFMicroNickname._TagNicknameList.Add(item); + item = new RFMicroTagNicknameViewModel(); item.EPC = "000000000000000000000008"; item.Nickname = "Diaper 2"; ViewModelRFMicroNickname._TagNicknameList.Add(item); + item = new RFMicroTagNicknameViewModel(); item.EPC = "000000000000000000000009"; item.Nickname = "Diaper 3"; ViewModelRFMicroNickname._TagNicknameList.Add(item); + RegisterAppStart(); //RegisterAppStart(); + } //static async public void LoadConfig(string readerID) diff --git a/CS108 Demo/Source/BLE.Client/BLE.Client/PageBlockWrite.xaml b/CS108 Demo/Source/BLE.Client/BLE.Client/PageBlockWrite.xaml new file mode 100755 index 0000000..b6e5c6b --- /dev/null +++ b/CS108 Demo/Source/BLE.Client/BLE.Client/PageBlockWrite.xaml @@ -0,0 +1,39 @@ + + + + + + + +