Modes

class obdii.modes.group_commands.GroupCommands[source]

Bases: object

Single-mode command container.

Subclassed by each mode, see mode_**.py.

Access syntax:
  • group.ENGINE_SPEED – by attribute -> Command

  • group["ENGINE_SPEED"] – by name -> Command

  • group[0x0C] – by PID -> Command

Indexes are built once per instance by scanning the instance’s attributes.

class obdii.modes.group_modes.GroupModes[source]

Bases: object

Group several GroupCommands subclasses into one container.

Not usable standalone: a concrete aggregate subclasses both this class and every GroupCommands-based mode it wants to expose, see Modes.

Access syntax:
  • group.ENGINE_SPEED – by attribute -> Command

  • group["ENGINE_SPEED"] – by name -> Command

  • group[Mode.REQUEST] / group[1] – by mode -> GroupCommands

Indexes are built once per instance by scanning the instance’s attributes.

modes: Dict[Mode | int | str, GroupCommands]