#include <string.h>
#include "thsq.h"
#include "netstack-aes.h"
#include "dev/button-sensor.h"
#include "rpl/rpl-private.h"
#include "port.h"
#include "asf.h"
#include "mqtt.h"
#include "battery-sensor.h"
#include "sam0_sensors.h"
Macros | |
#define | HOST "m2m.eclipse.org" |
#define | MIN(a, b) ((a) < (b) ? (a) : (b)) |
#define | PRIORITY "p0" |
#define | SEND_INTERVAL (60 * CLOCK_SECOND) |
#define | UUID "atmeld" |
#define | VERSION "v1" |
Functions | |
static void | mqtt_event (struct mqtt_connection *m, mqtt_event_t event, void *data) |
PROCESS (mqtt_example_process,"MQTT Example") | |
PROCESS_THREAD (mqtt_example_process, ev, data) | |
Variables | |
static char | app_buffer [128] |
static char | batt_str [8] |
static struct sensors_sensor * | battery = NULL |
static uint16_t | button_sensor_value =0 |
static char | clientid [16] |
static struct mqtt_connection | conn |
static uip_ipaddr_t | google_ipv4_dns_server |
static process_event_t | led_updates_changed_event |
static char | mac_adr_str [18] |
AUTOSTART_PROCESSES & | mqtt_example_process |
static struct mqtt_message * | msg_ptr = 0 |
static uint16_t | nodeid |
static process_event_t | reconnect_event |
static struct etimer | reconnect_timer |
static uint8_t | reconnecting = 0 |
static struct etimer | sensor_timer |
char | str [48] |
static char | str_topic_led [30] |
static char | str_topic_sensor [30] |
static char | str_topic_state [30] |
volatile float | temp_C |
float | temp_F |
volatile double | temp_res |
static char | temp_str [8] |
#define HOST "m2m.eclipse.org" |
Referenced by PROCESS_THREAD().
#define MIN | ( | a, | |
b | |||
) | ((a) < (b) ? (a) : (b)) |
#define PRIORITY "p0" |
Referenced by PROCESS_THREAD().
#define SEND_INTERVAL (60 * CLOCK_SECOND) |
#define UUID "atmeld" |
Referenced by PROCESS_THREAD().
#define VERSION "v1" |
Referenced by PROCESS_THREAD().
|
static |
References data, mqtt_message::first_chunk, i, MQTT_EVENT_CONNECTED, MQTT_EVENT_DISCONNECTED, MQTT_EVENT_PUBACK, MQTT_EVENT_PUBLISH, MQTT_EVENT_SUBACK, MQTT_EVENT_UNSUBACK, mqtt_message::payload_chunk, mqtt_message::payload_chunk_length, mqtt_message::payload_left, mqtt_message::payload_length, port_pin_set_output_level(), printf, str_topic_led, and mqtt_message::topic.
Referenced by PROCESS_THREAD().
PROCESS | ( | mqtt_example_process | , |
"MQTT Example" | |||
) |
PROCESS_THREAD | ( | mqtt_example_process | , |
ev | , | ||
data | |||
) |
References app_buffer, mqtt_connection::auto_reconnect, batt_str, BATTERY_SENSOR, battery_sensor_init(), button_sensor_value, clientid, CLOCK_SECOND, clock_time(), conn, etimer_expired(), etimer_reset(), etimer_restart(), etimer_set(), get_sensor_value(), HOST, ipaddr, uip_ds6_addr::ipaddr, led_updates_changed_event, lladdr, mac_adr_str, mdns_conf(), mdns_init(), mqtt_connect(), mqtt_connected, mqtt_disconnect(), mqtt_event(), mqtt_example_process, mqtt_publish(), MQTT_QOS_LEVEL_0, mqtt_ready, mqtt_register(), MQTT_RETAIN_OFF, MQTT_RETAIN_ON, mqtt_set_last_will(), mqtt_subscribe(), netstack_aes_set_active(), nodeid, NULL, printf, PRIORITY, process_alloc_event(), PROCESS_BEGIN, PROCESS_END, PROCESS_WAIT_EVENT, PROCESS_WAIT_UNTIL, reconnect_event, reconnect_timer, reconnecting, sensor_timer, sensor_result_tag::sensor_value, sensors_find(), simple_rpl_parent(), str_topic_led, str_topic_sensor, str_topic_state, temp_str, TEMPERATURE, uip_ip6addr_t::u8, uip_ds6_get_link_local(), UUID, sensors_sensor::value, and VERSION.
|
static |
Referenced by PROCESS_THREAD().
|
static |
Referenced by PROCESS_THREAD().
|
static |
|
static |
Referenced by PROCESS_THREAD().
|
static |
Referenced by PROCESS_THREAD().
|
static |
Referenced by esurl_dev_connected_event(), make_tcp_stats(), PROCESS_THREAD(), and websocket_http_client_get().
|
static |
|
static |
Referenced by PROCESS_THREAD().
|
static |
Referenced by PROCESS_THREAD().
AUTOSTART_PROCESSES& mqtt_example_process |
Referenced by PROCESS_THREAD().
|
static |
|
static |
Referenced by PROCESS_THREAD().
|
static |
Referenced by PROCESS_THREAD().
|
static |
Referenced by PROCESS_THREAD().
|
static |
Referenced by PROCESS_THREAD().
|
static |
Referenced by PROCESS_THREAD().
char str[48] |
Referenced by chk_chr(), event(), ip64_conv(), main_extra_string(), and udc_req_std_dev_get_str_desc().
|
static |
Referenced by mqtt_event(), and PROCESS_THREAD().
|
static |
Referenced by PROCESS_THREAD().
|
static |
Referenced by PROCESS_THREAD().
volatile float temp_C |
float temp_F |
volatile double temp_res |
|
static |
Referenced by PROCESS_THREAD().