Next: , Up: Adding Substance: Inputs and Outputs   [Contents]


4.2.1 The Anatomy of an I/O Object

Every sensor and every actuator in STARTER begins life the same way: you call st_input_new or st_output_new and hand over a little passport—name, human description, unit, allowed range, step, a starting value, and those policy flags. If the metadata is nonsense, the library does not abort your process; it returns NULL and fills a GError, so you can fail soft and keep the rest of the plant alive. The constructors look identical on purpose; what changes is who owns the value. Dive into api-st-input and api-st-output when you want every parameter spelled out.