Skip to content

Convert SingleMapping into ControllerAPI #93

@GDYendell

Description

@GDYendell

After #67 and #87 are merged we should investigate refactoring the of passing attributes to the transport layer. Currently the Controller instance is passed around and the single mappings used to access the attributes, and also a link back to the Controller.

The idea now would be that the Backend initialises the Controller and can then provide a ControllerAPI. This will contain only the attributes and methods that are pre-bound to the Controller instance. ControllerAPI could either be a tree with a walk method to recurse the tree, build the path dynamically and return the attributes at that node. Or, it could be pre-flattened into a dict of full path to attributes. We should consider whether a transport might need the fully structured tree rather than the flattened dict for some reason.

Note in the above attributes includes, scan methods, put methods, etc.

Acceptance Criteria

  • Controller is no longer passed to the transport
  • All references to "mapping" removed (probably?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions