caproto.ioc_examples.enums.EnumIOC

Inheritance diagram of EnumIOC
class caproto.ioc_examples.enums.EnumIOC(prefix: str, *, macros: Optional[Dict[str, str]] = None, parent: Optional[caproto.server.server.PVGroup] = None, name: Optional[str] = None)[source]

An IOC with some enums.

Each property here presents itself as a record with the expected fields over Channel Access.

For bi and bo, the ZNAM and ONAM fields hold the string equivalent values for 0 and 1. These are derived from the enum_strings keyword argument.

That is, bo.ZNAM is “Zero Value”, bo.ONAM is "One Value", such that caput bo 1 would show it being set to "One Value".

For the mbbi record, the ZRST (zero string) field, ONST (one string) field, and so on (up to 15), are similarly respected and mapped from the enum_strings keyword argument.

EnumIOC pvproperties

Attribute

Suffix

Docs

Type

Notes

Alarm Group

bi

bi

ENUM (bi)

bo

bo

ENUM (bo)

enum_class

enum_class

MyEnum (mbbi)

mbbi

mbbi

ENUM (mbbi)

Methods

group_read(instance)

Generic read called for channels without get defined

group_write(instance, value)

Generic write called for channels without put defined

Attributes

default_values

type_map

type_map_read_only

pvproperty methods