Skip to main content

Model Actions

Model actions are complex data actions designed to be used with the XINA Data Model Standards.

MODEL_TM_IMPORTMODEL_SRC_BUFFER

The MODEL_TM_IMPORTMODEL_SRC_BUFFER action imports a telemetrybuffer source file into a model.

Property Value Required
action "model_tm_import"model_src_buffer" yes
model model group specifier yes
object_id object ID of CSV data file yes
format string yes
confjsonobjectno
u_idUUIDno
meta jsonobject no

If the mn column is an integer it will be interpretted as a literal mnemonic ID. Otherwise the name will be parsed from this format:

<name>[(<unit>[;n0=v0|n1=v1|...])]

<name> will be used for the mnemonic name lookup. The comparison is case insensitive and any whitespace is treated as a single underscore. <unit> is optional. If provided, it must match the unit of an associated mnemonic definition, otherwise an error is thrown. The section after unit defines discrete value mapping.

When a data set is imported the XINA server will run the following steps:

  • For each row:
    • validate time and value
    • process mnemonic
      • If mnemonic ID
        • If found in definitions database:
          • If mnemonic is deprecated, throw error
          • Else, use mnemonic for row
        • Else, throw error due to unrecognized ID
      • Else, parse name and optional unit
        • If name match found:
          • If unit is provided and does not match, throw error
          • If mnemonic is deprecated, throw error
          • Else, use mnemonic for row
        • Else, mnemonic is new, create new temporary mnemonic definition based on provided information
  • If any rows contain same mnemonic and time, throw error
  • Check for time overlap in database
    • If found
      • If on_overlap = fail, throw error
      • Else If on_overlap = delete, delete all data from database in time range of imported data
      • Else (on_overlap = ignore), do nothing
  • If new mnemonic definitions created, insert into mnemonic definition database
  • Insert data into mnemonic database

MODEL_MN_MERGE

The MODEL_MN_MERGE action merges one or more existing mnemonics into a single existing mnemonic.

MODEL_INT_OPEN

The MODEL_INT_OPEN action opens one or more intervals in a model.

MODEL_INT_CLOSE

The MODEL_INT_OPEN action closes one or more intervals in a model.