Skip to main content

Struct Definitions Reference

This page provides a reference for the purpose and structure of all structs standard groups and databases.

Structs groups and databases are marked with a JSON object using the key xs_struct. This will always contain at least two members:

  • "type" - the name of the type of struct element as a string
  • "v" - the current version this instance of the specified type as a string

The version allows structs elements to be upgraded as the structs definitions evolve. It uses a basic semantic versioning format, specifically MAJOR.MINOR.PATCH, where:

  • MAJOR changes indicate breaking structural changes
  • MINOR changes add functionality in a backward compatible manner
  • PATCH changes make backward compatible bug fixes

Minor and patch changes will automatically be applied to structs elements in server upgrades, whereas major changes will typically require user interaction. Major changes will be avoided as much as possible to maintain stable workflows.

Groups

Project

Top level struct group. All struct groups and databases must be decendants of a project to be recognized. Name and label are customizable.

Created with the STRUCT CREATE PROJECT action.

ParameterValue
typeproject
v1.0.0

Category

Mid-level struct group for organization. Must be child of project or category. Name and label are customizable.

ParameterValue
typecategory
v1.0.0

Model

Group for which all data is locally co-relevant. Must be child of either project or category. Name and label are customizable.

ParameterValue
typemodel
version1.0.0

Origin

Group for all data from a single data origin. Must be the child of a model. Name and label are customizable.

ParameterValue
typeorigin
version1.0.0

Definitions

Group containing definitions databases.

Task

Mnemonic

Mnemonic Bin

Databases

Definitions

Event Def

Mnemonic Def

Holds mnemonic definitions, specifying how they are displayed, interpretted and processed. Must be direct child of definitions group:

<project>.def.mn or ...<category>.def.mn or ...<model>.def.mn

ParameterValue
typedef_mn
version1.0.0
namemn
labelMnemonic
Fields
NameTypeReqDescription
mn_idint(4)unique mnemonic ID
nameutf8vstring(128)unique mnemonic name
descutf8textplain text mnemonic description
unitutf8vstring(32)measurement unit (for example, "V", "mA")
statestruct_mn_statecurrent state of mnemonic
originsjsonobjectmap of model(s) to associated origin(s)
fullasciivstring(32)the primary database for the mnemonic, default f8
binset(asciivstring(32))the opt-in bin database(s) to include the mnemonic in
formatasciivstring(32)printf-style format to render values
enumsjsonobjectmapping of permitted text values to numeric values
labelslist(jsonobject)mapping of numeric values or ranges to labels
aliasesset(asciivstring(128))set of additional names associated with the mnemonic
metajsonobjectadditional metadata as needed
queryasciivstring(32)query name for meta-mnemonics
confjsonobjectconfiguration for meta-mnemonics
Changelog
1.0.0
  • enum changed to enums since "enum" is often a reserved keyword
  • meas field removed (measure now assumed from unit)

Nominal Def

Plot Def

Profile Def

Events

Event databases come in three forms, simple events, single file per event, and multiple files per event.

Event

Each record is a single event. May be a direct child of either a model or origin:

...<model>.event or ...<origin>.event

ParameterValue
typeevent
version1.0.1
nameevent
labelEvent
Fields

Note that virtual fields are calculated from other fields and cannot be populated manually.

NameTypeReqDescription
uuiduuidevent UUID
e_idint(8)event ID (default to 0 if not provided)
t_startinstant(us)start time
t_endinstant(us)end time (if null, event is an open interval)
durduration(us)virtual duration in microseconds (null if open)
intervalbooleanvirtual t_start != t_end
openbooleanvirtual t_end is null
typestruct_event_typeevent type (default to message if not provided)
levelstruct_event_levelevent level (default to none if not provided)
nameutf8vstring(128)event name (if associated with event definition)
labelutf8vstring(128)plain text label
contentutf8textextended event content
metajsonobjectadditional metadata as needed
confjsonobjectconfiguration for specific event types
Changelog
1.0.1
  • corrected name as not required
1.0.0
  • pid (primary ID) changed to e_id (event ID) to avoid confusion
  • sid removed (additional IDs may be added as needed)
  • int changed to interval (int is commonly reserved keyword)
  • dur, interval, and open are now derived fields from t_start and t_end
  • added struct_event_type and struct_event_level data types
  • added name as event definition association

Event File

Uses same structure as event database, with one additional field.

NameTypeReqDescription
file_nameutf8filenamesafe file name

Event Files

Mnemonics

Mn Full

Mn Buffer

Mn Delta

Mn Bin Time

Mn Bin Interval

Mn File Archive

Contains all mnemonic archive files for an origin. Parent must be an origin group:

...<origin>.archive

ParameterValue
typearchive
version1.0.0
namearchive
labelArchive

Fields

NameTypeReqDescription
uuiduuidfile UUID
t_startinstant(us)start time
t_endinstant(us)end time
durduration(us)virtual duration in microseconds
t_mininstant(us)time of first data in file
t_maxinstant(us)time of last data in file
file_nameutf8filenamearchive file name
formatasciivstring(32)file format (default "xbin")
metajsonobjectadditional metadata as needed
confjsonobjectconfiguration for format as needed

Mn File Buffer

Contains all mnemonic buffer files for an origin. Parent must be an origin group:

...<origin>.buffer

ParameterValue
typearchive
version1.0.0
namearchive
labelArchive

Fields

NameTypeReqDescription
uuiduuidfile UUID
file_nameutf8filenamebuffer file name
t_mininstant(us)time of first data in file
t_maxinstant(us)time of last data in file
durduration(us)virtual duration in microseconds
statestruct_buffer_statebuffer file state
flagstruct_buffer_flagbuffer file flag
formatasciivstring(32)buffer file format (default "csv")
confjsonobjectconfiguration for format as needed

The state field may be one of four values:

  • PENDING - the file data is present in the mnemonic buffer database but has not been processed further
  • PROCESSED - the file has been converted into a standard xbin file format
  • ARCHIVED - the file contents have been distributed to the appropriate archive file(s)
  • DEPRECATED - the file is preserved but no longer included in archive files

The flag field may be one of two values:

  • DEPRECATE - the file is queued for deprecation
  • DELETE - the file is queued for deletion

Tasks

Archive Task

Mine Task

Spectra

The spectra definition is a property for event databases.

PropertyValueReqDescription
tabsarray of tab conf(s)custom tabs for UI
presearcharray of presearch confscustom pre-search components for UI
filtersarray of filter confs
groupingarray of field name(s)
chartscharts conf
tablesarray of table conf
queryquery conf
labelslabels conf

Spectra Tab Conf

Configuration for a spectra search tab. This may be a string, referencing the name of a custom tab implementation, or an object with a "type" property specifying a tab type and additional properties applicable for that type. Currently there are no custom tab types, but they may be added in the future.

Spectra Database Tab

Under Construction

The database tab employs a record search for a separate target database of any type, and a solution for converting a selection from the target database to the spectra database.

PropertyValueReqDescription
type"database"tab type name
databasedatabase specifiertarget database specifier
mapsee belowsolution to map target selection to spectra selection

The "map" property may be a string, array of strings, or object.

If a string, the value must be the name of a custom selection function (none currently exist, they may be added in the future).

Spectra Presearch Conf

Specifies a set of components to display before the main spectra search component.

Spectra Field Presearch

Specifies a standalone component to search a particular field.

PropertyValueReqDescription
type"field"presearch type name
fieldfield specifier
optionssee belowoptions for search dropdown

Spectra Filters Conf

Specifies filters / badges for spectra search.

PropertyValueReqDescription
namestringsystem name for filter
labelstringdisplay label (uses name if absent)
badgestringbadge label (uses name if absent)
descstringdescription for badge / filter tooltip
colorstringcolor code or CSS class
eexpressionexpression to apply for filter

Spectra Charts Conf

Specifies options for each spectra chart.

PropertyValueReqDescription
summaryspectra chart confsummary chart conf
spectraspectra chart confspectra chart conf
Spectra Chart Conf

Specifies options for a single spectra chart.

PropertyValueReqDescription
xstring[]x axis options
ystring[]y axis options
tooltipstringrecord format string

Spectra Tables Conf

Under Construction

Spectra Query Conf

Under Construction

Spectra Labels Conf

Labels are specified as an object mapping standard label values to custom values. These will be defined as needed.