O2 2.0
A communication protocol for interactive music and media applications.
mqttcom2.h
1// mqttcomm.h -- headers for MQTT protocol implementation
2//
3// Roger B. Dannenberg
4// October 2020
5
6#ifndef O2_NO_MQTT
7
8class MQTT_info : Remote_info {
9 virtual o2_status_t status(const char **process) {
10 if (process) {
11 *process = get_proc_name();
12 }
13 return (o2_clock_is_synchronized && tag == MQTT_SYNCED) ?
15 }
16};
17
18
19o2_err_t o2m_initialize(const char *server, int port);
20o2_err_t o2m_subscribe(const char *topic);
21void o2m_received(int n);
22void o2_mqtt_received(o2n_info_ptr info);
23o2_err_t o2_mqtt_publish(const char *subtopic,
24 const uint8_t *payload, int payload_len, int retain);
25o2_err_t o2_mqtt_can_send();
26
27#endif
Definition: mqtt.h:12
bool o2_clock_is_synchronized
A variable indicating that the clock is the reference or is synchronized to the reference.
Definition: clock.cpp:26
@ O2_REMOTE_NOTIME
remote service but no clock sync yet
Definition: o2.h:453
@ O2_REMOTE
remote service with clock sync.
Definition: o2.h:502