-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Documenter.jl
committed
Aug 7, 2023
1 parent
5e04db2
commit a00e14c
Showing
12 changed files
with
86 additions
and
15,464 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Client · MQTTClient.jl</title><script data-outdated-warner src="../../assets/warner.js"></script><link rel="canonical" href="https://JuliaMessaging.github.io/MQTTClient.jl/api/client/"/><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit"><a href="../../">MQTTClient.jl</a></span></div><form class="docs-search" action="../../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><a class="tocitem" href="../../getting-started/">Getting Started</a></li><li><a class="tocitem" href="../../interfaces/">MQTT Interface Functions</a></li><li><a class="tocitem" href="../../client/">MQTT Client</a></li><li><span class="tocitem">MQTT API</span><ul><li class="is-active"><a class="tocitem" href>Client</a></li><li><a class="tocitem" href="../handlers/">Internal Functions</a></li><li><a class="tocitem" href="../interface/">Interfacing Functions</a></li></ul></li><li><a class="tocitem" href="../../utils/">Utils</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">MQTT API</a></li><li class="is-active"><a href>Client</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Client</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/JuliaMessaging/MQTTClient.jl/blob/main/docs/src/api/client.md#" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><article class="docstring"><header><a class="docstring-binding" id="MQTTClient.Client" href="#MQTTClient.Client"><code>MQTTClient.Client</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">Client</code></pre><p>A mutable struct representing an MQTT client.</p><p>An MQTT client is any device (from a microcontroller up to a fully-fledged server) that runs an MQTT library and connects to an MQTT broker over a network. Information is organized in a hierarchy of topics.</p><p><strong>Fields</strong></p><ul><li><code>on_msg::Dict{String,Function}</code>: A dictionary mapping topic names to callback functions.</li><li><code>keep_alive::UInt16</code>: The keep-alive time in seconds.</li><li><code>last_id::UInt16</code>: The last packet identifier used.</li><li><code>in_flight::Dict{UInt16, Future}</code>: A dictionary mapping packet identifiers to futures.</li><li><code>write_packets::AbstractChannel</code>: A channel for writing packets.</li><li><code>socket</code>: The socket used for communication with the broker.</li><li><code>socket_lock</code>: A lock for synchronizing access to the socket.</li><li><code>ping_timeout::UInt64</code>: The ping timeout in seconds.</li><li><code>ping_outstanding::Atomic{UInt8}</code>: An atomic counter for the number of outstanding ping requests.</li><li><code>last_sent::Atomic{Float64}</code>: An atomic float representing the timestamp of the last sent packet.</li><li><code>last_received::Atomic{Float64}</code>: An atomic float representing the timestamp of the last received packet.</li></ul><p><strong>Constructor</strong></p><p><code>Client(ping_timeout::UInt64=UInt64(60))</code> constructs a new <code>Client</code> object with the specified ping timeout (default: 60 seconds).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JuliaMessaging/MQTTClient.jl/blob/906337d5f78675918c6b04b4b6db44ad9829c2a6/src/client.jl#L1-L23">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MQTTClient.MQTTConnection" href="#MQTTClient.MQTTConnection"><code>MQTTClient.MQTTConnection</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">MQTTConnection{T <: AbstractIOConnection}</code></pre><p>A struct containing an MQTT connection's metadata.</p><p><strong>Fields</strong></p><ul><li><code>protocol::T</code>: The underlying IO connection.</li><li><code>keep_alive::Int64</code>: The keep-alive time in seconds.</li><li><code>client_id::String</code>: The client identifier.</li><li><code>user::User</code>: The user credentials.</li><li><code>will::Message</code>: The last will and testament message.</li><li><code>clean_session::Bool</code>: Whether to start a clean session.</li></ul><p><strong>Constructors</strong></p><p><code>MQTTConnection(protocol::T; keep_alive::Int64=32, client_id::String=randstring(8), user::User=User("", ""), will::Message=Message(false, 0x00, false, "", UInt8[]), clean_session::Bool=true) where T <: AbstractIOConnection</code> constructs a new <code>MQTTConnection</code> object with the specified protocol and optional keyword arguments.</p><p><code>MQTTConnection(protocol::T, keep_alive::Int64, client_id::String, user::User, will::Message, clean_session::Bool) where T <: AbstractIOConnection</code> constructs a new <code>MQTTConnection</code> object with the specified arguments.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JuliaMessaging/MQTTClient.jl/blob/906337d5f78675918c6b04b4b6db44ad9829c2a6/src/connection.jl#L101-L128">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MQTTClient.IOConnection" href="#MQTTClient.IOConnection"><code>MQTTClient.IOConnection</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">IOConnection(ip::IPAddr, port::Int64)</code></pre><p>Constructs a new <code>TCP</code> object with the specified IP address and port number.</p><p><strong>Arguments</strong></p><ul><li><code>ip::IPAddr</code>: The IP address of the remote host.</li><li><code>port::Int64</code>: The port number on the remote host.</li></ul><p><strong>Returns</strong></p><ul><li><code>TCP</code>: A new <code>TCP</code> object.</li></ul><hr/><pre><code class="nohighlight hljs">IOConnection(ip::String, port::Int64)</code></pre><p>Constructs a new <code>TCP</code> object with the specified IP address and port number.</p><p><strong>Arguments</strong></p><ul><li><code>ip::String</code>: The IP address of the remote host as a string.</li><li><code>port::Int64</code>: The port number on the remote host.</li></ul><p><strong>Returns</strong></p><ul><li><code>TCP</code>: A new <code>TCP</code> object.</li></ul><hr/><pre><code class="nohighlight hljs">IOConnection(path::AbstractString)</code></pre><p>Constructs a new <code>UDS</code> object with the specified file system path.</p><p><strong>Arguments</strong></p><ul><li><code>path::AbstractString</code>: The file system path of the socket.</li></ul><p><strong>Returns</strong></p><ul><li><code>UDS</code>: A new <code>UDS</code> object.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JuliaMessaging/MQTTClient.jl/blob/906337d5f78675918c6b04b4b6db44ad9829c2a6/src/connection.jl#L46-L82">source</a></section></article><div class="admonition is-warning"><header class="admonition-header">Missing docstring.</header><div class="admonition-body"><p>Missing docstring for <code>TCP</code>. Check Documenter's build log for details.</p></div></div><div class="admonition is-warning"><header class="admonition-header">Missing docstring.</header><div class="admonition-body"><p>Missing docstring for <code>UDS</code>. Check Documenter's build log for details.</p></div></div><article class="docstring"><header><a class="docstring-binding" id="MQTTClient.MQTTException" href="#MQTTClient.MQTTException"><code>MQTTClient.MQTTException</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">struct MQTTException <: Exception | ||
msg::AbstractString | ||
end | ||
|
||
A custom exception type for MQTT errors. | ||
|
||
# Examples | ||
```julia | ||
julia> throw(MQTTException("Connection refused: Not authorized")) | ||
MQTTException("Connection refused: Not authorized") | ||
```</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JuliaMessaging/MQTTClient.jl/blob/906337d5f78675918c6b04b4b6db44ad9829c2a6/src/internals.jl#L48-L60">source</a></section></article><div class="admonition is-warning"><header class="admonition-header">Missing docstring.</header><div class="admonition-body"><p>Missing docstring for <code>AbstractIOConnection</code>. Check Documenter's build log for details.</p></div></div><div class="admonition is-warning"><header class="admonition-header">Missing docstring.</header><div class="admonition-body"><p>Missing docstring for <code>Packet</code>. Check Documenter's build log for details.</p></div></div><div class="admonition is-warning"><header class="admonition-header">Missing docstring.</header><div class="admonition-body"><p>Missing docstring for <code>Message</code>. Check Documenter's build log for details.</p></div></div><article class="docstring"><header><a class="docstring-binding" id="MQTTClient.User" href="#MQTTClient.User"><code>MQTTClient.User</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">User(name::String, password::String)</code></pre><p>A struct that represents a user with a name and password.</p><p><strong>Examples</strong></p><pre><code class="language-julia hljs">julia> user = User("John", "password") | ||
User("John", "password")</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JuliaMessaging/MQTTClient.jl/blob/906337d5f78675918c6b04b4b6db44ad9829c2a6/src/internals.jl#L132-L142">source</a></section></article><div class="admonition is-warning"><header class="admonition-header">Missing docstring.</header><div class="admonition-body"><p>Missing docstring for <code>write_loop</code>. Check Documenter's build log for details.</p></div></div><div class="admonition is-warning"><header class="admonition-header">Missing docstring.</header><div class="admonition-body"><p>Missing docstring for <code>read_loop</code>. Check Documenter's build log for details.</p></div></div><div class="admonition is-warning"><header class="admonition-header">Missing docstring.</header><div class="admonition-body"><p>Missing docstring for <code>keep_alive_loop</code>. Check Documenter's build log for details.</p></div></div><div class="admonition is-warning"><header class="admonition-header">Missing docstring.</header><div class="admonition-body"><p>Missing docstring for <code>packet_id</code>. Check Documenter's build log for details.</p></div></div><div class="admonition is-warning"><header class="admonition-header">Missing docstring.</header><div class="admonition-body"><p>Missing docstring for <code>write_packet</code>. Check Documenter's build log for details.</p></div></div></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../../client/">« MQTT Client</a><a class="docs-footer-nextpage" href="../handlers/">Internal Functions »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Monday 7 August 2023 07:07">Monday 7 August 2023</span>. Using Julia version 1.9.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html> |
Oops, something went wrong.