Conversation
nickgaray
left a comment
There was a problem hiding this comment.
Update copyright dates, make sure all classes are org.sensorhub, update class headers with proper info in noted annotations
| // @DisplayInfo(desc = "User Oura Cloud Token") | ||
| // public String bearerToken; | ||
|
|
||
| // Mike: KOZ6PJWLHIFJLUHXYYT5FW5Z7D62N7VQ |
There was a problem hiding this comment.
Remove secrets from file
| /** | ||
| * The unique identifier for the configured sensor (or sensor platform). | ||
| */ | ||
| // @DisplayInfo.Required |
There was a problem hiding this comment.
If serial number and bearer token are not needed, then they should be removed
| osgi { | ||
| manifest { | ||
| attributes ('Bundle-Vendor': 'Botts Inc') | ||
| attributes ('Bundle-Activator': 'com.sample.impl.sensor.drivername.Activator') |
There was a problem hiding this comment.
package name should start with org.sensorhub if this is intended for open source. This comment applies to all .java files as well
| WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | ||
| for the specific language governing rights and limitations under the License. | ||
|
|
||
| Copyright (C) 2020-2021 Botts Innovative Research, Inc. All Rights Reserved. |
There was a problem hiding this comment.
Do copyrights need updating? Date?
| /** | ||
| * Descriptor classes provide access to informative data on the OpenSensorHub driver | ||
| * | ||
| * @author your_name |
There was a problem hiding this comment.
Edit class headers with correct annotations
| // TODO: Create data record description | ||
| dataStruct = sweFactory.createRecord() | ||
| .name(SENSOR_OUTPUT_NAME) | ||
| .definition("urn:osh:data:oura:spo2") |
There was a problem hiding this comment.
definition should be an ontological uri and not a unique identifier urn
|
|
||
| private Thread worker; | ||
|
|
||
| private String bearerToken; |
There was a problem hiding this comment.
bearerToken is not used so remove it
| System.out.println(record.get(0) + " | " + record.get(1) + " | " + record.get(2)); // ID | Name | Token | ||
| String sleep_response = makeRequest(requestString, record.get(2)); // record(2) = Token | ||
| JSONObject[] sleep_jsons = getDataRecord(sleep_response, record); | ||
| System.out.println("Number of Sleep Records for " + record.get(1) + " : " + sleep_jsons.length); |
| System.out.println("Number of Rings Monitored: " + records.size()); | ||
| JSONObject[] sum_sleep_jsons = new JSONObject[0]; | ||
| for (List<String> record : records) { | ||
| System.out.println(record.get(0) + " | " + record.get(1) + " | " + record.get(2)); // ID | Name | Token |
| // TODO: Create data record description | ||
| dataStruct = sweFactory.createRecord() | ||
| .name(SENSOR_OUTPUT_NAME) | ||
| .definition("urn:osh:data:oura:sleep") |
There was a problem hiding this comment.
definition should be an ontological definition URI
Sensor driver for Oura Ring. Supports multiple rings. Must add ring data to resources/Oura.csv.