ReferenceClientSeries and Frames

Series and Frames

Understanding the core data structures for working with telemetry data in Synnax.

This guide covers the fundamental data structures used in Synnax: Series (typed arrays) and Frames (multi-channel containers). These are core types returned by read operations and used for write operations.

Series

A series is a strongly typed array of data samples. A series can contain any data you want it to, but in the context of Synnax, it represents a set of contiguous samples from a single channel.

Constructing a Series

Here are a few simple ways to construct a series:

The values passed to a series cannot have different data types. The constructor will not throw an error, as validating data types is an expensive operation, but the series will not behave as expected.

Native Array Interop

Accessing Data Elements

The Time Range Property

Whenever you read a series from Synnax, it will have a time_range property that represents the time range occupied by the samples in the Series. This property can be useful for getting a high-level understanding of when the samples were recorded without needing to query an index channel.

The start field represents the timestamp for the first sample, and the end field represents a timestamp just after the last sample (start-inclusive, end-exclusive).

It’s also easy to define a time range when constructing a series:

Other Useful Properties

Frames

Constructing a Frame

A frame maps the key or name of a channel to one or more series. Here are a few examples of how to construct a frame:

Accessing Frame Data

Type-Safe Access (TypeScript Only)