How to Configure Label Tables
This page explains how to customize the appearance and content of parameter and variable tables.
Label Table Configuration
Per FC, there is always one generic chapter with the default name Systemconstant-Parameter-Variable-Classinstance-Structure. This chapter contains the tables for all the elements, which are specified in the corresponding MDX, ARXML or xls-file. The name of the chapter and the appearance of the tables can be configured with the command line parameter -tableconfig "file_path\file.json". The JSON file defines the view as follows:
{
"chapter": "Name of the chapter in EHB-NAV",
"tables": [
{
"title": "Variable",
"filters": [
{
"id": "ehb_element_type",
"value": "ehb_variable"
}
],
"columns": [
{
"title": "Name",
"id": "ehb_name",
"width": "20%"
},
{
"title": "Description",
"id": "ehb_desc",
"width": "40%"
},
{
"title": "Unit",
"id": "Unit",
"width": "10%"
},
{
"title": "Data Type",
"id": "Type",
"width": "10%"
},
{
"title": "Mode",
"id": "ehb_mode",
"width": "20%"
}
]
},
{
"title": "Calibration/Parameter",
"filters": [
{
"id": "ehb_element_type",
"value": "ehb_parameter"
}
],
"columns": [
{
"...": "..."
}
]
}
]
}
The "tables": [] section defines the appearance of each table.
Each table begins with a title entry: "title": "Name of the table title in EHB-NAV"
In the section "columns": [ ] per column entry, a "title" & "id" pair defines the column content:
"title": "column name" defines the name of the column in EHB-NAV
"id": "Input source value from MDX, ARXML or xls to be shown".
"width": Defines width of the table column that can be configured in PDF. "width" is denoted in percentage.
For the "id" values, fixed pre-defined key words are used:
| Key word for "id": "…" in JSON | Corresponds to column in xls | Corresponds to key word in MDX |
|---|---|---|
"ehb_name" |
"Name" |
<SHORT-NAME> |
"ehb_desc" |
"Description" |
<LONG-NAME> |
"ehb_mode" |
"Xref" |
No tag avail. |
"ehb_access" |
N.A. |
<SW-CALIBRATION-ACCESS> |
"ehb_data_type" |
"Class" |
<BASE-TYPE-REF> |
"ehb_reference" |
N.A. |
No tag avail. used for class instance table only |
"ehb_category" |
N.A. |
Entry in <CATEGORY> |
For other element properties, defined in further column entries in the xls file, the identical name is used in the JSON file as "id" value also. The same applies for MDX entries used for properties.
You can define as many "title" & "id" pairs as you want, but you have to consider the page width in EHB-NAV and especially in PDF if printing is required.
The order of the "title" & "id" pairs in the JSON file are defining the order of the columns in EHB-NAV from left to right.
The order of the tables in the JSON file are defining the order of the tables in EHB-NAV from top to bottom.
You can divide the tables into different ones by adding additional filter attributes.
"title": "Input Variables",
"filters": [
{
"id": "ehb_element_type",
"value": "ehb_variable"
},
{
"id": "ehb_mode",
"value": "import"
},
{
"...": "..."
}
]
A filter criterion can be configured as "id" & "value" pairs
"id": "type" defines the type for the filtering
"value": "value of type" defines the content of type, which should match the filter criteria
For "type" and "value" fixed pre-defined key words are used:
| Key word for "id": "…" | Matching key words for "value": "…" | Corresponding entry in xls | Corresponding entry in MDX | Corresponding entry in ARXML |
|---|---|---|---|---|
"ehb_mode" |
"import" "export" "local" |
IN OUT LOC |
<IMPORT> <EXPORT> <SW-FEATURE-OWNED-ELEMENT-SET> |
<R-PORT> <P-PORT> N.A |
For other element properties required for as filter criterion, the corresponding column entry in the xls file can be used. Here the identical column name is required in the JSON file as "id": "type" also. In addition, the text entry in the column must be identical in the JSON "value": "text entry". The same applies for MDX and ARXML entries used for filtering.
Multiple filter criteria can be used. They are combined as logical AND, e.g. element_type=variable & mode=exported & type=float.
You can define as many tables as you want, with any combination of filters, but limited to the pre-defined key words like ehb_element_type and ehb_mode.
Multiple values filter
Additionally values from multiple columns can be filtered by the key named "values". Here, multiple values which shall be included in the table entry can be added. Depending on the use case, either the key "value" or the key "values" or both can be used.
In the below example, the table can have the entries which match the category as R-PORT or STRUCTURE or VALUE.
"title": "Input Variables",
"filters": [
{
"id": "ehb_element_type",
"value": "ehb_variable"
},
{
"id": "ehb_mode",
"value": "import"
},
{
"id": "ehb_category",
"values": [
"R-PORT",
"STRUCTURE",
"VALUE"
]
}
]
|
It is recommended to use "value" for filtering exactly one value. In case of multiple values required to be included in the filter, the key word "values" to be used. If both key words ("value" and "values") are used then filtering will be a combination of both. |
All key words and value entries are handled case insensitive but have to be exact. There is no error handling for wrongly spelled entries.
A sample file is available in the examples sub folder of the EHB-CB installation directory. (..\examples\configuration\TableConfiguration.json)