Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notes on SCOS Database Tables #8

Open
pasetti opened this issue May 2, 2021 · 6 comments
Open

Notes on SCOS Database Tables #8

pasetti opened this issue May 2, 2021 · 6 comments
Labels
Information This issue provides background info

Comments

@pasetti
Copy link
Contributor

pasetti commented May 2, 2021

The FCP Editor has a link to a SCOS database. This link has already been implemented in the "auto-completion" feature of the FW Profile Editor. The SCOS database describes the "telecommands" (TC) and "telemetry reports" (TMs) which are manipulated by the FCP. Both telecommands and telemetry reports consists of sequence of "parameters". Some parameters are of numerical type (their value is a number); others are of enumerated type (their value is an enumerated value expressed as an alphanumeric string).

In this ticket, I give some background information on some of the tables of the SCOS Database. Only information which is relevant to the FCP Editor is provided here. This ticket does not require any action: it only serves as reference.

PID Table
This table describes TM reports in terms of:

  • TYPE and STYPE (type and sub-type)
  • SPID (the unique identifier of the TM report)
  • PID_DESCR (the human-readable descriptive name of the TM report)

PCF Table
A TM Report carries one or more parameters. This table defines the parameters of a TM Report in terms of:

  • PCF_NAME: the unique identifier of a TM Parameter)
  • PCF_DESCR: the human-readable descriptive name of the TM Parameter)
  • PCF_PID: either NULL or an integer if the parameter is a "HK Parameter")
  • PCF_CATEG: equal to "S" for parameters of enumerated type (can be disregarded in other cases)
  • PCF_CURTX: the enumerated type of the parameter (only relevant for parameters with PCF_CATEG equal to "S")

PLF Table
This table describes the allocation of TM parameters to the TM reports: it lists the PCF_NAMEs of the TM parameters and gives the SPIDs of the packets to which they belong. Note that a TM Parameter may belong to multiple TM Reports.

TXP Table
Some TM parameters are of enumerated type (see CURTX field in PCF table). This table defines their enumerated types in terms of:

  • TXP_NUMBR: the unique identifier of the enumerated type (same as CURTX in PCF table)
  • TXP_ALTTXT: the enumerated value

CCF Table
This table describes a TC in terms of:

  • CNAME: the unique identifier of a TC
  • DESCR: the human-readable descriptive name of a TC
  • DESCR2: the long description of a TC
  • TYPE and STYPE: the type and sub-type of a TC

CDF Table
A TC may carry one or more parameters. This table describes the parameters in a TC in terms of:

  • PNAME: the unique identifier of the TC parameter
  • CNAME: the unique identifier of the TC to which the parameter is allocated
  • GRPSIZE: either NULL or zero for non-group parameters or the group size (a positive integer)

CPC Table
This table describes a TC parameter in terms of

  • PNAME: the unique identifier of the TC parameter
  • DESCR: the human-readable descriptive name of the TC Parameter
  • PAFREF: the enumeration type (only provided for parameters of enumerated type)

PAS Table
Some TC parameters are of enumerated type (see PAFREF field in CPC table). This table defines their enumerated types in terms of:

  • PAS_NUMBR: the unique identifier of the enumerated type (same as PAFREF in CPC table)
  • PAS_ALTTXT: the enumerated value
  • PAS_ALTVAL: the raw value
@pasetti pasetti added the Information This issue provides background info label May 2, 2021
@Tomas-M
Copy link
Contributor

Tomas-M commented May 14, 2021

Can we have a SQL dump of SCOS database included in source files somewhere? Like a scos_dump.sql or something.
Preferably with only the tables we need here, so I can orient in it easier.
Thank you

@Tomas-M
Copy link
Contributor

Tomas-M commented May 14, 2021

I think I should have asked in a better way. I will try once more :)
My question is, is it legally possible to put the database into sources? I mean, is there no copyright or similar thing on it? I have some version of the database, but I don't know if I can put it to the sources myself, considering the sources are publicly available on github.

@Tomas-M
Copy link
Contributor

Tomas-M commented May 15, 2021

PID Table
This table describes TM reports in terms of:

  • TYPE and STYPE (type and sub-type)
  • SPID (the unique identifier of the TM report)
  • PID_DESCR (the human-readable descriptive name of the TM report)

I need clarification on this.
I have some SQL with database, and there is a "pid" table only (lowercase), and in this table there are columns such as PID_TYPE (not TYPE without prefix), PID_STYPE (not STYPE without prefix). Do I have correct database? Should I assume that you mean all column names with the appropriate prefixes where missing? Thank you

@pasetti
Copy link
Contributor Author

pasetti commented May 15, 2021

The naming of the SCOS databases is unfortunately often confusing ... (but it has historical reasons and is now so widely used that it is impossible to change if).

In the specific case you mention, your assumptions are correct:

  • The 'pid' table is the same as the PID table
  • The table name acts as a prefix for the column names (thus, we have PID_TYPE, PID_STYPE, etc)

@Tomas-M
Copy link
Contributor

Tomas-M commented May 15, 2021

I made a script which converts all the tables into a single JSON object, where parameters are embeded as arrays to their respective telecommands or telemetry reports. You can preview the result here (not required, just in case if you spot anything wrong there):
http://slax.org/projects/a/fcp-editor/aaa.php

I've omitted all column prefixes
I plan to use this json as input for autocompleter.
I will inform you when there is another progress

@pasetti
Copy link
Contributor Author

pasetti commented May 15, 2021

I have a look at the json file and I did not see anything wrong with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Information This issue provides background info
Projects
None yet
Development

No branches or pull requests

2 participants