XINA Struct Trend
The XINA Struct Trend command line utility generates trend data products for a specified time range or set of Event Intervals. It is used by the XINA Trend Task. Generated data products include:
- Binned trend data
- Configurable trend plots
- Log file
Arguments
Name | Req | Description | Default |
---|---|---|---|
cache | Cache directory path. Used for any persistent caching across tasks for optimization purposes. | ||
conf | ✓ | File path to the JSON config containing the trend parameters. | |
env | ✓ | File path to the JSON environment file which defines environment parameters such as project specific paths. | |
help | Print available options. | ||
host | XINA Tunnel host. | "localhost" |
|
port | XINA Tunnel port. | 41746 |
|
import | ✓ | Import directory path. Files that need to be imported will be placed here. struct_trend is responsbile for generating the corresponding import action file but xina-run will perform the actual importing. |
|
log | ✓ | File path that log events will be written to. | |
out | ✓ | Ouptut directory path. Files placed here will be uploaded and accessible directly from the Task interface (e.g. notifications panel). | |
post | ✓ | Post directory path (for post-import outputs) e.g. uploading log files to the Task record. | |
task | ✓ | File path to the JSON file containing info about the Task. | |
temp | ✓ | Temp directory path for storing temporary files during execution. |
conf
The below table describes the available fields in the conf
JSON file and is used to control how data should be trended.
Name | Type | Req | Description | Default |
---|---|---|---|---|
model | utf8text |
✓ | Path of model to moma.fm |
|
copy | boolean |
If true, the zip file will be uploaded and available from the Task interface. | false | |
trend | utf8text |
The name of the Trend Definition profiles , trend_conf , and plot_conf will be loaded from |
||
label | utf8text |
The text that will be used to name the files and final zip file. The format will be like 2024_06_12_00_00_00_2024_06_12_00_20_00_profile_label |
||
|
|
|||
|
| |||
|
| |||
|
|
|||
plot_conf |
|
|
| |
| ||||
|
| |||
|
Example conf:
This example performs a trend export with fields provided directly in the conf object.
{
"label": "Test_Trend_From_Conf",
"desc": "This is a test trend. The Trend parameters are provided in the conf.",
"model": "oci.fm"model.path",
"profile": "OPS_FLT_OCI_SDS",
"label": "test",
"start": 1718150400000000,
"end": "2024-06-12T00:20:00Z",
"ueid": null,
"copy": true,
"auto_confs"profiles": [
"TEST_PROFILE"
],
"trend_conf": {
"t": [
{
"users"start": [
"johndoe"2024-11-01T00:00:00Z",
"alice"
],end": "mine": false,
"daily": true2024-11-01T00:10:00Z"
}
],
"plot_conf"bin_minutes": {1,
"trend_series"disable_filter": [false,
"avg"
],
"pages"intervals": [
{
"plots": [
{
"title": "OCI Pri Power (15A)",
"mnemonics": [
"PSE.OM1.OCI_PRI_CURR"
]
},
{
"series": [
{
"mnemonic": "oci.dau.ddc.FPGA.CcdOpMode",
"plot_options": {
"color": "k"
}
}
]
}
]
}
]null
},
"data_conf"plot_conf": {
"limit": false,
"ids": "@#[42316,42318-42322,43255,44243,45140,45187-45210,45233-45236,45238,45240,45241,45245,45247,45248,45259,45260,45265-45268,45270,45272,45273,45277,45279,45280,45291,45292,45442,45444,45446,45448,45450,45452,45454,45460,45462,45472,45538,45540,45542,45544,45546,45548,45550,45556,45558,45568,51908,51910,64097,64109,64111,64113,64115,66333,66341,66349,66357,66365,66373,66381,67536,67537,69019,69024-69026,69031,69032,69729,77534,77570,77696]sci",
"dis": false,
"fill": false,
"columns": {
"ts_utc_iso": true
},
"join": true,
"pkt": true
}
}
In this example, the trend will be generated from an existing Trend Definition named TEST_TREND
.
{
"trend": "TEST_TREND",
"model": "model.path",
"copy": true
}