Skip to content

PF Control Protocol

This serial protocol is used to communicate between the host and the controller, usually over USB.

Registers

The controller has a number of registers, where each register holds a value. There are two types of registers:

  • Binary register, holds a value of 0 (false) or 1 (true). Any value below 0.5 is normalized to 0, any value of 0.5 or higher is normalized to 1.
  • Unit Integer register, holds a value between 0.0 and 1.0.

Some registers are read-only, some are write-only, some are read-write. Some registers are trigger registers, some are continuous registers. Each register has an address. The registers start at address 0x1 and up, register 0x0 has a special meaning.

  • 0x0000 — Read-only, continuous, always 0.

Host-to-Controller Communication

  • GET <registers> — Gets the current values of these registers.
  • SET <registers> <values> — Sets the current values of these registers.
    Note that this command triggers an event for read-write registers to which the host has subscribed.
  • SUBSCRIBE <registers> — Any changes to these registers are sent to the host.
  • UNSUBSCRIBE <registers> — Any changes to these registers are no longer sent to the host.
  • PING <value> — Pings whether the controller can respond.

Controller-to-Host Communication

  • PONG <value> — Response to a PING, with the same value.
  • ONCHANGE <registers> <values> — Subscribed registers changed, reporting their new values.