kcan-viewer 0.1.0

Scrin pane-wall dashboard components for KCAN viewers.
Documentation
  • Coverage
  • 2.44%
    1 out of 41 items documented1 out of 24 items with examples
  • Size
  • Source code size: 30.1 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 478.3 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 8s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Tknott95

kcan-viewer

Scrin pane-wall dashboard components for KCAN viewer apps.

kcan-viewer is a reusable viewer library for rendering actuator wall dashboards: pane per actuator, health labels, metrics, messages, and bus summary lines. It uses scrin = "0.1.83", scrin-widgets = "0.2.7", and the dependency-light kcan-core frame types.

The main user-facing command remains kcan. Use kcan-viewer when you want to embed KCAN dashboard panes inside a larger terminal app or build a standalone viewer binary.

use kcan_core::{CanFrame, CanId};
use kcan_viewer::{PaneWall, ViewerState};

let frame = CanFrame::new(CanId::extended(0x501)?, &[0x01, 0x02])?;
let state = ViewerState::from_frames("Bench", &[frame]);
let output = PaneWall::new().render_plain(&state, 80, 20);

assert!(output.contains("Bench"));
# Ok::<(), kcan_core::Error>(())