From 295e5c36003f501bef38ab5ea1c09190bea9f521 Mon Sep 17 00:00:00 2001 From: Cole Gerdemann Date: Thu, 19 Jan 2023 12:41:05 -0500 Subject: [PATCH 1/6] extend connectivity model with cellular and wifi details --- spec/Vehicle/Connectivity.vspec | 128 ++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) diff --git a/spec/Vehicle/Connectivity.vspec b/spec/Vehicle/Connectivity.vspec index 6ec713a3b..298e9d7fd 100644 --- a/spec/Vehicle/Connectivity.vspec +++ b/spec/Vehicle/Connectivity.vspec @@ -21,3 +21,131 @@ IsConnectivityAvailable: comment: This signal can be used by onboard vehicle services to decide what features that shall be offered to the driver, for example disable the 'check for update' button if vehicle does not have connectivity. + +ConnectivityType: + datatype: string[] + type: attribute + allowed: [ + 'CELLULAR', + 'WIFI' + ] + description: Type of connectivity currently available. + +CurrentDownload: + datatype: float + type: sensor + unit: MB/s + description: Download bandwidth currently in-use. + +CurrentUpload: + datatype: float + type: sensor + unit: MB/s + description: Upload bandwidth currently in-use. + +Cellular: + type: branch + description: Properties related to cellular connectivity. + +Cellular.SignalStrength: + type: sensor + datatype: int8 + unit: dBm + max: 0 + description: Cellular connectivity signal strength. + +Cellular.NetworkType: + datatype: string[] + type: sensor + allowed: [ + '2G', + '3G', + '4G', + '5G' + ] + description: Type of cellular network that is currently in-use. + comment: There are a lot of subtypes that fall under the general '~G' types, but these aren't expanded upon here. + +Cellular.NetworkSubtype: + datatype: string + type: sensor + description: Cellular network technology that is currently in-use. + comment: For example, LTE and WiMAX both fall under the '4G' umbrella but are substantially different. + +Cellular.Carrier: + datatype: string + type: sensor + description: Carrier that is currently in-use. + +Cellular.DataUsage: + type: branch + description: Information on cellular data usage. + +Cellular.DataUsage.Limit: + type: attribute + unit: MB + datatype: uint32 + min: 0 + description: Data usage limit in megabytes. + +Cellular.DataUsage.Current: + type: sensor + unit: MB + datatype: uint32 + min: 0 + description: Amount of data used this cycle. + +Cellular.DataUsage.CycleLength: + type: attribute + unit: day + datatype: uint16 + min: 0 + description: Length of a data cycle. + comment: Defines the period where the current data usage is relevant. + +Cellular.DataUsage.CycleReset: + type: attribute + unit: day + datatype: uint16 + min: 0 + description: Time until the next data cycle starts. + +WiFi: + type: branch + description: Properties related to WiFi connectivity. + +WiFi.SignalStrength: + type: sensor + datatype: int8 + unit: dBm + max: 0 + description: WiFi connectivity signal strength. + +WiFi.SSID: + type: sensor + datatype: string + description: SSID of connected WiFi network. + +WiFi.NetworkType: + datatype: string[] + type: sensor + allowed: [ + '0', + '1', + '2', + '3', + '4', + '5', + '6', + '6e', + '7' + ] + description: Type of WiFi network that is currently in-use. + +WiFi.IsMetered: + datatype: boolean + type: sensor + description: Indicates if the WiFi connectivity is metered. + True = Metered. False = Not metered. + comment: This signal can be used by onboard vehicle services to limit features such as background update downloads when on metered networks. + From 53199f42c666eee830ff1aabb9188937d4721ed3 Mon Sep 17 00:00:00 2001 From: Cole Gerdemann Date: Thu, 19 Jan 2023 13:01:02 -0500 Subject: [PATCH 2/6] update units to MiB --- spec/Vehicle/Connectivity.vspec | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/spec/Vehicle/Connectivity.vspec b/spec/Vehicle/Connectivity.vspec index 298e9d7fd..05e110acc 100644 --- a/spec/Vehicle/Connectivity.vspec +++ b/spec/Vehicle/Connectivity.vspec @@ -34,13 +34,13 @@ ConnectivityType: CurrentDownload: datatype: float type: sensor - unit: MB/s + unit: MiB/s description: Download bandwidth currently in-use. CurrentUpload: datatype: float type: sensor - unit: MB/s + unit: MiB/s description: Upload bandwidth currently in-use. Cellular: @@ -51,7 +51,6 @@ Cellular.SignalStrength: type: sensor datatype: int8 unit: dBm - max: 0 description: Cellular connectivity signal strength. Cellular.NetworkType: @@ -83,14 +82,14 @@ Cellular.DataUsage: Cellular.DataUsage.Limit: type: attribute - unit: MB + unit: MiB datatype: uint32 min: 0 description: Data usage limit in megabytes. Cellular.DataUsage.Current: type: sensor - unit: MB + unit: MiB datatype: uint32 min: 0 description: Amount of data used this cycle. From 5793add59f05ed22b1f672450b096ff89a778bee Mon Sep 17 00:00:00 2001 From: Cole Gerdemann Date: Sat, 9 Dec 2023 12:36:08 -0500 Subject: [PATCH 3/6] add data units and quantities.yaml --- spec/quantities.yaml | 3 +++ spec/units.yaml | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/spec/quantities.yaml b/spec/quantities.yaml index 4a6202dbb..bc5cbf656 100644 --- a/spec/quantities.yaml +++ b/spec/quantities.yaml @@ -78,3 +78,6 @@ relation: resistance: definition: Property of a resistive element, equal to the scalar quantity given by the quotient of voltage u and electric current i (IEC 80000-6:2022) +data: + definition: TBD +data-per-time: \ No newline at end of file diff --git a/spec/units.yaml b/spec/units.yaml index 0f03726f3..2c839d70a 100644 --- a/spec/units.yaml +++ b/spec/units.yaml @@ -392,3 +392,19 @@ Ohm: unit: Ohm quantity: resistance allowed-datatypes: ['numeric'] + +# Data + +MiB: + definition: Data measured in mebibytes + unit: mebibyte + quantity: data + allowed-datatypes: ['numeric'] + +# Data transfer rate + +MiB/s: + definition: Data transfer rate measured in mebibytes per second + unit: mebibyte per second + quantity: data-per-time + allowed-datatypes: ['numeric'] \ No newline at end of file From 8f7608f0a4ca77157ac4f9a907bf4506d362ddcf Mon Sep 17 00:00:00 2001 From: Cole Gerdemann Date: Sat, 9 Dec 2023 12:36:49 -0500 Subject: [PATCH 4/6] remove networksubtype --- spec/Vehicle/Connectivity.vspec | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/spec/Vehicle/Connectivity.vspec b/spec/Vehicle/Connectivity.vspec index c81c96b17..4d94d6358 100644 --- a/spec/Vehicle/Connectivity.vspec +++ b/spec/Vehicle/Connectivity.vspec @@ -66,13 +66,7 @@ Cellular.NetworkType: ] description: Type of cellular network that is currently in-use. comment: There are a lot of subtypes that fall under the general '~G' types, but these aren't expanded upon here. - -Cellular.NetworkSubtype: - datatype: string - type: sensor - description: Cellular network technology that is currently in-use. - comment: For example, LTE and WiMAX both fall under the '4G' umbrella but are substantially different. - + Cellular.Carrier: datatype: string type: sensor From 4def5268ec40c136688f22525cbbd85c12c9237c Mon Sep 17 00:00:00 2001 From: Cole Gerdemann Date: Sat, 9 Dec 2023 12:37:18 -0500 Subject: [PATCH 5/6] change cyclereset to cyclestart --- spec/Vehicle/Connectivity.vspec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/Vehicle/Connectivity.vspec b/spec/Vehicle/Connectivity.vspec index 4d94d6358..7a4a939d0 100644 --- a/spec/Vehicle/Connectivity.vspec +++ b/spec/Vehicle/Connectivity.vspec @@ -98,12 +98,12 @@ Cellular.DataUsage.CycleLength: description: Length of a data cycle. comment: Defines the period where the current data usage is relevant. -Cellular.DataUsage.CycleReset: +Cellular.DataUsage.CycleStart: type: attribute - unit: day - datatype: uint16 + unit: iso8601 + datatype: string min: 0 - description: Time until the next data cycle starts. + description: Time the current data cycle started at. WiFi: type: branch From 8741912547241a2edab04496f78b9196a09873eb Mon Sep 17 00:00:00 2001 From: Cole Gerdemann Date: Sat, 9 Dec 2023 12:37:30 -0500 Subject: [PATCH 6/6] Rename WIFI to WLAN --- spec/Vehicle/Connectivity.vspec | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/spec/Vehicle/Connectivity.vspec b/spec/Vehicle/Connectivity.vspec index 7a4a939d0..db00b14b1 100644 --- a/spec/Vehicle/Connectivity.vspec +++ b/spec/Vehicle/Connectivity.vspec @@ -29,7 +29,7 @@ ConnectivityType: type: attribute allowed: [ 'CELLULAR', - 'WIFI' + 'WLAN' ] description: Type of connectivity currently available. @@ -54,6 +54,14 @@ Cellular.SignalStrength: datatype: int8 unit: dBm description: Cellular connectivity signal strength. + +Cellular.SignalStrength.Relative: + type: sensor + datatype: uint8 + unit: percent + min: 0 + max: 100 + description: Cellular connectivity signal strength in percent. Cellular.NetworkType: datatype: string[] @@ -105,23 +113,31 @@ Cellular.DataUsage.CycleStart: min: 0 description: Time the current data cycle started at. -WiFi: +WLAN: type: branch description: Properties related to WiFi connectivity. -WiFi.SignalStrength: +WLAN.SignalStrength: type: sensor datatype: int8 unit: dBm max: 0 description: WiFi connectivity signal strength. -WiFi.SSID: +WLAN.SignalStrength.Relative: + type: sensor + datatype: uint8 + unit: percent + min: 0 + max: 100 + description: WiFi connectivity signal strength in percent. + +WLAN.SSID: type: sensor datatype: string description: SSID of connected WiFi network. -WiFi.NetworkType: +WLAN.NetworkType: datatype: string[] type: sensor allowed: [ @@ -136,8 +152,9 @@ WiFi.NetworkType: '7' ] description: Type of WiFi network that is currently in-use. + comment: Defined as IEEE 802.11 generations, see https://en.wikipedia.org/wiki/Template:Wi-Fi_generations. -WiFi.IsMetered: +WLAN.IsMetered: datatype: boolean type: sensor description: Indicates if the WiFi connectivity is metered.