8–12 Sept 2025
Hamburg, Germany
Europe/Berlin timezone

BitPacket: A C++ Library for Dynamic Binary Decoding

Not scheduled
30m
Hamburg, Germany

Hamburg, Germany

Poster Track 1: Computing Technology for Physics Research Poster session with coffee break

Speaker

Valerio Pastore (INAF)

Description

At INAF (Istituto nazionale di astrofisica), in the contest of AGILE mission (Astro-Rivelatore Gamma a Immagini Leggero), we developed PacketLib, an open-source C++ software library designed for building applications that handle satellite telemetry source packets, provided they comply with the CCSDS Telemetry and Telecommand Standards.
As part of the ASTRI (Astrofisica con Specchi a Tecnologia Replicante Italiana) project, the need arose to modernize this approach to support the acquisition and decoding of binary data generated by the Cherenkov camera. From this requirement, BitPacket was born.
BitPacket is a lightweight C++ library designed for the dynamic parsing of acquired binary data from streams with configurable field lengths defined at the bit level. BitPacket enables users to decode structured binary formats using a simple, human-readable JSON schema that specifies field names and their bit-lengths.
BitPacket allows runtime selection of the parsing layout supporting dynamic schema switching: the user can interpret incoming binary streams with a generic format, detect a specialization discriminator field, and switch to a more specialized schema on the fly, enabling multi-layer decoding.
Binary data can originate from various sources, such as files and TCP streams.
An intuitive interface provides access to parsed fields, and users can define wrapper classes to post-process or access the fields semantically. The actual type conversion is handled externally, allowing the parser to remain agnostic and purely structural.
This contribution presents the design and implementation of the BitPacket library, providing an assessment of its capabilities and performance. The evaluation is conducted in the context of the Array Data Acquisition System (ADAS) of the ASTRI Mini-Array, where BitPacket has been successfully employed to decode and analyze the Cherenkov camera data in real-time.

References

Valerio Pastore, Vito Conforti, Fulvio Gianotti, Andrea Bulgarelli, Nicolò Parmiggiani, Federico Incardona, Alessandro Costa and Federico Russo for the ASTRI Project, Array data acquisition system interface for online distribution of acquired data in the ASTRI Mini-Array project SPIE Digital Library - Software and Cyberinfrastructure for Astronomy - 2022

Significance

Unlike traditional fixed-schema parsers, BitPacket introduces a runtime-adaptive approach based on JSON-defined layouts with dynamic schema-switching capabilities.

Experiment context, if any ASTRI (Astrofisica con Specchi a Tecnologia Replicante Italiana) Mini-Array

Author

Co-author

Presentation materials

There are no materials yet.