pnp-software / fcp-editor

Web-based editor for specifying Flight Control Procedures (FCPs) based on ESA's SCOS-2000 standard.
MIT License
3 stars 1 forks source link

New Autocompletion Feature: TC Parameter #12

Closed pasetti closed 3 years ago

pasetti commented 3 years ago

We currently have an autocompletion feature for telecommands (TCs): if the user starts typing "#TC", the auto-completion feature will provide a list of all TCs and the user can select the one he wants which will appear as: "TC(x,y)" (the unique name of the TC should ideally appear in the hovering tip over the "TC(x,y)").

TCs may carry parameters. It would be useful to have the option to refer to TC parameters. Unfortunately, getting the list of parameters of a TC is more complicated because it requires information from 2 different SCOS tables:

In order to let users enter TC parameters, one solution would be for them to enter: #TC(x,y)" and then the auto-completion feature would respond with a list of CNAMEs corresponding to TC(x,y) and a list of parameters for each CNAME.

To illustrate, consider the example of the TC(6,2). There are three CNAMEs corresponding to this TC:

DPC60002 DPU_DBS_TC_LOAD_MEMORY DPC70010 DPU_IFSW_LOAD_MEM SCC00006 SES CMD_Memory_Load

The auto-completion list should include their parameters in a format like this:

DPU_DBS_TC_LOAD_MEMORY  DPP70007    DPU_IFSW_DpuMemoryId
DPU_DBS_TC_LOAD_MEMORY  DPP70008    DPU_IFSW_StartAddress
DPU_DBS_TC_LOAD_MEMORY  DPP60018    DPU_DBS_MEMLOAD_LENGTH
DPU_DBS_TC_LOAD_MEMORY  DPP70010    DPU_IFSW_BlockData
DPU_IFSW_LOAD_MEM   DPP70007    DPU_IFSW_DpuMemoryId
DPU_IFSW_LOAD_MEM   DPP70008    DPU_IFSW_StartAddress
DPU_IFSW_LOAD_MEM   DPP70009    DPU_IFSW_BlockLength
DPU_IFSW_LOAD_MEM   DPP70010    DPU_IFSW_BlockData
SES CMD_Memory_Load SCP00005    PAR_MEMORY_ID_LOAD  
SES CMD_Memory_Load SCP00006    PAR_START_ADDRESS_LOAD  
SES CMD_Memory_Load SCP00007    PAR_BLOCK_LENGTH_LOAD   
SES CMD_Memory_Load SCP00008    PAR_MEM_DATA_BLOCK_LOAD

If, for instance, he selects the third entry, the text displayed should be: "DPU_DBS_MEMLOAD_LENGTH" and, if he hovers over this text, he should see the full string: "DPU_DBS_TC_LOAD_MEMORY DPP60018 DPU_DBS_MEMLOAD_LENGTH"

Tomas-M commented 3 years ago

I have different data in the database, first of all I have three CNAMEs

CNAME: "DPC60002", DESCR: "DPU_DBS_TC_LOAD_MEMORY" CNAME: "DPC70010", DESCR: "DPU_IFSW_LOAD_MEM" CNAME: "SCC00006", DESCR: "SES CMD_Memory_Load"

And secondly, I can see different parameter name for DPC60002:

DPU_DBS_TC_LOAD_MEMORY ... DPP60018 ... DPU_DBS_MEMLOAD_LENGTH (instead of DPP70009 - DPU_IFSW_BlockLength as seen in your example)

Maybe I have wrong version of the database? If so, would you please send me a correct one? Thank you

pasetti commented 3 years ago

My apologies!!!! I had copied the data from the DB manually and I had made mistakes ... I have corrected them in my previous update of this ticket.

Tomas-M commented 3 years ago

Ah, OK, no problem. But still, I see differences I have the following four rows in database table cdf:

DPC60002 | 0 | DPP70007 DPC60002 | 0 | DPP70008 DPC60002 | 1 | DPP60018 DPC60002 | 0 | DPP70010

Note that the third line has DPP60018 in my database (which later corresponds to DPU_DBS_MEMLOAD_LENGTH in cpc table), not DPP70018

Actually it doesn't matter if I have the correct data or not, but I am just curious why there is such mismatch on my side.

Maybe it will be best if you send me latest version of the database anyway.

pasetti commented 3 years ago

Yes, you are right again: I have corrected the error in my original post but it is very difficult to get it right by hand ... in any case, as you say, it does not matter too much for our purposes (in fact, this is why we need a tool!).

The apparent discrepancy might be due to the fact that the parameter DPP60018 is a "group parameter". This is another level of complexity which I have not yet described to you to avoid confusion but which might have to be handled later. The basic idea is that, sometimes, a TC or a TM report has "repetition groups", namely groups of parameters which are repeated a fixed number of times within the body of the TC or TM report. For instance, you might have a TM report which carries 6 sets of temperature and voltage measurements. In that case, its description in the database would consist of two parameters as follows:

Here, the secondfield is the "group size" (CDF_GRPSIZE). In the example above, the fact that parameter DPP12345 has a group size of 2 indicates that the next two elements are repeated 'NumberOfMeasSets' times.

But I think we should things one step at time and, for the time being, I would ignore this additional difficulty ...

pasetti commented 3 years ago

The #TC auto-completion feature is now available.