MeshtasticClient.Connection (meshtastic_client v0.1.0)

Handles connection management for Meshtastic devices.

Summary

Functions

Returns a specification to start this module under a supervisor.

Connects to a Meshtastic device.

Disconnects from the device.

Sends raw data to the device.

Subscribes to incoming messages.

Types

t()

@type t() :: %MeshtasticClient.Connection{
  buffer: binary(),
  socket: port() | nil,
  subscribers: [pid()],
  type: :tcp | :serial | :ble
}

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

connect(opts)

Connects to a Meshtastic device.

disconnect(conn)

Disconnects from the device.

send_data(conn, data)

Sends raw data to the device.

subscribe(conn)

Subscribes to incoming messages.