Module z_mqtt

Interface to MQTT pubsub functionality.

Copyright 2013 Marc Worrell

Authors: Marc Worrell (marc@worrell.nl).

Description

Interface to MQTT pubsub functionality

Function Index

encode_packet_payload/1UBF encode the data to be sent to a client over a TCP/IP connection.
make_postback_payload/2
maybe_context_topic/2Add the site's name to a topic iff the topic doesn't start with '//'.
payload_data/1
publish/2Entry point for messages received via events.
publish/3
remove_context_topic/2
route/2Entry point for messages received via the mqtt listener.
subscribe/2
subscribe/3
subscribe/4
unsubscribe/2
unsubscribe/3

Function Details

encode_packet_payload/1

encode_packet_payload(Payload::#z_mqtt_payload{} | undefined | binary()) -> binary()

UBF encode the data to be sent to a client over a TCP/IP connection.

make_postback_payload/2

make_postback_payload(Data, Context) -> any()

maybe_context_topic/2

maybe_context_topic(Topic::binary() | string(), Context::#context{}) -> binary()

Add the site's name to a topic iff the topic doesn't start with '//'

payload_data/1

payload_data(Mqtt_msg) -> any()

publish/2

publish(Mqtt_msg, Context) -> any()

Entry point for messages received via events

publish/3

publish(Topic, Z_mqtt_payload, Context) -> any()

remove_context_topic/2

remove_context_topic(Topic, Context) -> any()

route/2

route(Mqtt_msg, Context) -> any()

Entry point for messages received via the mqtt listener.

subscribe/2

subscribe(Topic, Context) -> any()

subscribe/3

subscribe(Topic, Callback, Context) -> any()

subscribe/4

subscribe(Topic, Qos, Pid, Context) -> any()

unsubscribe/2

unsubscribe(Topic, Context) -> any()

unsubscribe/3

unsubscribe(Topic, Pid, Context) -> any()


Generated by EDoc, Oct 20 2014, 23:09:35.