Skip to content

APIs allow repeated capabilities to access attributes and methods that don't support them #2038

Open
@ni-jfitzger

Description

@ni-jfitzger

Description of issue

As of nimi-python 1.4.7, the way repeated capabilities work is thus:

  1. When a _RepeatedCapabilities object, such as Session.channels, is accessed, it returns a _SessionBase object with _SessionBase.repeated_capability updated, based on what's passed to index operator [].
  2. When setting an attribute or calling a method using a repeated capability, _SessionBase.repeated_capability is passed to the method or SetAttribute method.

_SessionBase is one big collection of properties and methods that support repeated capabilities, with no distinction of which repeated capabilities are supported. As an example, the nifgen API will allow a user to set an attribute that supports the data_marker repeated capability with the script_trigger repeated capability. Because we allow this, the user may be puzzled when they get back an error.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions