PyRogue Devices and Variables Recipes
Use these recipe-oriented pages for concrete examples:
Recipe 1: Add A Memory-Backed Control Variable
Problem
Expose a hardware register field as a writable tree variable.
Procedure
Define a
RemoteVariablein your device.Attach correct bit offset/size and access mode.
Validate read/write behavior from a simple client.
Deep Dive
Recipe 2: Create A Computed Status Value
Problem
Expose a derived metric without adding new hardware registers.
Procedure
Define a
LinkVariablethat depends on one or more source variables.Keep computation deterministic and side-effect free.
Confirm update behavior during polling and command workflows.