BB.Servo.Feetech.Bridge.ParamMetadata (bb_servo_feetech v0.2.3)

Copy Markdown View Source

Metadata for Feetech servo control table parameters.

Categorises parameters and determines access permissions for the parameter bridge. Status parameters (temperature, voltage, load, etc.) are excluded as they are exposed via sensor messages instead.

Categories

  • :info - Read-only identification (firmware_version, servo_version)
  • :config - EEPROM settings, require torque off to write (limits, gains, mode)
  • :control - SRAM settings, writable at runtime (torque_enable, goal_position)

Summary

Functions

List all parameter names for a control table, excluding status parameters.

Get metadata for a specific parameter.

Check if a parameter requires torque to be disabled before writing.

Check if a parameter is a status parameter (excluded from bridge).

Check if a parameter is writable.

Types

category()

@type category() :: :info | :config | :control

control_table()

@type control_table() :: module()

param_info()

@type param_info() :: %{
  category: category(),
  writable: boolean(),
  requires_torque_off: boolean(),
  doc: String.t()
}

Functions

list_params(control_table)

@spec list_params(control_table()) :: [atom()]

List all parameter names for a control table, excluding status parameters.

param_info(control_table, param_name)

@spec param_info(control_table(), atom()) ::
  {:ok, param_info()} | {:error, :unknown_param}

Get metadata for a specific parameter.

requires_torque_off?(control_table, param_name)

@spec requires_torque_off?(control_table(), atom()) :: boolean()

Check if a parameter requires torque to be disabled before writing.

status_param?(param_name)

@spec status_param?(atom()) :: boolean()

Check if a parameter is a status parameter (excluded from bridge).

writable?(control_table, param_name)

@spec writable?(control_table(), atom()) :: boolean()

Check if a parameter is writable.