# `TangoAttribute`

digraph inheritanceba9bdeed13 { bgcolor=transparent; rankdir=UD; ratio=compress; size="8.0, 12.0"; "Logger" [URL="taurus-Logger.html#taurus.Logger",color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,target="_top",tooltip="The taurus logger class. All taurus pertinent classes should inherit"]; "TangoAttribute" [URL="#taurus.core.tango.TangoAttribute",color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,target="_top"]; "TaurusAttribute" -> "TangoAttribute" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TaurusAttribute" [URL="taurus.core.taurusattribute-TaurusAttribute.html#taurus.core.taurusattribute.TaurusAttribute",color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,target="_top"]; "TaurusModel" -> "TaurusAttribute" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TaurusModel" [URL="taurus.core.taurusmodel-TaurusModel.html#taurus.core.taurusmodel.TaurusModel",color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,target="_top"]; "Logger" -> "TaurusModel" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

class TangoAttribute(name='', parent=None, **kwargs)

  Import from `taurus.core.tango` as:

      from taurus.core.tango import TangoAttribute

  addListener(listener)

    Add a TaurusListener object in the listeners list. If it is the first element and Polling is enabled starts the polling mechanism. If the listener is already registered nothing happens.

  property alarms
  property calarms

    for backwards compat with taurus < 4

    Deprecated since version 4.0: Use getAlarms instead

  cleanUp()

    The cleanUp. Default implementation does nothing Overwrite when necessary

  property climits

    for backwards compat with taurus < 4

    Deprecated since version 4.0: Use getRange instead

  property cranges

    for backwards compat with taurus < 4

    Deprecated since version 4.0: Use getRange + getAlarms + getWarnings instead

  property cwarnings

    for backwards compat with taurus < 4

    Deprecated since version 4.0: Use getAlarms instead

  decode(attr_value)

    Decodes a value that was received from PyTango into the expected representation

  property description
  property dev_alias
  displayValue(**kwargs)

    Deprecated since version 4.0.

  encode(value)

    Translates the given value into a tango compatible value according to the attribute data type.

    Raises pint.DimensionalityError if value is a Quantity and it cannot be expressed in the units of the attribute set in the DB

  property format

    for backwards compat with taurus < 4

    Deprecated since version 4.0.4: Use format_spec or precision instead

  getAlarms(cache=True)
  getAttributeInfoEx(cache=True)
  getAttributeProxy()

    Convenience method that creates and returns a PyTango.AttributeProxy object

  getCAlarms(**kwargs)

    for backwards compat with taurus < 4

    Deprecated since version 4.0: Use getAlarms instead

  getCLimits(**kwargs)

    for backwards compat with taurus < 4

    Deprecated since version 4.0: Use getRange instead

  getCRanges(**kwargs)

    for backwards compat with taurus < 4

    Deprecated since version 4.0: Use getRange + getAlarms + getWarnings instead

  getCWarnings(**kwargs)

    Deprecated since version 4.0: Use getWarnings instead

  getConfig(**kwargs)

    Returns the current configuration of the attribute.

    Deprecated since version 4.0: Use self instead

  getDescription(**kwargs)

    Deprecated since version 4.0: Use .description instead

  getDisplayUnit(**kwargs)

    Deprecated since version 4.0: Use .rvalue.units instead

  getDisplayValue(**kwargs)

    Deprecated since version 4.0: Use getLabel instead

  getDisplayWriteValue(**kwargs)

    Deprecated since version 4.0.

  getFormat(cache=True)
  getLabel(cache=True)
  getLimits(cache=True)
  getMaxAlarm(**kwargs)

    for backwards compat with taurus < 4

    Deprecated since version 4.0: Use .alarms[1] instead

  getMaxDim(cache=True)
  getMaxDimX(**kwargs)

    Deprecated since version 4.0: Use getMaxDim instead

  getMaxDimY(**kwargs)

    Deprecated since version 4.0: Use getMaxDim instead

  getMaxValue(**kwargs)

    Deprecated since version 4.0: Use getMaxRange instead

  getMaxWarning(**kwargs)

    for backwards compat with taurus < 4

    Deprecated since version 4.0: Use .warnings[1] instead

  getMinAlarm(**kwargs)

    for backwards compat with taurus < 4

    Deprecated since version 4.0: Use .alarms[0] instead

  getMinValue(**kwargs)

    Deprecated since version 4.0: Use getMinRange instead

  getMinWarning(**kwargs)

    for backwards compat with taurus < 4

    Deprecated since version 4.0: Use .warnings[0] instead

  getNewOperation(value)
  getParam(**kwargs)

    Get attributes of AttributeInfoEx (PyTango)

    Deprecated since version 4.0: Use getAttributeInfoEx instead

  getRange(cache=True)
  getRanges(cache=True)
  getShape(**kwargs)

    Deprecated since version 4.0.

  getStandardUnit(**kwargs)

    Deprecated since version 4.0: Use .rvalue.units instead

  getSubscriptionState()
  getTangoWritable(cache=True)

    like TaurusAttribute.isWritable(), but it returns a PyTango.AttrWriteType instead of a bool

  getUnit(**kwargs)

    for backwards compat with taurus < 4

    Deprecated since version 4.0: Use .rvalue.units instead

  getWarnings(cache=True)
  getWritable(**kwargs)

    Deprecated since version 4.0: Use isWritable instead

  isBoolean(inc_array=False)
  isFloat(inc_array=False)
  isImage(**kwargs)

    Deprecated since version 4.0: Use self.data_format instead

  isInformDeviceOfErrors(**kwargs)

    Deprecated since version 4.0.

  isInteger(inc_array=False)
  isReadOnly(cache=True)
  isReadWrite(cache=True)
  isScalar(**kwargs)

    Deprecated since version 4.0: Use self.data_format instead

  isSpectrum(**kwargs)

    Deprecated since version 4.0: Use self.data_format instead

  isState()

    returns whether the attribute of tango DevState type

  isUsingEvents()
  isWrite(cache=True)
  property label
  property max_alarm

    for backwards compat with taurus < 4

    Deprecated since version 4.0: Use .alarms[1] instead

  property max_warning

    for backwards compat with taurus < 4

    Deprecated since version 4.0: Use .warnings[1] instead

  property min_alarm

    for backwards compat with taurus < 4

    Deprecated since version 4.0: Use .alarms[0] instead

  property min_warning

    for backwards compat with taurus < 4

    Deprecated since version 4.0: Use .warnings[0] instead

  no_abs_change = 'Not specified'
  no_archive_abs_change = 'Not specified'
  no_archive_period = 'Not specified'
  no_archive_rel_change = 'Not specified'
  no_cfg_value = '-----'
  no_delta_t = 'Not specified'
  no_delta_val = 'Not specified'
  no_description = 'No description'
  no_display_unit = 'No display unit'
  no_max_alarm = 'Not specified'
  no_max_value = 'Not specified'
  no_max_warning = 'Not specified'
  no_min_alarm = 'Not specified'
  no_min_value = 'Not specified'
  no_min_warning = 'Not specified'
  no_rel_change = 'Not specified'
  no_standard_unit = 'No standard unit'
  no_unit = 'No unit'
  not_specified = 'Not specified'
  poll(single=True, value=None, time=None, error=None)

    Notify listeners when the attribute has been polled

  push_event(event)

    Method invoked by the PyTango layer when an event occurs. It propagates the event to listeners and delegates other tasks to specific handlers for different event types.

  property range
  read(cache=True)

    Returns the current value of the attribute.

    If cache is False it will force a read from the device and return its value. If cache is True, it will return the cached value. If cache is a number, it will return the cached value if it’s newer than the specified number (in ms). Otherwise, it will act as if cache is False. If no cached value is available and cache is not False, it will wait until the polling or an event fill the cache to return its value. If polling is disabled and the attribute doesn’t send events, it will act as if cache is False.

    If there is an application and it’s starting, the cache validations are skipped and returns de cached value or None if the cache is empty.

    Parameters:

      cache (`bool` or `float`) – use cache value or make readout, eventually pass a cache’s expiration period in milliseconds

    Returns:

      attribute value

    Return type:

      `TangoAttributeValue`

  removeListener(listener)

    Remove a TaurusListener from the listeners list. If polling enabled and it is the last element the stop the polling timer. If the listener is not registered nothing happens.

  setAlarms(*limits)
  setConfigEx(config)
  setDescription(**kwargs)

    Deprecated since version 4.0: Use .description instead

  setLabel(lbl)
  setLimits(low, high)
  setMaxAlarm(**kwargs)

    Deprecated since version 4.0: Use .alarms instead

  setMaxWarning(**kwargs)

    Deprecated since version 4.0: Use .warnings instead

  setMinAlarm(**kwargs)

    Deprecated since version 4.0: Use .alarms instead

  setMinWarning(**kwargs)

    Deprecated since version 4.0: Use .warnings instead

  setParam(**kwargs)

    Set attributes of AttributeInfoEx (PyTango)

    Deprecated since version 4.0: Use PyTango instead

  setRange(*limits)
  setWarnings(*limits)
  subscribePendingEvents()

    Execute delayed event subscription

  property unit

    for backwards compat with taurus < 4

    Deprecated since version 4.0: Use .rvalue.units instead

  property warnings
  write(value, with_read=True)

    Write the value in the Tango Device Attribute