From 0e96f39599e260e7c21c72b52b82f063f935810a Mon Sep 17 00:00:00 2001 From: Meng Li <34143965+Meng6@users.noreply.github.com> Date: Tue, 9 Mar 2021 22:55:21 -0500 Subject: [PATCH] Migrate phone bluetooth sensor to new data stream --- docs/datastreams/aware-mysql.md | 24 ++++++++++++++++++++++ docs/datastreams/mandatory-phone-format.md | 11 ++++++++++ src/data/streams/aware_mysql/format.yaml | 12 +++++++++++ src/data/streams/rapids_columns.yaml | 7 +++++++ 4 files changed, 54 insertions(+) diff --git a/docs/datastreams/aware-mysql.md b/docs/datastreams/aware-mysql.md index 7a0f0fa0..ae06a873 100644 --- a/docs/datastreams/aware-mysql.md +++ b/docs/datastreams/aware-mysql.md @@ -192,6 +192,30 @@ Stream columns named `FLAG_TO_MUTATE` means they are extracted based on the `MUT Same as ANDROID +??? info "PHONE_BLUETOOTH" + + === "ANDROID" + + **RAPIDS_COLUMN_MAPPINGS** + + | RAPIDS column | Stream column | + |----------------------|---------------------| + | TIMESTAMP | timestamp | + | DEVICE_ID | device_id | + | BT_ADDRESS | bt_address | + | BT_NAME | bt_name | + | BT_RSSI | bt_rssi | + + **MUTATION** + + - **COLUMN_MAPPINGS** (None) + - **SCRIPTS** (None) + + === "IOS" + + This sensor is not supported by iOS devices. + + ??? info "PHONE_CONVERSATION" === "ANDROID" diff --git a/docs/datastreams/mandatory-phone-format.md b/docs/datastreams/mandatory-phone-format.md index f74631b7..83d176f6 100644 --- a/docs/datastreams/mandatory-phone-format.md +++ b/docs/datastreams/mandatory-phone-format.md @@ -46,6 +46,17 @@ This is a description of the format RAPIDS needs to process data for the followi | BATTERY_SCALE | An integer that denotes the maximum battery level | +??? info "PHONE_BLUETOOTH" + + | RAPIDS column | Description | + |--------------------|---------------------------------------------------------------------------| + | TIMESTAMP | An UNIX timestamp (13 digits) when a row of data was logged | + | DEVICE_ID | A string that uniquely identifies a device | + | BT_ADDRESS | MAC address of the device’s Bluetooth sensor | + | BT_NAME | User assigned name of the device’s Bluetooth sensor | + | BT_RSSI | The RSSI dB to the scanned device | + + ??? info "PHONE_CONVERSATION" | RAPIDS column | Description | diff --git a/src/data/streams/aware_mysql/format.yaml b/src/data/streams/aware_mysql/format.yaml index ff1dd160..34c9aa62 100644 --- a/src/data/streams/aware_mysql/format.yaml +++ b/src/data/streams/aware_mysql/format.yaml @@ -81,6 +81,18 @@ PHONE_BATTERY: SCRIPTS: - "src/data/streams/mutations/phone/aware/battery_ios_unification.R" +PHONE_BLUETOOTH: + ANDROID: + RAPIDS_COLUMN_MAPPINGS: + TIMESTAMP: timestamp + DEVICE_ID: device_id + BT_ADDRESS: bt_address + BT_NAME: bt_name + BT_RSSI: bt_rssi + MUTATION: + COLUMN_MAPPINGS: + SCRIPTS: # List any python or r scripts that mutate your raw data + PHONE_CONVERSATION: ANDROID: RAPIDS_COLUMN_MAPPINGS: diff --git a/src/data/streams/rapids_columns.yaml b/src/data/streams/rapids_columns.yaml index 95d8b431..43701057 100644 --- a/src/data/streams/rapids_columns.yaml +++ b/src/data/streams/rapids_columns.yaml @@ -26,6 +26,13 @@ PHONE_BATTERY: - BATTERY_LEVEL - BATTERY_SCALE +PHONE_BLUETOOTH: + - TIMESTAMP + - DEVICE_ID + - BT_ADDRESS + - BT_NAME + - BT_RSSI + PHONE_CONVERSATION: - TIMESTAMP - DEVICE_ID