Current section

Files

Jump to
nerves_hub_link lib nerves_hub_link.ex
Raw

lib/nerves_hub_link.ex

defmodule NervesHubLink do
@doc """
Checks if the device is connected to the NervesHub channel.
"""
@spec connected? :: boolean()
defdelegate connected?(), to: NervesHubLink.DeviceChannel
@doc """
Checks if the device has a socket connection with NervesHub
"""
@dialyzer {:nowarn_function, {:socket_connected?, 0}}
defdelegate socket_connected?(pid \\ NervesHubLink.Socket),
to: PhoenixClient.Socket,
as: :connected?
@doc """
Current status of the update manager
"""
@spec status :: NervesHubLinkCommon.UpdateManager.State.status()
defdelegate status(), to: NervesHubLinkCommon.UpdateManager
end