Caribou Satellite#
Name |
Caribou |
|---|---|
Subtitle |
Constellation Satellite for controlling Caribou devices via their Peary interface |
Category |
Readout Systems |
Language |
C++ |
Website |
Description#
Operate devices integrated into the Peary software and the Caribou ecosystem. This satellite provides a unified interface to the Peary device classes and can operate multiple devices in parallel for applications such as beam telescopes. Registers and settings can be specified individually for every device and are passed on to the respective Peary configurations.
It is possible to decide for every device individually whether it will be powered on, is configured or partakes in data acquisition.
This allows for example operation active sensors which are powered through the Caribou Carboard power supplies but which does not provide any data, simultaneously with a readout chip which requires power, configuration, and provides a data stream.
The configuration takes place through the do_power, do_configure and do_acquire parameters of each of the device sections.
Note
It should be noted that data can only be read out from devices of a single type in order to avoid ambiguities in data storage and decoding.
This means, while multiple devices can have do_acquire = true, they all have to share the same type parameter.
Every data record sent to the Constellation is marked with a header tag name containing the corresponding device name.
The satellite provides a flexible scheme for configuring telemetry data.
Adding a new entry to the metrics section allows to configure a new metric for any of the configured devices.
This means, e.g. voltages or currents emitted during the run as well as registers of the device or firmware memory registers can be freely configured and adapted to the respective device configuration.
As an example, the following metrics entry would register a metric broadcasted under the name CP2_VDDD, and which reads a voltage named vddd from the device CP2 which was configured earlierβ
[Caribou.MySetup.metrics.CP2_VDDD]
type = "voltage"
device = "CP2"
identifier = "vddd"
This satellite supports the reconfiguration transition. Any registers or memory registers known to the configured Caribou devices can be updated during reconfiguration.
FSM State Implementations#
The satellite interfaces the Peary device manager to add devices and to control them. The following actions are performed in the different FSM stages:
Initialization: All devices to be instantiated is taken from the configuration section
devices. Device types specified via theirtypeparameter are case sensitive and their libraries have to be available in the linked Peary installation. For each device, registers and memory registers can be specified via theregistersandmemoriessections of the device configuration, respectively. All other keys present in the device configuration section will be converted to strings and passed to the Peary configuration verbatim.In addition, the following configuration keys are available for the initialization:
peary_verbosity: Set the Peary-internal logging verbosity for output on the terminal of the satellite. Please refer to the Peary documentation for more information. The verbosity can be changed at any point using thepeary_verbositycommand this satellite exposes.number_of_frames: This key allows buffering of multiple Caribou device frames into a single Constellation data message. If set to a value larger than1, frames are first buffered and upon reaching the desired buffer depth, they are collectively sent. A value of, for example,number_of_frames = 100would therefore result in one message being sent every 100 frames read from the device. This message would contain 100 frames with the individual data blocks. This can be used to reduce the number of packets sent via the network and to better make use of available bandwidth.
Launching: During launch, the devices configured for being powered up via
do_powerare powered using PearyβspowerOn()command. After this, the satellite waits for one second in order to allow the power to stabilize. Then, theconfigure()command of the Peary device interface is called for every device marked for configuration viado_configure.Reconfiguration: Any register returned by the device by
list_registers()or memory registers fromlist_memories()can be updated during reconfiguration. The satellite attempts to read any of these values from the provided reconfiguration object and, if successful, updates the devices.Start / Stop: During start and stop, the corresponding Peary device functions
daqStart()anddaqStop()are called for every device marked for data taking viado_acquire.
Since the Peary device libraries are not thread-safe, all access to Peary libraries is guarded using a std::lock_guard with a central mutex to avoid concurrent device access. The Peary device manager itself ensures that no two instances are executed on the same hardware. This means, only one Constellation satellite can be started per Caribou board.
Parameters#
The following parameters are read and interpreted by this satellite:
Parameter |
Description |
Type |
Default Value |
|---|---|---|---|
|
Verbosity of the Peary logger. See custom commands for possible values. The verbosity can be changed at any time using the custom command described below |
String |
|
|
Section for Caribou devices to be operated |
Section |
β |
|
Section to define metrics this satellite should provide |
Section |
β |
Devices Section#
The section devices holds individual sections for all devices that should be instantiated, configured and read out. The section name will be used as the device name and can be freely chosen, the parameters interpreted for each device are listed in the following:
Parameter |
Description |
Type |
Default Value |
|---|---|---|---|
|
Type of the Caribou device to be instantiated, corresponds to the (case-sensitive) device class name |
String |
β |
|
Boolean so select whether this device should be powered via Pearyβs |
Boolean |
|
|
Boolean so select whether this device should be configured via Pearyβs |
Boolean |
|
|
Boolean so select whether a DAQ session should be started for this device, and whether readout should be attempted via the |
Boolean |
|
|
Section for device registers. Each entry will be passed on to the Peary configuration object for the corresponding device |
Section |
β |
|
Section for device memory registers. Each entry will be passed on to the Peary configuration object for the corresponding device |
Section |
β |
Metrics Section#
The section metrics holds individual sections for all metrics that should be provided by this satellite. The section name will be converted to upper-case and used as the metric name, the parameters interpreted for each metric are listed in the following:
Parameter |
Description |
Type |
Default Value |
|---|---|---|---|
|
Type of metric, possible values are |
String |
β |
|
Name of the device this metric should be queried from. This device needs to be known from the |
String |
β |
|
Identifier of the metric. This is the register or memory name, or the name of the voltage/current assigned by the device |
String |
β |
|
Units this metric is provided in, distributed along with the metric value. If not set, this defaults to |
String |
|
|
Description distributed along with the metric value |
String |
|
|
Interval in seconds for sending this metric |
Integer |
10s |
Configuration Example#
An example configuration for this satellite which could be dropped into a Constellation configuration as a starting point
[Caribou.MySetup]
peary_verbosity = "INFO"
[Caribou.MySetup.devices.CP2]
type = "CLICpix2"
registers.latency = 12
[Caribou.MySetup.devices.Sensor]
type = "C3PD"
acquire = false
[Caribou.MySetup.metrics.CP2_VDDD]
type = "voltage"
device = "CP2"
identifier = "vddd"
The equivalent in YAML format is
Caribou:
MySetup:
peary_verbosity: "INFO"
devices:
CP2:
type: "CLICpix2"
registers:
latency: 12
Sensor:
type: "C3PD"
acquire: false
metrics:
CP2_VDDD:
type: "voltage"
device: "CP2"
identifier: "vddd"
Custom Commands#
The Caribou satellite exposes the following commands via the control interface. None of these commands alter the state of the attached device, but they only provide additional information on the device and its periphery.
Command |
Description |
Arguments |
Return Value |
Allowed States |
|---|---|---|---|---|
|
Set verbosity of the Peary logger |
Device name, desired verbosity, as |
- |
all |
|
Get the currently configured verbosity of the Peary logger |
Device name as |
Current Peary verbosity level |
all |
|
List all available register names for the attached Caribou device |
Device name as |
List of registers, array of |
|
|
List all memory registers for the attached Caribou device |
Device name as |
List of memory registers, array of |
|
|
Get selected output voltage of the attached Caribou device |
Device name and voltage name as |
Voltage reading in V, |
|
|
Get selected output current of the attached Caribou device |
Device name and current name as |
Current reading in A, |
|
|
Get selected output power of the attached Caribou device |
Device name and power monitor name, as |
Power reading in W, |
|
|
Read the value of a register on the attached Caribou device |
Device name and register name, as |
Register reading, |
|
|
Read the value of a FPGA memory register on the attached Caribou device |
Device name and memory register name, as |
Memory register reading, |
|
Framework Parameters#
This satellite inherits the following framework parameters from its base classes:
Parameters inherited from TransmitterSatellite#
Parameters to control data transmission in the _data section:
Parameter |
Type |
Description |
Default Value |
|---|---|---|---|
|
Unsigned integer |
Timeout in seconds to send the BOR message. The satellite will attempt for this interval to send the message and goes into |
10 |
|
Unsigned integer |
Timeout in seconds to send the EOR message. The satellite will attempt for this interval to send the message and goes into |
10 |
|
Unsigned integer |
Timeout in seconds to send the data message. The satellite will attempt for this interval to send the message and goes into |
10 |
|
Unsigned integer |
Threshold for sending data messages in KiB. The satellite will only send queued data records after the combined payload size of the data records has reached this threshold. |
128 |
|
Unsigned integer |
Size of the queue for the data records. Small values might lead to performance issues, large values lead to larger memory usage. |
32768 |
|
String |
License this data is recorded under. Defaults to the Open Data Commons Attribution License. This information will be added to the run metadata. |
|
Parameters inherited from Satellite#
Autonomous Operation#
Parameters to control autonomy in the _autonomy section:
Parameter |
Type |
Description |
Default Value |
|---|---|---|---|
|
Role name |
Role this satellite should take in the Constellation. Accepted values are |
|
|
Unsigned integer |
Maximum interval in seconds between heartbeats to be sent to other Constellation components. The time between heartbeat is adjusted automatically according to the number of nodes in the Constellation but will never exceed this value. |
|
Conditional Transitions#
Parameters to control conditional transitions in the _conditions section:
Parameter |
Type |
Description |
Default Value |
|---|---|---|---|
|
List of strings |
List of canonical names of remote satellites for conditional transitioning in |
- |
|
List of strings |
List of canonical names of remote satellites for conditional transitioning in |
- |
|
List of strings |
List of canonical names of remote satellites for conditional transitioning in |
- |
|
List of strings |
List of canonical names of remote satellites for conditional transitioning in |
- |
|
List of strings |
List of canonical names of remote satellites for conditional transitioning in |
- |
|
Unsigned integer |
Timeout in seconds to wait for all conditions to be satisfied for conditional transitioning |
|
Framework Metrics#
This satellite inherits the following framework metrics from its base classes:
Metrics inherited from TransmitterSatellite#
Metric |
Description |
Value Type |
Interval |
|---|---|---|---|
|
Amount of bytes transmitted during current run |
Integer |
10s |
|
Number of data blocks transmitted during current run |
Integer |
10s |
|
Number of data records transmitted during current run |
Integer |
10s |
Metrics inherited from Satellite#
Metric |
Description |
Value Type |
Interval |
|---|---|---|---|
|
Current run identifier. Updated whenever it changes. |
String |
- |