VintageNetWizard.Backend behaviour (vintage_net_wizard v0.4.3) View Source
Backends define the boundaries of getting access points, handling incoming messages, and scanning the network
Link to this section Summary
Callbacks
Get all the access points that the backend knowns about
Apply the WiFi configurations
Perform final completion steps for the network configurations
Return the configuration status of a configuration that has been applied
Handle any message the is received by another process
Do any initialization work like subscribing to messages
Apply any actions required to set the backend back to an initial default state
Start scanning for WiFi access points
Stop the scan for WiFi access points
Link to this section Types
Specs
configuration_status() :: :not_configured | :good | :bad
Specs
device_info_name() :: String.t()
Specs
device_info_value() :: String.t()
Specs
opt() :: {:device_info, [{device_info_name(), device_info_value()}]} | {:configurations, [map()]}
Link to this section Callbacks
Specs
access_points(state :: any()) :: [VintageNetWiFi.AccessPoint.t()]
Get all the access points that the backend knowns about
Specs
Apply the WiFi configurations
The configurations passed are network configurations that can be passed into
the :network
list in a VintageNetWiFi
configuration.
Specs
Perform final completion steps for the network configurations
Specs
configuration_status(state :: any()) :: configuration_status()
Return the configuration status of a configuration that has been applied
Specs
Handle any message the is received by another process
If you want the socket to send data to the client
return {:reply, message, state}
, otherwise return
{:noreply, state}
Specs
init(VintageNet.ifname()) :: state :: any()
Do any initialization work like subscribing to messages
Will be passed the interface name that the backend should use. By default
this will be "wlan0"
. If you want to use a different interface name you
can pass that in an option to VintageNetWizard.run_wizard/1
.
Specs
Apply any actions required to set the backend back to an initial default state
Specs
Start scanning for WiFi access points
Specs
Stop the scan for WiFi access points