farmbot v6.4.1 Farmbot.System behaviour View Source

Common functionality that should be implemented by a system

Link to this section Summary

Types

Reason for a task to execute. Should be human readable

Any ole data that caused a factory reset. Will try to format it as a human readable binary

Callbacks

Should remove all persistant data. this includes:

  • network config
  • credentials

Restarts the machine

Shuts down the machine

Called when the Application stops

Link to this section Types

Reason for a task to execute. Should be human readable.

Link to this type unparsed_reason() View Source
unparsed_reason() :: any()

Any ole data that caused a factory reset. Will try to format it as a human readable binary.

Link to this section Functions

Link to this function do_format_reason(reason) View Source
Link to this function factory_reset(reason) View Source
factory_reset(unparsed_reason()) :: no_return()

Remove all configuration data, and reboot.

Format an error for human consumption.

Link to this function format_stacktrace(stacktrace, acc \\ []) View Source
Link to this function sanitize_args(args, acc \\ []) View Source

Shutdown.

Link to this section Callbacks

Link to this callback factory_reset(reason) View Source
factory_reset(reason()) :: no_return()

Should remove all persistant data. this includes:

  • network config
  • credentials

Restarts the machine.

Link to this callback shutdown(reason) View Source
shutdown(reason()) :: no_return()

Shuts down the machine.

Called when the Application stops.