lasercube-core 0.1.0

A library providing high-level interfaces for discovering and controlling LaserCube devices
Documentation
  • Coverage
  • 88.99%
    97 out of 109 items documented0 out of 32 items with examples
  • Size
  • Source code size: 40.51 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 5.49 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 18s Average build duration of successful builds.
  • all releases: 18s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • mitchmindtree

lasercube-core

Core types and constants for the LaserCube network protocol.

Overview

lasercube-core provides the fundamental data structures and protocol definitions for communicating with LaserCube devices.

Features

  • Core protocol definitions
  • Type-safe command and data structures
  • Buffer management utilities
  • Ready for use with standard network libraries

Example

use lasercube_core::{
    Command, SampleData, Point,
    consts::MAX_POINTS_PER_MESSAGE,
};

// Create a point
let point = Point::from_normalized(0.0, 0.0, 1.0, 0.5, 0.0);

// Create a sample data packet
let sample_data = SampleData::new(0, 0, vec![point]);

// Create a command to send the sample data
let command = Command::SampleData(sample_data);

Safety Notes

This crate provides the basic building blocks for communicating with LaserCube devices, which are physical laser devices that can present safety risks if misused. When implementing network communication using this crate, please ensure appropriate safety measures are in place.

License

Licensed under either of:

at your option.