Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert SingleMapping into ControllerAPI #93

Open
GDYendell opened this issue Nov 27, 2024 · 0 comments
Open

Convert SingleMapping into ControllerAPI #93

GDYendell opened this issue Nov 27, 2024 · 0 comments

Comments

@GDYendell
Copy link
Contributor

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?)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant