Series tutorial

Using and configuring Series

Configuring Series:

The following script presents the different types of series and how to create them.

# bitrate series configuration
# create default bitrate series
series = series_builder.bitrate()

# create bitrate series with custom sampling time (default : 1)
series = series_builder.bitrate(0.5)

# create bitrate series with custom sampling time, control bitrate, 
# and data bitrate (default: 1, 500000, 2000000 respectively)

# control bitrate and data bitrate are considered only for can-fd
# messages with bitrate switch (brs) ON
series = series_builder.bitrate(0.5, 500000, 50000000)
# packet rate series configuration
# create default packet rate series
series = series_builder.packetrate()

# create packet rate series with custom sampling time (default: 1)
series = series_builder.packetrate(0.5)

# deltatime series has no configuration

# create default deltatime series
series = series_builder.deltatime()

Creating Series and printing its elements:

The following script is an example of using a bitrate series with 1 second timestamp (default)

# example on using series

# imports
from time import sleep

# create bitrate series (packetrate() and deltatime() also supported)
series = series_builder.bitrate()

# add received messages to series
def on_message_received(msg):
# create a sample message (sender_channel and receiver_channel are supposedly preconfigured)
sample_message = message_builder.create_ethernet_message(,

sample_message.on_message_received += on_message_received

# sending sample_message 1000 times
for x in range(1000):

sample_message.on_message_received -= on_message_received

# printing series' elements (timestamp, value)
for s in series.values: