cacao-org / cacao

Compute And Control for Adaptive Optics
GNU General Public License v3.0
24 stars 9 forks source link

New "Function Parameter Structure" #9

Closed oguyon closed 2 years ago

oguyon commented 5 years ago

cacao currently uses bash dialog scripts / GUI for high level control. While bash is OK for simple scripts, it is inadequate for more complex setups, and is becoming very difficult to maintain. I am proposing a solution to address this issue.

The general framework/goal is to build a structure (the "function parameter structure", or fps) that holds the parameters for each process. The structure includes flags that describe if the parameter is read only or can be written at configuration and/or runtime, + other useful flags.

The fundamental goal here is that the information to build the GUIs is in this structure, so it should be easy for users to do their own GUIs and parameter logging scheme. As much as possible, I am trying to include the "logic" into the structure/data rather than have it part of the GUI.

See end of file CLIcore.h, and file function_parameters.c for details (both in CommandLineInterface module, and under construction). This is a significant change that will take time to mature and propagate to all modules, but I believe it will be very powerful.

Comments ?

a-sevin commented 5 years ago

It looks like a parameter database. I need some time/discussions to understand pros/cons vs using a standard DB tool. However, it's a good idea to separate data parameters and processes.

oguyon commented 5 years ago

This new parameter structure framework could be complementary to standard DB tool(s).

The function parameter structure (fps) is for fast access and visibility into the parameter functions, and is meant to include the logic links between parameters (what to do if a parameter value changes, etc...).

The DB would be for storage/archival and higher level management of parameters.

oguyon commented 5 years ago

update: the function parameter structure (FPS) is now in place and part of release 0.1.02. Several processes now use it. Over the next few weeks, most AO-related process will make use of it. There are still things to be figured out for storing the parameters on disk and archiving them. Will keep this issue active until we settle on this topic.

oguyon commented 2 years ago

FPS is now mature and stable