Previous topic

qarbon.util

Next topic

Glossary

This Page

qarbon.value

Value definition.

Classes

AttributeConfig
Value A qarbon value.
AttributeValue A qarbon value.
class qarbon.value.AttributeConfig[source]

Bases: object

name = ''
label = '-----'
description = ''
ndim = -1
format = '%s'
display_level = <DisplayLevel._Invalid: 4>
display_format = '!s'
access = <Access._Invalid: 4>
unit = None
standard_unit = None
display_unit = None
min_value = None
max_value = None
min_alarm = None
max_alarm = None
min_warning = None
max_warning = None
value_range = (None, None)
alarm_range = (None, None)
warning_range = (None, None)
is_write()[source]
is_readonly()[source]
is_readwrite()[source]
is_scalar()[source]
is_spectrum()[source]
is_mage()[source]
class qarbon.value.Value[source]

Bases: object

A qarbon value. A container for a value read from a qarbon model. It contains the following members:

  • r_value (Quantity): (aka: value) a Quantity representing the read value

  • r_timestamp (datetime.datetime): the timestamp of reading the value

  • w_value (Quantity): a Quantity representing the write value

  • quality (Quality): the quality related to the read value

  • exc_info (tuple): a 3-tuple equivalent to sys.exc_info() if reading a

    value resulted in an exception or None otherwise

  • error (bool): tells the read resulted in an error

Example on how to pretty print

r_value = None
r_timestamp = None
r_ndim = None
r_quality = None
w_value = None
exc_info = None
value[source]
timestamp[source]
ndim[source]
quality[source]
error[source]
is_scalar()[source]
is_spectrum()[source]
is_image()[source]
class qarbon.value.AttributeValue[source]

Bases: qarbon.value.Value

A qarbon value. A container for a value read from a qarbon model. It contains the following members:

  • r_value (Quantity): (aka: value) a Quantity representing the read value

  • r_timestamp (datetime.datetime): the timestamp of reading the value

  • w_value (Quantity): a Quantity representing the write value

  • quality (Quality): the quality related to the read value

  • exc_info (tuple): a 3-tuple equivalent to sys.exc_info() if reading a

    value resulted in an exception or None otherwise

  • error (bool): tells the read resulted in an error

  • config (AttributeConfig): config object from which this value was obtained

Other configuration values can also be accessed:

  • name (str): model name from which the value was obtained
  • min_value (Quantity): minimum value allowed
  • max_value (Quantity): maximum value allowed
  • min_alarm (Quantity): minimum alarm value trigger
  • max_alarm (Quantity): maximum alarm value trigger
  • min_warning (Quantity): minimum warning value trigger
  • max_warning (Quantity): maximum warning value trigger
  • description (str): a description

Example on how to pretty print

config = <qarbon.value.AttributeConfig object at 0x2fa11d0>