Skip to content

BaukeWestendorp/theymx

Repository files navigation

TheyMX - A small Rust library for handling DMX data

This is a small crate for working with DMX concepts like addresses, channels, universes and values.

It started out as a few internal modules for some of my other projects like zeevonk and radiant. I thought I'd share it with the world as it has been very useful for me.

Example

use theymx::{Address, Channel, Multiverse, Universe, UniverseId, Value};

fn main() {
    let mut mv = Multiverse::new();
    let universe_id = UniverseId::new(1).unwrap();
    let universe = Universe::new();
    mv.create_universe(universe_id, universe);

    let addr = Address::new(universe_id, Channel::new(1).unwrap());
    mv.set_value(&addr, Value::from(128u8));

    let v = mv.get_value(&addr).unwrap();
    println!("value at {} is {}", addr, u8::from(v));
}

Cargo Features

  • serde: Implement serialization and deserialization using the serde crate.

Contributing

Feel free to open an issue to discuss about missing features or found bugs, it's OSS after all!

About

A small Rust library for handling DMX data.

Topics

Resources

License

Stars

Watchers

Forks

Languages