pub struct AttrConfig {Show 15 fields
pub doc: Option<Cow<'static, str>>,
pub label: Option<Cow<'static, str>>,
pub unit: Option<Cow<'static, str>>,
pub standard_unit: Option<f64>,
pub display_unit: Option<Cow<'static, str>>,
pub display_format: Option<Cow<'static, str>>,
pub range: AttrRangeConfig,
pub alarm: AttrRangeConfig,
pub warning: AttrRangeConfig,
pub delta: Option<AttrDeltaConfig>,
pub change_event: AttrChangeEventConfig,
pub periodic_event: AttrPeriodicEventConfig,
pub archive_event: AttrArchiveEventConfig,
pub enum_labels: Vec<Cow<'static, str>>,
pub extensions: Vec<Cow<'static, str>>,
}Expand description
Represent the current configuration of an attribute
The default configuration is the one of an attribute that declares nothing: no description, no unit, no bound of any kind, no event configured, at the operator display level, which is what a definition starts from and then fills in.
This is exactly what Tango keeps as the attribute properties of a device in the
database, and therefore exactly what a client is allowed to change, which is what
crate::backend::BackendDev::set_attr_config carries. Everything else a client reads
about an attribute is what the attribute is rather than how it is configured, and is
declared by the device, see AttrInfo.
Fields§
§doc: Option<Cow<'static, str>>The optional description of the attribute, which a client may change like any other
property, description being one of the attribute properties Tango keeps.
label: Option<Cow<'static, str>>The optional label of the attribute.
unit: Option<Cow<'static, str>>The optional real unit of the attribute: how the raw attribute value is represented.
standard_unit: Option<f64>The conversion factor for going from the raw attribute value to the international unit system.
display_unit: Option<Cow<'static, str>>The optional unit for displaying to the user.
display_format: Option<Cow<'static, str>>The display format of this value. That format is specified using printf formatting
symbols using %.
range: AttrRangeConfigThe allowed range for this attribute’s value.
alarm: AttrRangeConfigThe alarm range for this attribute’s value.
warning: AttrRangeConfigThe warning range for this attribute’s value.
delta: Option<AttrDeltaConfig>The optional delta alarm.
change_event: AttrChangeEventConfigConfiguration of the change event.
periodic_event: AttrPeriodicEventConfigConfiguration of the periodic event.
archive_event: AttrArchiveEventConfigConfiguration of the periodic event.
enum_labels: Vec<Cow<'static, str>>What the values of the attribute mean, which only a DevEnum has any of: they name
its values, an enumerated value being the index of its own label in this list.
This is a property like any other and a client may change it, which is why it is
here and not beside AttrInfo::data_kind: what a value of the attribute is
stays a DevEnum whatever the labels are renamed to.
extensions: Vec<Cow<'static, str>>Possible extensions.