Expand description
A Rust library for interacting with data encoded in the VLBI Data Interchange Format (VDIF).
Before using this library, it is recommended you familiarize yourself with the VDIF format, if you haven’t already, by reading the VDIF Version 1.1.1 specification. Put simply, VDIF defines a ‘Data Frame’: a datagram-like object consisting of a fixed size header and a payload of bytes.
I take some inspiration from the Python baseband library in developing this.
§Getting Started
If you’re working with files, you’ll want to check out VDIFFileReader, which allows
you to read VDIFFrames from a file like so:
fn main() {
let mut file = VDIFFileReader::open("path/to/my/vdif/file").unwrap();
// Read the first frame in the file
let frame0 = file.get_frame().unwrap();
println!("", frame0);
}You can then read the next frame by calling get_frame again, or skip the next
frame by calling nextframe. If you want to read all frames from the file
(be careful with big files!), you can call get_all_frames.
If your working with VDIF data from other sources you’ll be using the more general VDIFReader
type, which allows you to wrap any type implementing std::io::Read.
For decoding the payload, check out the encoding module.
Modules§
- Provides functionality for encoding/decoding VDIF headers and payloads.
- Provides functionality related to VDIF data frames.
- Provides functionality for interacting with VDIF headers and header information.
- Provides functionality for parsing byte slices into various VDIF types.
- Provides functionality related to VDIF payloads.
- Provides functionality for reading VDIF data from a variety of data sources.