50 #ifdef IPSO_TEMPERATURE 51 extern const struct ipso_objects_sensor IPSO_TEMPERATURE;
54 #ifndef IPSO_TEMPERATURE_MIN 55 #define IPSO_TEMPERATURE_MIN -50000 58 #ifndef IPSO_TEMPERATURE_MAX 59 #define IPSO_TEMPERATURE_MAX 80000 62 static lwm2m_status_t get_temp_value(
const ipso_sensor_t *sensor,
65 IPSO_SENSOR(temp_sensor, 3303, get_temp_value,
66 .max_range = IPSO_TEMPERATURE_MAX,
67 .min_range = IPSO_TEMPERATURE_MIN,
74 get_temp_value(
const ipso_sensor_t *s, int32_t *value)
76 #ifdef IPSO_TEMPERATURE 77 if(IPSO_TEMPERATURE.read_value != NULL &&
78 IPSO_TEMPERATURE.read_value(value) == 0) {
79 return LWM2M_STATUS_OK;
82 return LWM2M_STATUS_ERROR;
86 ipso_temperature_init(
void)
88 #ifdef IPSO_TEMPERATURE 89 if(IPSO_TEMPERATURE.init) {
90 IPSO_TEMPERATURE.init();
94 ipso_sensor_add(&temp_sensor);
Header file for the LWM2M object API
Implementation of OMA LWM2M / IPSO sensor template.
Header file for the Contiki IPSO Objects for OMA LWM2M
Header file for the Contiki OMA LWM2M engine