Specifications

Mnemonics Database

We store our mnemonic defintions within a flat tab delimited plain text format. The format has evolved over time to support required functionality.

The first row contains the header. The header defines the columns contents. The columns can be in any order.

Each row defines a single mnemonic and is uniquely identified by the DATA_ID. DATA_ID is also often refered to as Housekeeping ID or HKID for shorthand.

If required, the column must exist but row values may still be empty. Empty values will be default initialized.

Column Type Description Required Empty Allowed Default Value
SUB_SYSTEM String The subsystem. May be empty. Ex: CDH Yes Yes Empty String
NAME String The mnemonic's name. Ex: PowerSupplyCurrent Yes No
DESCRIPTION String The mnemonic's description Yes Yes Empty String
ADC_# Integer The ADC channel No Yes 0
DATA_ID Integer The unique ID Yes No
PACKET_TYPE Integer The packet type or CCSDS Application ID Yes No
PACKET_SUBTYPE Integer Packet subtype No Yes 0
PACKET_NAME String The name of the packet the mnemonic belongs to No Yes Empty String
APPLY_WHEN String Apply when condition of the format: HKID=RANGE. No Yes No apply when conditions
DECODE_TYPE Integer The decoder type Yes No
DECODE_ID1 Integer Decode ID 1 Yes No
DECODE_ID2 Integer Decode ID 2 Yes No
DECODE_ID3 Integer Decode ID 3 Yes No
DECODE_ID4 Integer Decode ID 4 Yes No
CLOCK String The clock's name No Yes Empty String
RAW_FMT String The raw format Yes No
ENG_FMT String The string formatting when engineering conversion is applied Yes No
ENG_EQ_TYPE Integer The type of conversion to apply to the raw value Yes No
ENG_K1 Double Eng Coefficient 1 Yes No
ENG_K2 Double Eng Coefficient 2 Yes No
SCI_UNITS String The science units Yes Yes
SCI_FMT String The string formatting when science conversion is applied Yes No
SCI_EQ_TYPE Integer The type of conversion to apply Yes No
SCI_FROM_ENG bool If true, the engineering conversion will be applied before applying the science conversion Yes No
SCI_K1 Double Science Coefficient 1 Yes No
SCI_K2 Double Science Coefficient 2 Yes No
SCI_K3 Double Science Coefficient 3 Yes No
SCI_K4 Double Science Coefficient 4 Yes No
SCI_K5 Double Science Coefficient 5 Yes No
SCI_K6 Double Science Coefficient 6 Yes No
SCI_K7 Double Science Coefficeint 7 Yes No
SCI_K8 Double Science Coefficient 8 Yes No
MUX_CH Integer The corresponding mux channel for this mnemonic No Yes
LIMIT_TYPE_1 Integer Bit pattern defining the limit configuration No Yes
YELLOW_LIMIT_1 Double The yellow limit value No Yes
RED_LIMIT_1 Double The red limit value No Yes
LIMIT_TYPE_2 Integer Bit pattern defining the limit configuration No Yes
YELLOW_LIMIT_2 Double The yellow limit value No Yes
RED_LIMIT_2 Double The red limit value No Yes
LIMITS JSON The limit set definition No Yes
EXTRA_1 String Used for various purposes depending on the SCI_EQ_TYPE No Yes
XINA_MINE_TYPE Integer The XINA mining mode No Yes
XINA_MINE_RAW bool Whether or not to mine the RAW values No Yes
XINA_MINE_ENG bool Whether or not to mine the ENG values No Yes
DISCRETE_LABELS String Maps a value to string No Yes
BUNDLE_ID Integer The XINA bundle ID No Yes

Metadata File

Mnemonic Limit Definitions

This page defines the format of the limit definitions used by the Data Viewer application.

A Limit Definition is a JSON object that describes limit thresholds for a single mnemonic telemetry value. The operator/user will be notified when a limit is triggered.

The top level object supports the following fields:

Field Required Value Format Meaning
limits Yes JSON Array Array of 1 or more limit objects. Each object defines a set of limit thresholds. If a Limit Definition does not define a context mnemonic, the array should contain a single object.
cm No String or integer Context Mnemonic. The optional mnemonic that is used to determine if a limit should be checked. For example, you may want to only check a current monitor mnemonic's limit when a temperature is between 25 and 30 celsius. In that case, the temperature mnemonic would be the context mnemonic. Can be provided as the mnemonic name or numeric ID e.g. MMC.HK:WRP_CURRENT or 5204.

Each limit object supports the following fields:

Field Required Value Format Meaning
cr No Single number or range syntax Context range. Only used if cm is provided at the top level. If the context mnemonic equals this value or falls within this range, the limit will be checked. If cm is provided but cr is not, the limit object will be used as the "default" limit. Single number example: 1.5 the limit will be used when the context mnemonic's value equals 1.5.. Range example: "5.2..10.3" the limit will be used when the context mnemonic's value falls between 5.2 and 10.3, inclusive.
ec No Integer Excursion count. Number of consecutive telemetry values that must exceed a threshold before the limit is triggered. Defaults to 2 if not provided.
yh No Number Yellow high threshold. Triggers a yellow high alarm when the telemetry value is greater than or equal to this value for the required excursion count.
yl No Number Yellow low threshold. Triggers a yellow low alarm when the telemetry value is less than or equal to this value for the required excursion count.
rh No Number Red high threshold. Triggers a red high alarm when the telemetry value is greater than or equal to this value for the required excursion count.
rl No Number Red low threshold. Triggers a red low alarm when the telemetry value is less than or equal to this value for the required excursion count.

Notes:

Example A:

{
  "limits": [
    {
      "ec": 5,
      "rh": 20,
      "yl": -5,
      "rl": -12
    }
  ]
}

The below visualizes how the limit thresholds are evaluated:

y-axis: Telemetry value
      ^
      |
      |   RED HIGH alarm zone
      |   value >= 20 for 5 consecutive samples
  20  +------------------------------------------------ rh
      |
      |
      | 
      |   Nominal range
      |
      |
      |
  -5  +------------------------------------------------ yl
      |   YELLOW LOW alarm zone
      |   value =< -5 for 5 consecutive samples
      |
 -12  +------------------------------------------------ rl
      |   RED LOW alarm zone
      |   value =< -12 for 5 consecutive samples
      |
      +----------------------------------------------------> x-axis: time / samples
      |

Example B:

{
  "cm": "BOARD_TEMP",
  "limits": [
    {
      "rh": 2.5,
      "yh": 2.0
    },
    {
      "cr": "0..25",
      "ec": 3,
      "rh": 2.3,
      "yh": 1.8
    }
  ]
}

Example C:

{
  "cm": "MODE",
  "limits": [
    {
      "cr": 0,
      "rh": 1.5,
      "yh": 1.0
    },
    {
      "cr": 1,
      "ec": 2,
      "rh": 5.0,
      "yh": 4.5
    },
    {
      "cr": 2,
      "ec": 4,
      "rh": 10.0,
      "yh": 9.5
    }
  ]
}

Expected Values Definition

The Expected Values Definition file is a CSV file that is used by the c_expectedvaluechk Python tool.