Google IoT Core

Github Repo C Header C source JS source
mongoose-os-libs/gcp mgos_gcp.h    

This library implements integration of Mongoose OS with Google IoT Core.

See tutorial at


bool mgos_gcp_send_event(const struct mg_str data);
bool mgos_gcp_send_eventp(const struct mg_str *data);
bool mgos_gcp_send_eventf(const char *json_fmt, ...);

Send a telemetry event to the default topic.

Se documentation here:

E.g.: mgos_gcp_send_eventf("{foo: %d}", foo);


bool mgos_gcp_send_event_sub(const struct mg_str subfolder,
                             const struct mg_str data);
bool mgos_gcp_send_event_subp(const struct mg_str *subfolder,
                              const struct mg_str *data);
bool mgos_gcp_send_event_subf(const char *subfolder, const char *json_fmt, ...);

Send a telemetry event to a subfolder topic.

E.g.: mgos_gcp_send_event_subf("foo_events", "{foo: %d}", foo);

edit this doc