# `BB.Error.State.NotArmed`
[🔗](https://github.com/beam-bots/bb/blob/main/lib/bb/error/state/not_armed.ex#L5)

Command refused because the robot is not armed.

`BB.Actuator.Server` checks `BB.Safety.armed?/1` before handing a command
to a driver, so no actuator can drive hardware while the robot is disarmed.
Stop commands are exempt and never produce this error.

This is a `:state` error rather than a `:safety` one: the safety system
working as intended is not a safety violation.

# `t`

```elixir
@type t() :: %BB.Error.State.NotArmed{
  __exception__: term(),
  actuator: atom(),
  bread_crumbs: term(),
  class: term(),
  command: module(),
  path: term(),
  robot: module() | nil,
  splode: term(),
  stacktrace: term(),
  vars: term()
}
```

# `exception`

```elixir
@spec exception(opts :: Keyword.t()) :: %BB.Error.State.NotArmed{
  __exception__: term(),
  actuator: term(),
  bread_crumbs: term(),
  class: term(),
  command: term(),
  path: term(),
  robot: term(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}
```

Create an `Elixir.BB.Error.State.NotArmed` without raising it.

## Keys

- :robot
- :actuator
- :command

---

*Consult [api-reference.md](api-reference.md) for complete listing*
