python-labthings
python-labthings copied to clipboard
Extensions should be able to add Components
Eventually, Extensions may become the backbone of constructing an LT app
Example of use: OFM with spectrometer: All spectrometer logic (functions, component, and views) can be handled by the extension
I've been thinking about this some more in relation to making it easier to swap stages, for example; is the notion of a Component already defined anywhere?
OK, mostly for my reference:
- Components are Python objects that get attached to the LabThing, with a name. This means they may be referenced by name rather than value.
- Extensions are not Components (currently). Should they be? It would allow one extension to be made aware of the registration of another extension through the
on_componentmechanism and means you don't need to worry about whether you are looking for an Extension or a SomethingElse...