comnum-spec 0.3.1

Declarative Monte Carlo campaigns of comnum (YAML, JSON, TOML), validation against the literature, recordings I/O (SigMF, raw IQ, NPY) and the comnum command
Documentation

comnum-spec

crates.io docs.rs

Part of comnum, link-level simulation of digital communication systems, wireless and optical. Layer 4 (integration) of the workspace, whose dependencies point downward only (architecture).

Declarative campaigns: a YAML, JSON or TOML file describes the grid, the link as a list of blocks, the metrics, the stopping rule and the results expected from the literature. The crate also reads and writes recordings (SigMF, raw IQ, NPY) and provides the comnum command:

cargo install comnum-spec
comnum blocks              # the blocks of a link and their parameters
comnum run campaign.yaml   # reports under results/
comnum verify check.yaml   # fails if a result leaves its reference

Most users depend on the facade comnum, which re-exports this crate as comnum::spec. The API is documented on docs.rs/comnum-spec, with the formula that every item implements.

Blocks from other crates

A project built on comnum (a learned receiver, a model that depends on unpublished code) adds its own blocks to the declarative links without comnum depending on it (ADR 0006). comnum_spec::blocks::register adds a block to the registry: it is then listed by comnum blocks, described by the JSON Schema, checked by comnum check and built like the others; comnum_spec::cli::main is the command line as a function, so that the crate ships its own binary with its blocks:

use comnum_spec::blocks::{register, Extension};

fn main() -> std::process::ExitCode {
    register(Extension { info: my_block_info(), build: |params, label, ctx| build_my_block(params, label, ctx) })
        .expect("a block of that name exists already");
    comnum_spec::cli::main(std::env::args().skip(1))
}

Licence

MIT or Apache-2.0, at your option (LICENSE-MIT, LICENSE-APACHE, shipped in the package).