Xentara v1.2
User Manual
Loading...
Searching...
No Matches
JSON Format for Signal Generator Elements

Samplers

A JSON object describing a signal generator sampler has the following syntax:

{
"@IOComponent.SignalGenerator.Sampler": {
"id": "Sampler",
"uuid": "e95ba266-c8eb-41fb-800c-de31b73f9fcb",
"children": [
...
]
}
}

Object Members
idA string value containing the ID of the sampler. The ID is used to construct the sampler’s primary key.
uuidA string value containing the unique UUID of the sampler.
children

A JSON array containing the signals of the sampler.

Please remember that each element block requires two layers of {} due to the syntax restrictions of the JSON format.

Signals

A JSON object describing a signal generator signal has the following syntax:

{
"@IO.SignalGenerator.Signal": {
"id": "Inspector 1",
"uuid": "391c774a-c2ee-45c4-acac-a9eda90a392f",
"dataType": "float32",
"top": 100,
"bottom": 0,
"waveForm": {
"@Pulse": {
"period": "5s",
"phaseOffset": "0",
"pulseWidth": "1.5s"
}
}
}
}

Object Members
idA string value containing the ID of the signal. The ID is used to construct the signal’s primary key.
uuidA string value containing the unique UUID of the signal.
dataType

The generated data type. The following data types are supported:

Keyword Data Type
"int8"
8 bit signed integer
"int16"
16 bit signed integer
"int32"
32 bit signed integer
"int64"
64 bit signed integer
"uint8"
8 bit usigned integer
"uint16"
16 bit usigned integer
"uint32"
32 bit unsigned integer
"uint64"
64 bit unsigned integer
"float32"
single precision floating point number
"float64"
double precision floating point number
"bool"
Boolean value. Wave form values greater than 0.5 are represented as true, Values less than or equal to 0.5 are represented as false
topA numeric value containing the top of the value range of the generated signal. If this value is less than bottom, then the wave form will be inverted.
bottomA numeric value containing the bottom of the value range of the generated signal. If this value is greater than top, then the wave form will be inverted.
waveForm

A JSON object containing information about the wave form to generate. The object is a double nested JSON object. The outer object has a single member whose name is the type of wave form, and whose value is another JSON object that contains the actual properties of the wave form.

Signals generators support the following wave forms:

Descriptor Wave Form Normal Shape (top > bottom) Inverted Shape (top < bottom)
"@Pulse"
Pulse wave
"@SineWave"
Sinusoidal wave
"@Triangle"
Triangle wave
"@SawTooth"
Sawtooth wave
"@Noise"
White noise (same as normal shape)

The inner object has the following members:

period

A string value containing the period of the generated wave. The string must be a number followed by one of the units "ns", "ms", "µs", "s", "m", or "h", for nanoseconds, microseconds, milliseconds, second, minutes, or hours respectively. For microseconds, you can write "us" instead of "µs".

The period can contain fractions. The string "0.5s" is a valid period.

This member is not available for @Noise wave forms.

phaseOffset

An optional numeric value containing the phase offset of the generated wave. The wave form will be shifted to the left by the specified time interval compared to wave forms with phase offset 0.

The phase offset must be string value containing either "0" for no phase offset, or a number followed by one of the units "ns", "ms", "µs", "s", "m", or "h", for nanoseconds, microseconds, milliseconds, second, minutes, or hours respectively. For microseconds, you can write "us" instead of "µs".

The phase offset can be negative, and contain fractions. The string "-0.25s" is a valid phase offset.

This member is not available for @Noise wave forms.

pulseWidth

The width of the “up” phase of a pulse wave, where the value is equal to the top value. This value must be greater than 0, and less than the period.

The pulse width must be a string value containing a number followed by one of the units "ns", "ms", "µs", "s", "m", or "h", for nanoseconds, microseconds, milliseconds, second, minutes, or hours respectively. For microseconds, you can write "us" instead of "µs".

The pulse width can contain fractions. The string "0.5s" is a valid pulse width.

This member is only available for @Pulse wave forms.