Packages

Pure-Elixir EtherCAT master built on OTP. Declarative bus configuration, cyclic process data exchange, CoE SDO transfers, and distributed clocks.

Current section

Files

Jump to
ethercat lib ethercat application.ex
Raw

lib/ethercat/application.ex

defmodule EtherCAT.Application do
@moduledoc false
use Application
@impl true
def start(_type, _args) do
children = [
{Registry, keys: :unique, name: EtherCAT.Registry},
{DynamicSupervisor, name: EtherCAT.SlaveSupervisor, strategy: :one_for_one},
{DynamicSupervisor, name: EtherCAT.SessionSupervisor, strategy: :one_for_one},
EtherCAT.Master
]
opts = [strategy: :one_for_all, name: EtherCAT.Supervisor]
Supervisor.start_link(children, opts)
end
end