STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
feedtwin.model.spec.OptionSpec Class Reference

Public Member Functions

None __post_init__ (self)
bool applies_to (self, str model)

Static Public Attributes

tuple choices [str, ...]
tuple models = ()

Detailed Description

A categorical choice a component accepts.

Parameters are numbers; some configuration is not. Which friction
correlation to use, which Crane fitting a bend is, whether a valve's
characteristic is linear or equal-percentage -- all real configuration, none
of it a float.

Choices are enumerated, so an invalid one fails at load with the valid set
listed, and a UI can render a dropdown from the declaration. This is what
makes "the choice of correlation is a parameter like anything else" true
rather than aspirational.

Definition at line 99 of file spec.py.

Member Function Documentation

◆ __post_init__()

None feedtwin.model.spec.OptionSpec.__post_init__ ( self)

Definition at line 119 of file spec.py.

References choices, and feedtwin.model.spec.ParamSpec.default.

◆ applies_to()

bool feedtwin.model.spec.OptionSpec.applies_to ( self,
str model )

Member Data Documentation

◆ choices

tuple feedtwin.model.spec.OptionSpec.choices [str, ...]
static

Definition at line 114 of file spec.py.

Referenced by __post_init__().

◆ models


The documentation for this class was generated from the following file:
  • lib/feedtwin/feedtwin/model/spec.py