farmbot v6.0.1-alpha 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

Functions

Remove all configuration data, and reboot

Format an error for human consumption

Shutdown

Callbacks

Should remove all persistant data. this includes:

  • network config
  • credentials

Restarts the machine

Shuts down the machine

Link to this section Types

Link to this type reason() View Source
reason() :: binary

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 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 reboot(reason) View Source
reboot(unparsed_reason) :: no_return

Reboot.

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

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
Link to this callback reboot(reason) View Source
reboot(reason) :: no_return

Restarts the machine.

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

Shuts down the machine.