BB.Error.Protocol.Robotis.HardwareAlert exception (bb_servo_robotis v0.3.1)

Copy Markdown View Source

Robotis/Dynamixel servo hardware alert error.

Raised when a Dynamixel servo reports hardware error status flags. The alerts field contains a list of active alert atoms.

Alert Types

  • :input_voltage - Input voltage out of range
  • :overheating - Motor temperature too high
  • :motor_encoder - Motor encoder malfunction
  • :electrical_shock - Electrical shock detected
  • :overload - Motor overload detected

Summary

Functions

Creates a HardwareAlert from raw hardware error bits.

Types

alert()

@type alert() ::
  :input_voltage | :overheating | :motor_encoder | :electrical_shock | :overload

t()

@type t() :: %BB.Error.Protocol.Robotis.HardwareAlert{
  __exception__: true,
  alerts: [alert()],
  bread_crumbs: term(),
  class: term(),
  path: term(),
  raw_value: non_neg_integer(),
  servo_id: non_neg_integer(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}

Functions

exception(args)

@spec exception(opts :: Keyword.t()) :: %BB.Error.Protocol.Robotis.HardwareAlert{
  __exception__: true,
  alerts: term(),
  bread_crumbs: term(),
  class: term(),
  path: term(),
  raw_value: term(),
  servo_id: term(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}

Create an Elixir.BB.Error.Protocol.Robotis.HardwareAlert without raising it.

Keys

  • :servo_id
  • :alerts
  • :raw_value

from_bits(servo_id, bits)

@spec from_bits(non_neg_integer(), non_neg_integer()) :: t()

Creates a HardwareAlert from raw hardware error bits.