Skip to content

Commit

Permalink
Add missing mapping on ClassType between lorawan and twin #1274 (#1286)
Browse files Browse the repository at this point in the history
* Add missing mapping on ClassType between lorawan and twin #1274

* Remove unused mapping on property ClassType
  • Loading branch information
hocinehacherouf authored Sep 27, 2022
1 parent e5f2135 commit 021c811
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/AzureIoTHub.Portal/Server/Mappers/LoRaDeviceMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public LoRaDeviceDetails CreateDeviceDetails(Twin twin, IEnumerable<string> tags
AppSKey = Helpers.DeviceHelper.RetrieveDesiredPropertyValue(twin, nameof(LoRaDeviceDetails.AppSKey)),
NwkSKey = Helpers.DeviceHelper.RetrieveDesiredPropertyValue(twin, nameof(LoRaDeviceDetails.NwkSKey)),
Deduplication = Enum.TryParse<DeduplicationMode>(Helpers.DeviceHelper.RetrieveDesiredPropertyValue(twin, nameof(LoRaDeviceDetails.Deduplication)), out var deduplication) ? deduplication : DeduplicationMode.None,
ClassType = Enum.TryParse<ClassType>(Helpers.DeviceHelper.RetrieveDesiredPropertyValue(twin, nameof(LoRaDeviceDetails.ClassType)), out var classType) ? classType : ClassType.A,
PreferredWindow = int.TryParse(Helpers.DeviceHelper.RetrieveDesiredPropertyValue(twin, nameof(LoRaDeviceDetails.PreferredWindow)), out var preferedWindow) ? preferedWindow : default,
Supports32BitFCnt = bool.TryParse(Helpers.DeviceHelper.RetrieveDesiredPropertyValue(twin, nameof(LoRaDeviceDetails.Supports32BitFCnt)), out var boolResult) ? boolResult : null,
ABPRelaxMode = bool.TryParse(Helpers.DeviceHelper.RetrieveDesiredPropertyValue(twin, nameof(LoRaDeviceDetails.ABPRelaxMode)), out boolResult) ? boolResult : null,
Expand Down

0 comments on commit 021c811

Please sign in to comment.