Send file data through D7A Action Protocol demo.

Dependencies:   modem_ref_helper

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers sensor.h Source File

sensor.h

00001 #ifndef __SENSOR_H__
00002 #define __SENSOR_H__
00003 
00004 #include "hal_types.h"
00005 
00006 typedef uint16_t light_value_t;
00007 
00008 // Types of reporting
00009 typedef enum 
00010 {
00011     REPORT_ALWAYS,
00012     REPORT_ON_DIFFERENCE,
00013     REPORT_ON_THRESHOLD,
00014 } report_type_t;
00015 
00016 // Sensor reporting configuration
00017 TYPEDEF_STRUCT_PACKED 
00018 {
00019     uint8_t  report_type;       // Type of report asked
00020     uint32_t read_period;       // Measure period (ms)
00021     uint32_t max_period;        // Maximum time between reports (s)
00022     uint32_t max_diff;          // Maximum difference allowed between two reported values
00023     int32_t  threshold_high;    // High threshold value triggering a report
00024     int32_t  threshold_low;     // Low threshold value triggering a report
00025 } sensor_config_t;
00026 
00027 light_value_t sensor_get_light(void);
00028 
00029 #endif