Ian,
It wouldn't be the first time my mind is on a different plane from everyone elses, extremely annoying (also for me ).
These are the tasks at hand for the moment:
My only concern at this point is:
- all image teams need to agree on the interface. whatever the interface may be
- all image teams need to agree on the methods of that interface, their prototype, and their return value
- all developers need a single set of documentation that documents the above
- all image teams need to agree on how to maintain that documentation, and to keep their code in sync with it through versioning
And maybe before that:
- all image teams need to agree on the required functionality.
We had a bit of discussion about functionality:
- Needs to be accessable from Python code
- Needs to be accessable from C code
- Needs to be accessable from Bash script / CLI
- Needs to support runtime determined data
- Needs to be accessable from the running image in case of multiboot
We had a bit of discussion about interface:
- The preference is to write it in Python
- Python functions and class methods can be called from C
- Python functions and class methods can be made accessable from the CLI
- No static datastructure (doesn't support runtime data)
- No global datastructure (doesn't support multiple instances in case of multiiboot)
- No single getter (implies having a static datastructure)
- No global functions (doesn't support multiple instances in case of multiiboot)
This implies (I think):
- that the interface has to in the form of a Python class
- that the class needs getters per supported value (so they can contain code instead of only static data)
- that the class needs a factory for instantiation, with the multiboot slot number (or 0 or no parameter for the current running image)
- that we therefore also need to standardize that factory function or method
That factory function or method would replace ATV's current boxbranding_reader(), and by passing the slot number instead of a path, it can create an instance using the Python class file from that slot partition in the same way ATV now loads boxbranding.so. This decouples the interface from it's implementation (ATV can continue to use their boxbranding.so internally, OpenVision their solution, etc)
So something like
current = factory_function(0)
print current.getImageName() # currently running image
slot1 = factory_function(1)
print slot1.getImageName() # image installed in slot 1
slot2 = factory_function(2)
print slot2.getImageName() # image installed in slot 2
This way the entire implementation is abstracted away from Enigma or plugin code, the only things we need to agree on, and document, are:
- the exact name of this factory function or method (as it should be the same for all images)
- the exact name and location of the py that contains the interface class (so the factory can import it, no matter which image is running)
- the exact name of the interface class in that py (so the factory can instantiate it)
- the prototypes of all interface class methods (like the getImageName() in the example above), their arguments, and their return value (secoond task above)
And every team can implement this they way they see fit, without imposing any requirements or restrictions on other teams.
And the third and fourth tasks shouldn't be forgotten, because without commitment of all teams involved, and without proper governance of the class API, this project is dead before it is started...
Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)
Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.
Many answers to your question can be found in our new and improved wiki.