v0.60.1
ReferenceChannelsReference

Channel reference

Channel properties, data types, name rules, and error messages.

This page lists the properties of a channel, the data types that it can have, and the errors that channel operations can return.

Properties

Keynumber

A number that identifies the channel. Synnax sets the key when you create the channel, and the key never changes. Plots, schematics, and tasks refer to channels by key.

Field keyCannot change

Namestring Required

The name of the channel. It must follow the name rules. To change it, rename the channel.

Field nameCan change

Data typestring Required

The type of each sample in the channel. See data types. An index channel always has the timestamp data type. In Python, is_index=True sets timestamp for you.

Python data_typeTypeScript dataTypeCannot change

Is indexboolean = false

true for an index channel. An index channel cannot be virtual.

Python is_indexTypeScript isIndexCannot change

Indexnumber

The key of the index channel that holds the timestamps of this channel. Each data channel needs an index, and the index must exist before you create the data channel. Leave it unset for index, virtual, and calculated channels.

Field indexCannot change

Virtualboolean = false

true for a virtual channel. Synnax streams the values of a virtual channel and does not store them. A calculated channel also has virtual set to true, because Synnax does not store its values.

Field virtualCannot change

Calculated channel properties

A calculated channel has a name and the properties below. Synnax sets its data type, its index, and its virtual property. You can change all of these properties after you create the channel.

Expressionstring Required

The Arc expression that computes each value. See write an expression.

Field expression

Operationslist of operations

The operations that Synnax applies to the result of the expression. The Console sets one operation. The client libraries accept a list, and Synnax applies the operations in order.

Console OperationField operations

Operation properties

Typestring Required

min, max, avg, derivative, or none.

Console OperationField type

WindowTimeSpan = 0

The time after which min, max, or avg resets, in seconds in the Console. 0 never resets.

Field duration

Reset channelnumber = 0

The key of a boolean channel. min, max, or avg resets when this channel receives true, and 0 means no reset channel.

Python reset_channelTypeScript resetChannel

Data types

Data type Size Arc type Description
boolean 1 byte bool true or false.
int8 1 byte i8 Signed 8-bit integer.
int16 2 bytes i16 Signed 16-bit integer.
int32 4 bytes i32 Signed 32-bit integer.
int64 8 bytes i64 Signed 64-bit integer.
uint8 1 byte u8 Unsigned 8-bit integer.
uint16 2 bytes u16 Unsigned 16-bit integer.
uint32 4 bytes u32 Unsigned 32-bit integer.
uint64 8 bytes u64 Unsigned 64-bit integer.
float32 4 bytes f32 32-bit floating-point number.
float64 8 bytes f64 64-bit floating-point number.
timestamp 8 bytes i64 Nanoseconds since the Unix epoch, in UTC.
uuid 16 bytes str A UUID.
string Variable str UTF-8 text.
json Variable str A JSON value.
bytes Variable None Raw bytes. Arc automations and calculated channels cannot use them.

All data types can be stored, and all can be virtual. Only timestamp can be the data type of an index channel.

Name rules

  • A name contains only letters, digits, and underscores.
  • A name cannot start with a digit.
  • Each name is unique. Names are case-sensitive, so tank_pressure and Tank_pressure are two different names.

An administrator can turn off these rules on a Core with the --disable-channel-name-validation flag. Then names can have any characters, and two channels can have the same name.

Errors

Names

Indexes

Calculated channels

Delete

Find

  • NotFoundError
    Cause
    No channel matches the name or key.
    Fix
    Check the name or key. Names are case-sensitive.