Skip to content

Commit

Permalink
Clean up sensor network
Browse files Browse the repository at this point in the history
  • Loading branch information
lupyuen committed May 20, 2019
1 parent 7be3067 commit 8bf53ef
Show file tree
Hide file tree
Showing 5 changed files with 163 additions and 108 deletions.
16 changes: 8 additions & 8 deletions libs/remote_sensor/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ syscfg.defs:
value: AMBIENT_TEMPERATURE_RAW

REMOTE_SENSOR_TYPE_1__INT:
description: 'Value Type is int'
description: 'Is Sensor Value Type int?'
value: 1

REMOTE_SENSOR_TYPE_1__DOUBLE:
description: 'Value Type is double'
description: 'Is Sensor Value Type double?'
value: 0

###########################################################################
Expand All @@ -51,11 +51,11 @@ syscfg.defs:
value: AMBIENT_TEMPERATURE

REMOTE_SENSOR_TYPE_2__INT:
description: 'Value Type is int'
description: 'Is Sensor Value Type int?'
value: 0

REMOTE_SENSOR_TYPE_2__DOUBLE:
description: 'Value Type is double'
description: 'Is Sensor Value Type double?'
value: 1

###########################################################################
Expand All @@ -78,11 +78,11 @@ syscfg.defs:
value: PRESSURE

REMOTE_SENSOR_TYPE_3__INT:
description: 'Value Type is int'
description: 'Is Sensor Value Type int?'
value: 0

REMOTE_SENSOR_TYPE_3__DOUBLE:
description: 'Value Type is double'
description: 'Is Sensor Value Type double?'
value: 1

###########################################################################
Expand All @@ -105,11 +105,11 @@ syscfg.defs:
value: RELATIVE_HUMIDITY

REMOTE_SENSOR_TYPE_4__INT:
description: 'Value Type is int'
description: 'Is Sensor Value Type int?'
value: 0

REMOTE_SENSOR_TYPE_4__DOUBLE:
description: 'Value Type is double'
description: 'Is Sensor Value Type double?'
value: 1

# When we add Remote Sensor Type 5, remember to replicate the macros in
Expand Down
5 changes: 4 additions & 1 deletion libs/sensor_network/include/sensor_network/sensor_network.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ bool should_send_to_collector(struct sensor_value *val, const char *device_name)
/////////////////////////////////////////////////////////
// Sensor Network Addresses

// Get the randomly-generated device ID. Changes upon restart.
// Return the Hardware ID, which is unique across all microcontrollers.
const uint8_t *get_hardware_id(void);

// Get the randomly-generated Device ID that will be sent in every CoAP Server message. Changes upon restart.
const char *get_device_id(void);

// Return the Collector Node address for this Sensor Network.
Expand Down
Loading

0 comments on commit 8bf53ef

Please sign in to comment.