This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
sdk:mqtt_advanced_status [2018/08/07 15:46] – created preisig | sdk:mqtt_advanced_status [2018/09/11 14:50] (current) – [Send Router Status Informations to an MQTT Broker - Advanced Version] juraschek | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Send Router Status Informations to an MQTT Broker - Advanced Version ====== | ====== Send Router Status Informations to an MQTT Broker - Advanced Version ====== | ||
+ | Please use the Image [[http:// | ||
+ | ===== Script Summary | ||
+ | |||
+ | This script is an advanced version of the [[sdk: | ||
+ | |||
+ | If you are interessted in other status values, please refer to the API manual and read about the nb_status() function. You can use dump() to get all the fields (ex: GNSS1_LATITUDE) of the struct returned by nb_status. | ||
+ | |||
+ | With default settings the script publishes 10 mqtt messages to a given topic and waits 60 secs between every new status query and message publish. After that the topic gets changed and a final status message gets published. | ||
+ | |||
+ | |||
<code c mqtt_advanced_status.are> | <code c mqtt_advanced_status.are> | ||
/* DESC: Advanced version of mqtt_simple_status.are using a template | /* DESC: Advanced version of mqtt_simple_status.are using a template | ||
Line 47: | Line 57: | ||
} | } | ||
} | } | ||
+ | /* The publish function to publish a message */ | ||
int publish(string msg){ | int publish(string msg){ | ||
this.MESSAGE = msg; | this.MESSAGE = msg; |