Fledex.Supervisor.LedStripSupervisor (fledex v0.6.0)

View Source

This is the supervisor for an led strip and all it's workers, like animations (start_animation/3) and coordinators (start_coordinator/3).

Summary

Functions

Returns a specification to start this module under a supervisor.

This starts a new animation attached to the specified led strip.

This starts a new coordinator. Which can receive events and react to those by impacting the running annimations.

Start a new supervisor for an led strip.

Stop the supervisor (and all it's children)

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_animation(strip_name, animation_name, config)

@spec start_animation(atom(), atom(), Fledex.Animation.Animator.config_t()) ::
  GenServer.on_start()

This starts a new animation attached to the specified led strip.

It should be noted that it's expected that the led_strip supervisor is already up and running

start_coordinator(strip_name, coordinator_name, config)

@spec start_coordinator(atom(), atom(), Fledex.Animation.Coordinator.config_t()) ::
  GenServer.on_start()

This starts a new coordinator. Which can receive events and react to those by impacting the running annimations.

start_link(strip_name, drivers, global_configs)

Start a new supervisor for an led strip.

stop(strip_name)

@spec stop(atom()) :: :ok

Stop the supervisor (and all it's children)

supervisor_name(strip_name)

@spec supervisor_name(atom()) :: GenServer.name()

workers_name(strip_name)

@spec workers_name(atom()) :: GenServer.name()