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.
expand_context_topic/2Map the ~site, ~pagesession, ~session, ~user topics.
make_context_topic/2
payload_data/1
publish/2Entry point for messages received via events.
publish/3
route/2Entry point for messages received via the mqtt listener.
subscribe/2
subscribe/3
subscribe/4
transport_incoming/2Transport incoming messages to mod_mqtt.
unsubscribe/2
unsubscribe/3
wrap_payload/2

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.

expand_context_topic/2

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

Map the ~site, ~pagesession, ~session, ~user topics

make_context_topic/2

make_context_topic(ST, Context) -> any()

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()

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()

transport_incoming/2

transport_incoming(Cmd, Context) -> any()

Transport incoming messages to mod_mqtt

unsubscribe/2

unsubscribe(Topic, Context) -> any()

unsubscribe/3

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

wrap_payload/2

wrap_payload(Data, Context) -> any()


Generated by EDoc, Nov 24 2014, 19:13:19.