feathersdk.robot.services.battery_service Module

class feathersdk.robot.services.battery_service.BatteryServiceConfig(*, module_name='battery_service', telemetry_size=100, operating_frequency=1.0, soc_telem_act_id=125, param_read_timeout=0.5)

Bases: PyDFrozenBaseModel

Configuration for the battery service.

Parameters:
  • module_name (str)

  • telemetry_size (int)

  • operating_frequency (float)

  • soc_telem_act_id (int)

  • param_read_timeout (float)

module_name: str

The name of the module.

telemetry_size: int

The size of the telemetry buffer for the battery.

operating_frequency: float

The operating frequency of the battery service in Hz.

soc_telem_act_id: int

The ID of the SOC telemetry (pretending that it’s an actuator).

param_read_timeout: float

Max seconds to wait for one SOC param’s telemetry to update after requesting a read.

property name: str

Alias so ActuatorTelemetry can key channels as {name}.{param}.

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class feathersdk.robot.services.battery_service.BatteryTelemetry(service)

Bases: ActuatorTelemetry[SOCParamCode]

Telemetry for the battery.

Parameters:

service (BatteryService)

PARAMS

The telemetry and write_param()/read_param() parameters for the battery.

alias of SOCParamCode

class feathersdk.robot.services.battery_service.BatteryService(config, *args, **kwargs)

Bases: RobotModule[BatteryServiceConfig]

A service that monitors the battery.

Parameters:
PARAMS

The telemetry parameters for the battery.

node_id

The canopen node ID of the SOC board.

read_param(param, block=True)

Attempt to read a SOC param and wait for the result if block is True.

Parameters:
  • param (SOCParamCode)

  • block (bool)

Return type:

None