# VintageNetWizard.BackendServer (vintage_net_wizard v0.4.2) View Source

Server for managing a VintageNet.Backend implementation

# Link to this section Summary

## Functions

access_points()

List out access points

apply()

Apply the configurations saved in the backend to the system.

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

child_spec(backend, ifname, opts \\ [])
complete()
configuration_state()

Get the current state of the WiFi configuration

configuration_status()

Get the current configuration status

configurations()

Get a list of the current configurations

delete_configuration(ssid)

Delete the configuration by `ssid`

device_info()

Return information about the device for the web page's footer

reset()

Reset the backend to an initial default state.

save(config)

Save a network configuration to the backend

set_priority_order(priority_order)

Pass list of SSIDs (`priority_order`), sort the configurations to match that order.

start_link(backend, ifname, opts \\ [])
start_scan()

Start scanning for WiFi access points

stop_scan()

Stop scanning for WiFi access points

subscribe()

Subscribe to messages from the backend

# Link to this section Functions

Link to this function

# access_points()

View Source

## Specs

    access_points() :: [VintageNetWiFi.AccessPoint.t()]

List out access points

Link to this function

# apply()

View Source

## Specs

    apply() :: :ok | {:error, :no_configurations}

Apply the configurations saved in the backend to the system.

Link to this function

# child_spec(init_arg)

View Source

Returns a specification to start this module under a supervisor.

See `Supervisor`.

Link to this function

# child_spec(backend, ifname, opts \\ [])

View Source
Link to this function

# complete()

View Source

## Specs

    complete() :: :ok

Link to this function

# configuration_state()

View Source

## Specs

    configuration_state() :: %VintageNetWizard.BackendServer.State{
      backend: term(),
      backend_state: term(),
      configurations: term(),
      device_info: term(),
      subscriber: term()
    }

Get the current state of the WiFi configuration

Link to this function

# configuration_status()

View Source

Get the current configuration status

Link to this function

# configurations()

View Source

## Specs

    configurations() :: [map()]

Get a list of the current configurations

Link to this function

# delete_configuration(ssid)

View Source

## Specs

    delete_configuration(String.t()) :: :ok

Delete the configuration by `ssid`

Link to this function

# device_info()

View Source

## Specs

    device_info() :: [{String.t(), String.t()}]

Return information about the device for the web page's footer

Link to this function

# reset()

View Source

## Specs

    reset() :: :ok

Reset the backend to an initial default state.

Link to this function

# save(config)

View Source

## Specs

    save(map()) :: :ok | {:error, any()}

Save a network configuration to the backend

The network configuration is a map that can be included in the `:network` field of a `VintageNetWiFi` configuration.

Link to this function

# set_priority_order(priority_order)

View Source

## Specs

    set_priority_order([String.t()]) :: :ok

Pass list of SSIDs (`priority_order`), sort the configurations to match that order.

Link to this function

# start_link(backend, ifname, opts \\ [])

View Source

## Specs

    start_link(backend :: module(), VintageNet.ifname(), [
      VintageNetWizard.Backend.opt()
    ]) :: GenServer.on_start()

Link to this function

# start_scan()

View Source

## Specs

    start_scan() :: :ok

Start scanning for WiFi access points

Link to this function

# stop_scan()

View Source

## Specs

    stop_scan() :: :ok

Stop scanning for WiFi access points

Link to this function

# subscribe()

View Source

## Specs

    subscribe() :: :ok

Subscribe to messages from the backend