Copyright © 2013-2018 Marc Worrell
Authors: Marc Worrell (marc@worrell.nl).
callback() = pid() | {module(), atom(), list()}
publish_options() = #{retain => boolean(), qos => 0 | 1 | 2}
topic() = mqtt_session:topic()
topic_any() = mqtt_sessions:topic() | m_rsc:resource_id() | {object, list()} | {subject, list()}
await_response/2 | |
await_response/3 | |
call/2 | |
call/3 | |
flatten_topic/1 | |
is_client_alive/1 | Check if the MQTT client for this request context is alive. |
map_topic/2 | |
map_topic_filter/2 | Map subscription topic to a topic filter. |
origin_topic/1 | |
publish/2 | |
publish/3 | |
publish/4 | |
subscribe/2 | |
subscribe/3 | |
subscribe/4 | |
subscribe/5 | |
temp_response_topic/1 | |
unsubscribe/2 | |
unsubscribe/3 | |
whereis_client/1 | Find the Pid of the MQTT client process for this request context. |
await_response(Topic::mqtt_sessions:topic(), Context::z:context()) -> {ok, mqtt_packet_map:mqtt_packet()} | {error, timeout}
await_response(Topic::mqtt_sessions:topic(), Timeout::pos_integer(), Context::z:context()) -> {ok, mqtt_packet_map:mqtt_packet()} | {error, timeout}
call(Msg::mqtt_packet_map:mqtt_packet(), Context::z:context()) -> {ok, term()} | {error, term()}
call(Topic::topic(), Payload::term(), Context::z:context()) -> {ok, term()} | {error, term()}
flatten_topic(T) -> any()
is_client_alive(Context::z:context()) -> boolean()
Check if the MQTT client for this request context is alive.
map_topic(Topic::mqtt_sessions:topic(), Context::z:context()) -> {ok, mqtt_sessions:topic()} | {error, no_client}
map_topic_filter(Topic::topic_any(), Context::z:context()) -> topic()
Map subscription topic to a topic filter.
origin_topic(Topic) -> any()
publish(Msg::mqtt_packet_map:mqtt_packet(), Context::z:context()) -> ok | {error, term()}
publish(Topic::topic(), Payload::term(), Context::z:context()) -> ok | {error, term()}
publish(Topic::topic(), Payload::term(), Options::publish_options(), Context::z:context()) -> ok | {error, term()}
subscribe(TopicFilter::topic(), Context::z:context()) -> ok | {error, term()}
subscribe(TopicFilter::topic(), Pid::pid(), Context::z:context()) -> ok | {error, term()}
subscribe(TopicFilter::topic(), Callback::callback(), OwnerPid::pid(), Context::z:context()) -> ok | {error, term()}
subscribe(TopicFilter::topic(), Callback::callback(), OwnerPid::pid(), Options::mqtt_sessions:subscriber_options(), Context::z:context()) -> ok | {error, term()}
temp_response_topic(Context::z:context()) -> {ok, mqtt_sessions:topic()} | {error, term()}
unsubscribe(TopicFilter::topic(), Context::z:context()) -> ok | {error, term()}
unsubscribe(TopicFilter::topic(), OwnerPid::pid(), Context::z:context()) -> ok | {error, term()}
whereis_client(Context::z:context()) -> {ok, pid()} | {error, term()}
Find the Pid of the MQTT client process for this request context.
Generated by EDoc