Skip to content

Redesign device properties handling #7

@cfobel

Description

@cfobel

Current behaviour

Currently, each of the following properties MUST exist as a method on the proxy class that returns a np.array:

  • 'base_node_software_version'
  • 'package_name'
  • 'display_name'
  • 'manufacturer'
  • 'url'
  • 'software_version'
  • 'hardware_version'
  • 'id'
  • 'uuid'

The properties attribute is defined as a Python property that calls each of the methods (if they exist as attributes) and combines the results into a pandas.Series.

See also #6.

Reasoning behind current behaviour

Part of the reason why the above device properties are combined into a properties attribute is that the methods are returning np.array instances which must be converted to strings using the np.array.tostring() method. This is because the only supported way to return a string at the moment is by casting it as the data attribute of a UInt8Array in the C++ firmware.

The properties attribute was introduced to make things a bit easier, while explicitly defining the subset of methods to be queried as device properties. However, this behaviour is not very intuitive and is a bit clunky.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions