From 1e49305b84161b73a1211815329af0087f557d2d Mon Sep 17 00:00:00 2001 From: Peyman Mohtashami Date: Thu, 17 Oct 2024 16:48:48 +0200 Subject: [PATCH] Add sensorkit schema and specification --- .../passive/apple/ios/ios_magnetic_field.avsc | 13 ++ .../sensorkit/sensorkit_acceleration.avsc | 5 +- .../sensorkit/sensorkit_ambient_light.avsc | 13 +- .../sensorkit/sensorkit_ambient_pressure.avsc | 13 ++ .../sensorkit/sensorkit_device_usage.avsc | 19 +++ .../sensorkit/sensorkit_keyboard_metrics.avsc | 18 +++ .../sensorkit/sensorkit_message_usage.avsc | 5 +- .../sensorkit/sensorkit_on_wrist.avsc | 5 +- .../sensorkit/sensorkit_pedometer.avsc | 15 +- .../sensorkit/sensorkit_phone_usage.avsc | 5 +- .../sensorkit/sensorkit_rotation_rate.avsc | 14 ++ .../sensorkit_telephony_speech_metrics.avsc | 28 ++++ .../sensorkit/sensorkit_visits.avsc | 5 +- .../sensorkit/sensorkit_device_usage.avsc | 144 ------------------ .../passive/apple_sensorkit-1.0.0.yml | 68 +++++++++ .../passive/ios-sensorkit_1.0.0.yml | 30 ---- 16 files changed, 203 insertions(+), 197 deletions(-) create mode 100644 commons/passive/apple/ios/ios_magnetic_field.avsc rename commons/passive/{ => apple}/sensorkit/sensorkit_acceleration.avsc (82%) rename commons/passive/{ => apple}/sensorkit/sensorkit_ambient_light.avsc (50%) create mode 100644 commons/passive/apple/sensorkit/sensorkit_ambient_pressure.avsc create mode 100644 commons/passive/apple/sensorkit/sensorkit_device_usage.avsc create mode 100644 commons/passive/apple/sensorkit/sensorkit_keyboard_metrics.avsc rename commons/passive/{ => apple}/sensorkit/sensorkit_message_usage.avsc (82%) rename commons/passive/{ => apple}/sensorkit/sensorkit_on_wrist.avsc (89%) rename commons/passive/{ => apple}/sensorkit/sensorkit_pedometer.avsc (69%) rename commons/passive/{ => apple}/sensorkit/sensorkit_phone_usage.avsc (83%) create mode 100644 commons/passive/apple/sensorkit/sensorkit_rotation_rate.avsc create mode 100644 commons/passive/apple/sensorkit/sensorkit_telephony_speech_metrics.avsc rename commons/passive/{ => apple}/sensorkit/sensorkit_visits.avsc (90%) delete mode 100644 commons/passive/sensorkit/sensorkit_device_usage.avsc create mode 100644 specifications/passive/apple_sensorkit-1.0.0.yml delete mode 100644 specifications/passive/ios-sensorkit_1.0.0.yml diff --git a/commons/passive/apple/ios/ios_magnetic_field.avsc b/commons/passive/apple/ios/ios_magnetic_field.avsc new file mode 100644 index 00000000..d8df213a --- /dev/null +++ b/commons/passive/apple/ios/ios_magnetic_field.avsc @@ -0,0 +1,13 @@ +{ + "namespace": "org.radarcns.passive.apple.ios", + "type": "record", + "name": "IosMagneticField", + "doc": "Data from the 3-axis magnetometer.", + "fields": [ + { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, + { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, + { "name": "x", "type": "float", "doc": "Magnetic field in the x-axis (μT)." }, + { "name": "y", "type": "float", "doc": "Magnetic field in the y-axis (μT)." }, + { "name": "z", "type": "float", "doc": "Magnetic field in the z-axis (μT)." } + ] +} diff --git a/commons/passive/sensorkit/sensorkit_acceleration.avsc b/commons/passive/apple/sensorkit/sensorkit_acceleration.avsc similarity index 82% rename from commons/passive/sensorkit/sensorkit_acceleration.avsc rename to commons/passive/apple/sensorkit/sensorkit_acceleration.avsc index f4f38ec9..f8c6b4e9 100644 --- a/commons/passive/sensorkit/sensorkit_acceleration.avsc +++ b/commons/passive/apple/sensorkit/sensorkit_acceleration.avsc @@ -1,11 +1,12 @@ { - "namespace": "org.radarcns.passive.phone", - "type": "record", + "namespace": "org.radarcns.passive.apple.sensorkit", "name": "SensorKitAcceleration", + "type": "record", "doc": "Data from 3-axis accelerometer sensor with gravitational constant g as unit.", "fields": [ { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, + { "name": "device", "type": "string", "doc": "Device model." }, { "name": "x", "type": "float", "doc": "Acceleration in the x-axis (g)." }, { "name": "y", "type": "float", "doc": "Acceleration in the y-axis (g)." }, { "name": "z", "type": "float", "doc": "Acceleration in the z-axis (g)." } diff --git a/commons/passive/sensorkit/sensorkit_ambient_light.avsc b/commons/passive/apple/sensorkit/sensorkit_ambient_light.avsc similarity index 50% rename from commons/passive/sensorkit/sensorkit_ambient_light.avsc rename to commons/passive/apple/sensorkit/sensorkit_ambient_light.avsc index 629340ac..f1d5a3f2 100644 --- a/commons/passive/sensorkit/sensorkit_ambient_light.avsc +++ b/commons/passive/apple/sensorkit/sensorkit_ambient_light.avsc @@ -1,19 +1,20 @@ { - "namespace": "org.radarcns.passive.phone", + "namespace": "org.radarcns.passive.apple.sensorkit", "type": "record", "name": "SensorKitAmbientLight", "doc": "Data describes the amount of ambient light in the user’s environment.", "fields": [ - { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, - { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, - { "name": "chromaticityX", "type": "float", "doc": "x-value of the coordinate pair that describes the light brightness and tint." }, + { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, + { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, + { "name": "device", "type": "string", "doc": "Device model." }, + { "name": "chromaticityX", "type": "float", "doc": "x-value of the coordinate pair that describes the light brightness and tint." }, { "name": "chromaticityY", "type": "float", "doc": "y-value of the coordinate pair that describes the light brightness and tint." }, { "name": "lux", "type": "float", "doc": "Illuminance (lx)." }, { "name": "placement", "type": { "name": "SensorPlacement", "type": "enum", "doc": "Directional values that describe light-source location with respect to the sensor.", - "symbols": ["frontBottom", "frontBottomLeft", "frontBottomRight", "frontLeft", "frontRight", "frontTop", "frontTopLeft", "frontTopRight", "unknown"] - }, "doc": "The light’s location relative to the sensor.", "default": "UNKNOWN"}, + "symbols": ["FRONT_BOTTOM", "FRONT_BOTTOM_LEFT", "FRONT_BOTTOM_RIGHT", "FRONT_LEFT", "FRONT_RIGHT", "FRONT_TOP", "FRONT_TOP_LEFT", "FRONT_TOP_RIGHT", "UNKNOWN"] + }, "doc": "The light’s location relative to the sensor.", "default": "UNKNOWN"} ] } diff --git a/commons/passive/apple/sensorkit/sensorkit_ambient_pressure.avsc b/commons/passive/apple/sensorkit/sensorkit_ambient_pressure.avsc new file mode 100644 index 00000000..31877d57 --- /dev/null +++ b/commons/passive/apple/sensorkit/sensorkit_ambient_pressure.avsc @@ -0,0 +1,13 @@ +{ + "namespace": "org.radarcns.passive.apple.sensorkit", + "type": "record", + "name": "SensorKitAmbientPressure", + "doc": "A measurement of the ambient pressure and temperature.", + "fields": [ + { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, + { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, + { "name": "device", "type": "string", "doc": "Device model." }, + { "name": "pressure", "type": "double", "doc": "The ambient pressure (Pascal)." }, + { "name": "temperature", "type": "double", "doc": "The temperature (Celsius)." } + ] +} diff --git a/commons/passive/apple/sensorkit/sensorkit_device_usage.avsc b/commons/passive/apple/sensorkit/sensorkit_device_usage.avsc new file mode 100644 index 00000000..760a0224 --- /dev/null +++ b/commons/passive/apple/sensorkit/sensorkit_device_usage.avsc @@ -0,0 +1,19 @@ +{ + "namespace": "org.radarcns.passive.apple.sensorkit", + "type": "record", + "name": "SensorKitDeviceUsage", + "doc": "Describes the frequency and relative duration that the user uses their device, particular Apple apps, or websites.", + "fields": [ + { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, + { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, + { "name": "device", "type": "string", "doc": "Device model." }, + { "name": "duration", "type": "double", "doc": "The duration that the report spans (s)." }, + { "name": "totalScreenWakes", "type": "int", "doc": "The total number of screen wakes for the device." }, + { "name": "totalUnlocks", "type": "int", "doc": "The total number of unlocks for the device." }, + { "name": "totalUnlockDuration", "type": "double", "doc": " The duration of time the device is in an unlocked state (s)." }, + { "name": "version", "type": "string", "doc": "Version" }, + { "name": "applicationUsageByCategory", "type": "string", "doc": "The usage time of apps per category." }, + { "name": "notificationUsageByCategory", "type": "string", "doc": "The frequency of notifications per category." }, + { "name": "webUsageByCategory", "type": "string", "doc": "The amount of time the user accesses domains per category." } + ] +} diff --git a/commons/passive/apple/sensorkit/sensorkit_keyboard_metrics.avsc b/commons/passive/apple/sensorkit/sensorkit_keyboard_metrics.avsc new file mode 100644 index 00000000..c8963d06 --- /dev/null +++ b/commons/passive/apple/sensorkit/sensorkit_keyboard_metrics.avsc @@ -0,0 +1,18 @@ +{ + "namespace": "org.radarcns.passive.apple.sensorkit", + "type": "record", + "name": "SensorKitKeyboardMetrics", + "doc": "Data that describes the configuration of a device’s keyboard and its usage patterns.", + "fields": [ + { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, + { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, + { "name": "device", "type": "string", "doc": "Device model." }, + { "name": "totalWords", "type": "int", "doc": "The total number of typed words for the keyboard." }, + { "name": "totalAlteredWords", "type": "int", "doc": "The total number of altered words for the keyboard." }, + { "name": "totalTaps", "type": "int", "doc": "The total number of taps for the keyboard." }, + { "name": "totalEmojis", "type": "int", "doc": "The total number of emojis for the keyboard." }, + { "name": "totalTypingDuration", "type": "double", "doc": "The total amount of typing time for the keyboard." }, + { "name": "totalPauses", "type": "int", "doc": "The total number of pauses during the session." }, + { "name": "totalTypingEpisodes", "type": "int", "doc": "The total number of continuous typing episodes during the session." } + ] +} diff --git a/commons/passive/sensorkit/sensorkit_message_usage.avsc b/commons/passive/apple/sensorkit/sensorkit_message_usage.avsc similarity index 82% rename from commons/passive/sensorkit/sensorkit_message_usage.avsc rename to commons/passive/apple/sensorkit/sensorkit_message_usage.avsc index 937053ed..92e06ce7 100644 --- a/commons/passive/sensorkit/sensorkit_message_usage.avsc +++ b/commons/passive/apple/sensorkit/sensorkit_message_usage.avsc @@ -1,14 +1,15 @@ { - "namespace": "org.radarcns.passive.phone", + "namespace": "org.radarcns.passive.apple.sensorkit", "type": "record", "name": "SensorKitMessageUsage", "doc": "Data that describes the user’s Messages app activity over a period of time.", "fields": [ { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, + { "name": "device", "type": "string", "doc": "Device model." }, { "name": "duration", "type": "double", "doc": "The duration that the report spans (s)." }, { "name": "totalIncomingMessages", "type": "int", "doc": "The number of messages the user receives." }, { "name": "totalOutgoingMessages", "type": "int", "doc": "The number of messages the user sends." }, - { "name": "totalUniqueContacts", "type": "int", "doc": "The user’s number of contacts." }, + { "name": "totalUniqueContacts", "type": "int", "doc": "The user’s number of contacts." } ] } diff --git a/commons/passive/sensorkit/sensorkit_on_wrist.avsc b/commons/passive/apple/sensorkit/sensorkit_on_wrist.avsc similarity index 89% rename from commons/passive/sensorkit/sensorkit_on_wrist.avsc rename to commons/passive/apple/sensorkit/sensorkit_on_wrist.avsc index c4c5c7c5..2e5ab475 100644 --- a/commons/passive/sensorkit/sensorkit_on_wrist.avsc +++ b/commons/passive/apple/sensorkit/sensorkit_on_wrist.avsc @@ -1,11 +1,12 @@ { - "namespace": "org.radarcns.passive.phone", + "namespace": "org.radarcns.passive.apple.sensorkit", "type": "record", "name": "SensorKitOnWrist", "doc": "Data about the configuration of a watch on the wearer’s wrist.", "fields": [ { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, + { "name": "device", "type": "string", "doc": "Device model." }, { "name": "crownOrientation", "type": { "name": "CrownOrientation", "type": "enum", @@ -20,6 +21,6 @@ "symbols": ["LEFT", "RIGHT"] }, "doc": "A value that indicates the wrist where the user wears the watch." }, { "name": "offWristDate", "type": "double", "doc": "Off Wrist Date timestamp in UTC (s)." }, - { "name": "onWristDate", "type": "double", "doc": "On Wrist Date timestamp in UTC (s)." }, + { "name": "onWristDate", "type": "double", "doc": "On Wrist Date timestamp in UTC (s)." } ] } diff --git a/commons/passive/sensorkit/sensorkit_pedometer.avsc b/commons/passive/apple/sensorkit/sensorkit_pedometer.avsc similarity index 69% rename from commons/passive/sensorkit/sensorkit_pedometer.avsc rename to commons/passive/apple/sensorkit/sensorkit_pedometer.avsc index 0ff037d4..5d479e75 100644 --- a/commons/passive/sensorkit/sensorkit_pedometer.avsc +++ b/commons/passive/apple/sensorkit/sensorkit_pedometer.avsc @@ -1,19 +1,20 @@ { - "namespace": "org.radarcns.passive.phone", + "namespace": "org.radarcns.passive.apple.sensorkit", "type": "record", "name": "SensorKitPedometer", "doc": "Data about the distance traveled by a user on foot.", "fields": [ {"name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, {"name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, + { "name": "device", "type": "string", "doc": "Device model." }, {"name": "startDate", "type": "double", "doc": "The start time for the pedometer data timestamp in UTC (s)." }, {"name": "endDate", "type": "double", "doc": "The end time for the pedometer data timestamp in UTC (s)." }, - {"name": "numberOfSteps", "type": "int", "doc": "Number of steps taken between this and the previous record." } - {"name": "distance", "type": "double", "doc": "The estimated distance (in meters) traveled by the user." } - {"name": "averageActivePace", "type": "double", "doc": "The average pace of the user, measured in seconds per meter." } - {"name": "currentPace", "type": "double", "doc": "The current pace of the user, measured in seconds per meter." } - {"name": "currentCadence", "type": "double", "doc": "The rate at which steps are taken, measured in steps per second." } - {"name": "floorsAscended", "type": "int", "doc": "The approximate number of floors ascended by walking." } + {"name": "numberOfSteps", "type": "int", "doc": "Number of steps taken between this and the previous record." }, + {"name": "distance", "type": "double", "doc": "The estimated distance (in meters) traveled by the user." }, + {"name": "averageActivePace", "type": "double", "doc": "The average pace of the user, measured in seconds per meter." }, + {"name": "currentPace", "type": "double", "doc": "The current pace of the user, measured in seconds per meter." }, + {"name": "currentCadence", "type": "double", "doc": "The rate at which steps are taken, measured in steps per second." }, + {"name": "floorsAscended", "type": "int", "doc": "The approximate number of floors ascended by walking." }, {"name": "floorsDescended", "type": "int", "doc": "The approximate number of floors descended by walking." } ] } diff --git a/commons/passive/sensorkit/sensorkit_phone_usage.avsc b/commons/passive/apple/sensorkit/sensorkit_phone_usage.avsc similarity index 83% rename from commons/passive/sensorkit/sensorkit_phone_usage.avsc rename to commons/passive/apple/sensorkit/sensorkit_phone_usage.avsc index e041a631..13f12d5c 100644 --- a/commons/passive/sensorkit/sensorkit_phone_usage.avsc +++ b/commons/passive/apple/sensorkit/sensorkit_phone_usage.avsc @@ -1,15 +1,16 @@ { - "namespace": "org.radarcns.passive.phone", + "namespace": "org.radarcns.passive.apple.sensorkit", "type": "record", "name": "SensorKitPhoneUsage", "doc": "Data that describes the user’s phone activity over a period of time.", "fields": [ { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, + { "name": "device", "type": "string", "doc": "Device model." }, { "name": "duration", "type": "double", "doc": "The duration that the report spans (s)." }, { "name": "totalIncomingCalls", "type": "int", "doc": "The number of calls the user receives." }, { "name": "totalOutgoingCalls", "type": "int", "doc": "The number of calls the user makes." }, { "name": "totalPhoneCallDuration", "type": "double", "doc": "The total duration of all calls. (s)" }, - { "name": "totalUniqueContacts", "type": "int", "doc": "The user’s number of contacts." }, + { "name": "totalUniqueContacts", "type": "int", "doc": "The user’s number of contacts." } ] } diff --git a/commons/passive/apple/sensorkit/sensorkit_rotation_rate.avsc b/commons/passive/apple/sensorkit/sensorkit_rotation_rate.avsc new file mode 100644 index 00000000..e4695225 --- /dev/null +++ b/commons/passive/apple/sensorkit/sensorkit_rotation_rate.avsc @@ -0,0 +1,14 @@ +{ + "namespace": "org.radarcns.passive.apple.sensorkit", + "name": "SensorKitRotationRate", + "type": "record", + "doc": "Data from the 3-axis gyroscope sensor (rotation-rate).", + "fields": [ + { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, + { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, + { "name": "device", "type": "string", "doc": "Device model." }, + { "name": "x", "type": "float", "doc": "Gyration in the x-axis (rad/s)." }, + { "name": "y", "type": "float", "doc": "Gyration in the y-axis (rad/s)." }, + { "name": "z", "type": "float", "doc": "Gyration in the z-axis (rad/s)." } + ] +} diff --git a/commons/passive/apple/sensorkit/sensorkit_telephony_speech_metrics.avsc b/commons/passive/apple/sensorkit/sensorkit_telephony_speech_metrics.avsc new file mode 100644 index 00000000..2dbc275c --- /dev/null +++ b/commons/passive/apple/sensorkit/sensorkit_telephony_speech_metrics.avsc @@ -0,0 +1,28 @@ +{ + "namespace": "org.radarcns.passive.apple.sensorkit", + "type": "record", + "name": "SensorKitTelephonySpeechMetrics", + "doc": "Describes the metrics about a range of speech.", + "fields": [ + { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, + { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, + { "name": "device", "type": "string", "doc": "Device model." }, + + { "name": "audioLevelStart", "type": ["null", "double"], "doc": "The start time of the time range in the audio stream that the level applies to, in seconds relative to time (s)." }, + { "name": "audioLevelDuration", "type": ["null", "double"], "doc": "The duration of the time range in the audio stream that the level applies to (s)." }, + { "name": "audioLevelLoudness", "type": ["null", "double"], "doc": "The measure of the audio level in decibels." }, + + { "name": "soundClassificationStart", "type": ["null", "double"], "doc": "The start time of the time span that corresponds to the result’s classifications, in seconds relative to time (s)." }, + { "name": "soundClassificationDuration", "type": ["null", "double"], "doc": "The duration of the time span that corresponds to the result’s classifications (s)." }, + { "name": "soundClassification", "type": ["null", "string"], "doc": "The confidence value the model has in its prediction." }, + + { "name": "speechExpressionStart", "type": ["null", "double"], "doc": "The start time of the time range in the audio stream that the metrics and analytics apply to, in seconds relative to time (s)." }, + { "name": "speechExpressionDuration", "type": ["null", "double"], "doc": "The duration of the time range in the audio stream that the metrics and analytics apply to (s)." }, + { "name": "speechExpressionActivation", "type": ["null", "double"], "doc": "The level of energy or activation of the speaker." }, + { "name": "speechExpressionConfidence", "type": ["null", "double"], "doc": "The level of confidence of the speaker." }, + { "name": "speechExpressionDominance", "type": ["null", "double"], "doc": "The degree of how strong or meek the speaker sounds." }, + { "name": "speechExpressionMood", "type": ["null", "double"], "doc": "An indication of how slurry, tired, or exhausted the speaker sounds compared to normal speech." }, + { "name": "speechExpressionValence", "type": ["null", "double"], "doc": "The degree of positive or negative emotion or sentiment of the speaker." } + + ] +} diff --git a/commons/passive/sensorkit/sensorkit_visits.avsc b/commons/passive/apple/sensorkit/sensorkit_visits.avsc similarity index 90% rename from commons/passive/sensorkit/sensorkit_visits.avsc rename to commons/passive/apple/sensorkit/sensorkit_visits.avsc index 1bf7253e..a30e3527 100644 --- a/commons/passive/sensorkit/sensorkit_visits.avsc +++ b/commons/passive/apple/sensorkit/sensorkit_visits.avsc @@ -1,11 +1,12 @@ { - "namespace": "org.radarcns.passive.phone", + "namespace": "org.radarcns.passive.apple.sensorkit", "type": "record", "name": "SensorKitVisits", "doc": "The user’s progress in their daily travel routine.", "fields": [ { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, + { "name": "device", "type": "string", "doc": "Device model." }, { "name": "identifier", "type": "string", "doc": "A value that maps to a unique geographic location." }, { "name": "arrivalDateIntervalStart", "type": "double", "doc": "The start date of a range of time within which the user arrives at a location of interest timestamp in UTC (s)." }, { "name": "arrivalDateIntervalEnd", "type": "double", "doc": "The end date of a range of time within which the user arrives at a location of interest timestamp in UTC (s)." }, @@ -19,6 +20,6 @@ "type": "enum", "doc": "Types of locations.", "symbols": ["GYM", "HOME", "SCHOOL", "WORK", "UNKNOWN"] - }, "doc": "The location’s type.", "default": "UNKNOWN"}, + }, "doc": "The location’s type.", "default": "UNKNOWN"} ] } diff --git a/commons/passive/sensorkit/sensorkit_device_usage.avsc b/commons/passive/sensorkit/sensorkit_device_usage.avsc deleted file mode 100644 index 5b23a88c..00000000 --- a/commons/passive/sensorkit/sensorkit_device_usage.avsc +++ /dev/null @@ -1,144 +0,0 @@ -{ - "namespace": "###org.radarcns.passive.phone", - "type": "record", - "name": "SensorKitDeviceUsage", - "doc": "###Event for closing or opening an app.", - "fields": [ - { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, - { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, - { "name": "duration", "type": "double", "doc": "The duration that the report spans (s)." }, - { "name": "totalScreenWakes", "type": "int", "doc": "The total number of screen wakes for the device." }, - { "name": "totalUnlocks", "type": "int", "doc": "The total number of unlocks for the device." }, - { "name": "totalUnlockDuration", "type": "double", "doc": " The duration of time the device is in an unlocked state (s)." }, - { - "name": "applicationUsageByCategory", - "type": { - "name": "UsageEventType", - "type": "enum", - "doc": "Android activity usage event type.", - "symbols": ["FOREGROUND", "BACKGROUND", "CONFIG", "SHORTCUT", "INTERACTION", "OTHER", "UNKNOWN"] - }, - "doc": "Whether the event brought app to foreground or background or neither.", - "default": "UNKNOWN" - } - - - var applicationUsageByCategory: [SRDeviceUsageReport.CategoryKey : [SRDeviceUsageReport.ApplicationUsage]] - The usage time of apps per category. - --- - class SRDeviceUsageReport.ApplicationUsage - An object that describes the user’s app activity over a period of time. - - Identifying the App - var bundleIdentifier: String? - The bundle identifier of the app in use. - var reportApplicationIdentifier: String - A pseudonymn for a real application identifier. - Timing App Use - var usageTime: TimeInterval - The amount of time the user uses the app. - - Inspecting Text Input - var textInputSessions: [SRTextInputSession] - The text input session types that occur during application usage. - - class SRTextInputSession - The characters a user types for a particular keyboard. - - Instance Properties - var relativeStartTime: TimeInterval - var supplementalCategories: [SRSupplementalCategory] - --- - struct SRDeviceUsageReport.CategoryKey - Categories of apps or websites that the user uses. - - Categories - static let books: SRDeviceUsageReport.CategoryKey - An app category for reading books. - static let business: SRDeviceUsageReport.CategoryKey - An app category for doing business. - static let catalogs: SRDeviceUsageReport.CategoryKey - An app category for reading catalogs. - static let developerTools: SRDeviceUsageReport.CategoryKey - An app category for creating apps. - static let education: SRDeviceUsageReport.CategoryKey - An app category for learning. - static let entertainment: SRDeviceUsageReport.CategoryKey - An app category for entertainment. - static let finance: SRDeviceUsageReport.CategoryKey - An app category for finance. - static let foodAndDrink: SRDeviceUsageReport.CategoryKey - An app category for dining. - static let games: SRDeviceUsageReport.CategoryKey - An app category for gaming. - static let graphicsAndDesign: SRDeviceUsageReport.CategoryKey - An app category for graphic design. - static let healthAndFitness: SRDeviceUsageReport.CategoryKey - An app category for health and fitness. - static let kids: SRDeviceUsageReport.CategoryKey - An app category for children. - static let lifestyle: SRDeviceUsageReport.CategoryKey - An app category for lifestyle. - static let medical: SRDeviceUsageReport.CategoryKey - An app category for healthcare. - static let miscellaneous: SRDeviceUsageReport.CategoryKey - An app category for miscellaneous apps. - static let music: SRDeviceUsageReport.CategoryKey - An app category for music. - static let navigation: SRDeviceUsageReport.CategoryKey - An app category for navigation. - static let news: SRDeviceUsageReport.CategoryKey - An app category for news. - static let newsstand: SRDeviceUsageReport.CategoryKey - An app category for Apple News. - static let photoAndVideo: SRDeviceUsageReport.CategoryKey - An app category for photography and film. - static let productivity: SRDeviceUsageReport.CategoryKey - An app category for productivity. - static let reference: SRDeviceUsageReport.CategoryKey - An app category for reference. - static let shopping: SRDeviceUsageReport.CategoryKey - An app category for shopping. - static let socialNetworking: SRDeviceUsageReport.CategoryKey - An app category for social networking. - static let sports: SRDeviceUsageReport.CategoryKey - An app category for sports. - static let stickers: SRDeviceUsageReport.CategoryKey - An app category for stickers. - static let travel: SRDeviceUsageReport.CategoryKey - An app category for travel. - static let utilities: SRDeviceUsageReport.CategoryKey - An app category for utilities. - static let weather: SRDeviceUsageReport.CategoryKey - An app category for weather. - - - - - - - { "name": "packageName", "type": "string", "doc": "Package name of the launched app." }, - { "name": "categoryName", "type": ["null", "string"], "doc": "App category as given by the play store, null if a category is not listed or unable to be fetched.", "default": null }, - { "name": "categoryNameFetchTime", "type": ["null", "double"], "doc": "Timestamp in UTC when the category was attempted to fetch from the play store (s), null if not fetched.", "default": null }, - { "name": "eventType", "type": { - "name": "UsageEventType", - "type": "enum", - "doc": "Android activity usage event type.", - "symbols": ["FOREGROUND", "BACKGROUND", "CONFIG", "SHORTCUT", "INTERACTION", "OTHER", "UNKNOWN"] - }, "doc": "Whether the event brought app to foreground or background or neither.", "default": "UNKNOWN" } - ] - } - - - - { "name": "packageName", "type": "string", "doc": "Package name of the launched app." }, - { "name": "categoryName", "type": ["null", "string"], "doc": "App category as given by the play store, null if a category is not listed or unable to be fetched.", "default": null }, - { "name": "categoryNameFetchTime", "type": ["null", "double"], "doc": "Timestamp in UTC when the category was attempted to fetch from the play store (s), null if not fetched.", "default": null }, - { "name": "eventType", "type": { - "name": "UsageEventType", - "type": "enum", - "doc": "Android activity usage event type.", - "symbols": ["FOREGROUND", "BACKGROUND", "CONFIG", "SHORTCUT", "INTERACTION", "OTHER", "UNKNOWN"] - }, "doc": "Whether the event brought app to foreground or background or neither.", "default": "UNKNOWN" } - ] -} diff --git a/specifications/passive/apple_sensorkit-1.0.0.yml b/specifications/passive/apple_sensorkit-1.0.0.yml new file mode 100644 index 00000000..dddf3838 --- /dev/null +++ b/specifications/passive/apple_sensorkit-1.0.0.yml @@ -0,0 +1,68 @@ +#====================================== Apple SensorKit =====================================# +name: apple-sensorkit +vendor: Apple +model: SensorKit +version: 1.0.0 +doc: "Apple SensorKit integration" +data: + - type: ACCELERATION + topic: sensorkit_acceleration + value_schema: .passive.apple.sensorkit.SensorKitAcceleration + sample_rate: + dynamic: true + - type: GYROSCOPE + topic: sensorkit_rotation_rate + value_schema: .passive.apple.sensorkit.SensorKitRotationRate + sample_rate: + dynamic: true + unit: RADAIAN_PER_SEC + - type: AMBIENT_LIGHT + topic: sensorkit_ambient_light + value_schema: .passive.apple.sensorkit.SensorKitAmbientLight + sample_rate: + dynamic: true + - type: AMBIENT_PRESSURE + topic: sensorkit_ambient_pressure + value_schema: .passive.apple.sensorkit.SensorKitAmbientPressure + sample_rate: + dynamic: true + - type: KEYBOARD_METRICS + topic: sensorkit_keyboard_metrics + value_schema: .passive.apple.sensorkit.SensorKitKeyboardMetrics + sample_rate: + dynamic: true + - type: MESSAGE_USAGE + topic: sensorkit_message_usage + value_schema: .passive.apple.sensorkit.SensorKitMessageUsage + sample_rate: + dynamic: true + - type: ON_WRIST + topic: sensorkit_on_wrist + value_schema: .passive.apple.sensorkit.SensorKitOnWrist + sample_rate: + dynamic: true + - type: PEDOMETER + topic: sensorkit_pedometer + value_schema: .passive.apple.sensorkit.SensorKitPedometer + sample_rate: + dynamic: true + - type: PHONE_USAGE + topic: sensorkit_phone_usage + value_schema: .passive.apple.sensorkit.SensorKitPhoneUsage + sample_rate: + dynamic: true + - type: VISITS + topic: sensorkit_visits + value_schema: .passive.apple.sensorkit.SensorKitVisits + sample_rate: + dynamic: true + - type: DEVICE_USAGE + topic: sensorkit_device_usage + value_schema: .passive.apple.sensorkit.SensorKitDeviceUsage + sample_rate: + dynamic: true + - type: TELEPHONY_SPEECH_METRICS + topic: sensorkit_telephony_speech_metrics + value_schema: .passive.apple.sensorkit.SensorKitTelephonySpeechMetrics + sample_rate: + dynamic: true diff --git a/specifications/passive/ios-sensorkit_1.0.0.yml b/specifications/passive/ios-sensorkit_1.0.0.yml deleted file mode 100644 index fb4f4daa..00000000 --- a/specifications/passive/ios-sensorkit_1.0.0.yml +++ /dev/null @@ -1,30 +0,0 @@ -#====================================== Apple SensorKit =====================================# -name: apple-sensorkit -vendor: Apple -model: SensorKit -version: 1.0.0 -doc: -data: - - type: ACCELEROMETER - topic: sensorkit_acceleration - doc: - - type: LIGHT - topic: sensorkit_ambient_light - doc: - - type: STEP_COUNT - topic: sensorkit_pedometer - - type: RELATIVE_LOCATION - topic: android_phone_relative_location - - type: PHONE_CALL - topic: android_phone_call - - type: PHONE_SMS - topic: android_phone_sms - - type: PHONE_SMS_UNREAD - topic: android_phone_sms_unread - - type: USAGE_EVENT - app_provider: .phone.PhoneUsageProvider - processing_state: RAW - topic: android_phone_usage_event - value_schema: .passive.phone.PhoneUsageEvent - sample_rate: - dynamic: true