Chdef 0.0.4
See the version list below for details.
dotnet add package Chdef --version 0.0.4
NuGet\Install-Package Chdef -Version 0.0.4
<PackageReference Include="Chdef" Version="0.0.4" />
<PackageVersion Include="Chdef" Version="0.0.4" />
<PackageReference Include="Chdef" />
paket add Chdef --version 0.0.4
#r "nuget: Chdef, 0.0.4"
#:package Chdef@0.0.4
#addin nuget:?package=Chdef&version=0.0.4
#tool nuget:?package=Chdef&version=0.0.4
chdef
🌐 English | 日本語
Channel definitions (CH) and bit-field definitions (BF) for binary frames: parse the CSVs, compute the layout, convert raw ↔ physical.
⚠ Pre-alpha (0.0.x). The API and the CSV rules are still moving; until 0.1.0 lands, patch releases may break either.
What it is
A CH definition (channel definition CSV) gives every field of a binary
frame a meaning; a BF definition (bit-field definition CSV) gives every
bit of a BF-typed channel a name. chdef is the one Rust implementation
of both, so that every consumer reads the same file the same way.
- Parse a CH CSV / BF CSV — columns are found by header name, spelled in
English (
number,bytes,…) or Japanese (番号,バイト数,…); a leading BOM is ignored and rows without an integernumberare skipped - Compute the frame layout (each channel sits at the cumulative
bytes, plus the total byte count) - Convert raw ↔ physical:
value = raw × lsb + offsetand back (lsb0 / empty is 1,SIis signed, endianness selectable, rounding half away from zero, clamped to the channel width)
The columns of both CSVs, with their aliases and how each cell is read, are specified in docs/spec/format.md.
let channels = chdef::parse_ch_csv(ch_csv_text)?;
let bitfields = chdef::parse_bf_csv(bf_csv_text)?;
let layout = chdef::build_layout(channels, bitfields);
let value = layout.channels[0].raw_to_value(&frame[..4]);
let bytes = layout.channels[0].value_to_bytes(value);
The specification lives in docs/spec/; design decisions in docs/decisions/.
Origin
The CH / BF concept was extracted from chbridge-core of chbridge, an
internal telemetry bridge. Definition files
themselves (real-device channel tables) belong to each consumer; this
repository holds synthetic data only.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
at your option.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.