-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #336 from this-Aditya/google-sleep
Schemas added for google sleep APIs
- Loading branch information
Showing
3 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"namespace": "org.radarcns.passive.google", | ||
"type": "record", | ||
"name": "GoogleSleepClassifyEvent", | ||
"doc": "Sleep classification event that indicates that the user is probably sleeping. Includes sleep confidence, device motion and ambient light level.", | ||
"fields": [ | ||
{ "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, | ||
{ "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, | ||
{ "name": "sleepConfidence", "type": "float", "doc": "Sleep confidence value between 0-1. Higher value indicate that the user is more likely sleeping, while lower values indicate that the user is more likely awake." }, | ||
{ "name": "light", "type": "int", "doc": "The brightness of the space around the device, based on the device's ambient light sensor readings. Value ranges from 1 to 6, inclusive. Higher values indicate brighter surroundings, while lower values indicate darker surroundings." }, | ||
{ "name": "motion", "type": "int", "doc": "The amount of device motion, based on the device's accelerometer readings. Value ranges from 1 to 6, inclusive. Higher values indicate more movement of the device." } | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"namespace": "org.radarcns.passive.google", | ||
"type": "record", | ||
"name": "GoogleSleepSegmentEvent", | ||
"doc": "Represents the result of sleep data after the user is awake.", | ||
"fields": [ | ||
{ "name": "time", "type": "double", "doc": "The UNIX epoch time (s) for the moment when the user goes to sleep." }, | ||
{ "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, | ||
{ "name": "endTime", "type": "double", "doc": "The UNIX epoch time (s) for the moment when the user wakes up." }, | ||
{ "name": "status", "type": { | ||
"name": "SleepClassificationStatus", | ||
"type": "enum", | ||
"doc": "The status of the sleep segment detection. \nSUCCESSFUL indicates successful detection of sleep segment in the past day.\nNOT_DETECTED indicates Sleep segment is not detected in the past day, or there isn't enough confidence that the user slept during the past day. This could happen for a variety of reasons, including the following: too much missing data, the user sleeps with the light, the user interacts with their device often, or the user's device doesn't support the sensors needed for sleep detection. \nMISSING_DATA indicates sleep segment was detected, but there was some missing data near the detected sleep segment. This could happen for a variety of reasons, including the following: the user turned off their device, the user delayed logging into their device after a system reboot or system upgrade, or an event occurred that paused the detection.", | ||
"symbols": ["SUCCESSFUL", "MISSING_DATA", "NOT_DETECTED", "UNKNOWN"] | ||
}, "doc": "Status that indicates whether the system succeeded in detecting sleep.", "default": "UNKNOWN" } | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#======================================== Google APIs =============================================# | ||
vendor: GOOGLE | ||
model: SLEEP | ||
version: 1.0.0 | ||
data: | ||
#Google Sleep | ||
- type: SLEEP_SEGMENT_EVENT | ||
app_provider: .google.GoogleSleepProvider | ||
unit: NON_DIMENSIONAL | ||
processing_state: RAW | ||
topic: android_google_sleep_segment_event | ||
value_schema: .passive.google.GoogleSleepSegmentEvent | ||
sample_rate: | ||
dynamic: true | ||
- type: SLEEP_CLASSIFY_EVENT | ||
app_provider: .google.GoogleSleepProvider | ||
unit: NON_DIMENSIONAL | ||
processing_state: RAW | ||
topic: android_google_sleep_classify_event | ||
value_schema: .passive.google.GoogleSleepClassifyEvent | ||
sample_rate: | ||
interval: 600 | ||
dynamic: true |