python-labthings icon indicating copy to clipboard operation
python-labthings copied to clipboard

Extensions should be able to add Components

Open jtc42 opened this issue 5 years ago • 2 comments

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

jtc42 avatar Feb 07 '20 11:02 jtc42

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?

rwb27 avatar Jun 17 '21 10:06 rwb27

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_component mechanism and means you don't need to worry about whether you are looking for an Extension or a SomethingElse...

rwb27 avatar Jun 22 '21 11:06 rwb27