Crates.io | servicepoint |
lib.rs | servicepoint |
version | 0.10.0 |
source | src |
created_at | 2024-05-26 13:21:34.643776 |
updated_at | 2024-10-16 18:08:08.106889 |
description | A rust library for the CCCB Service Point Display. |
homepage | https://docs.rs/crate/servicepoint |
repository | https://github.com/cccb/servicepoint |
max_upload_size | |
id | 1252574 |
size | 131,759 |
In CCCB, there is a big pixel matrix hanging on the wall. It is called "Service Point Display" or "Airport Display". This crate contains a library for parsing, encoding and sending packets to this display via UDP.
cargo add servicepoint
or
[dependencies]
servicepoint = "0.10.0"
fn main() {
// establish connection
let connection = servicepoint::Connection::open("172.23.42.29:2342")
.expect("connection failed");
// clear screen content
connection.send(servicepoint::Command::Clear)
.expect("send failed");
}
More examples are available in the crate.
Execute cargo run --example
for a list of available examples and cargo run --example <name>
to run one.
This library is still in early development. You can absolutely use it, and it works, but expect minor breaking changes with every version bump. Please specify the full version including patch in your Cargo.toml until 1.0 is released.
This library has multiple optional dependencies. You can choose to (not) include them by toggling the related features.
Name | Default | Description |
---|---|---|
compression_zlib | false | Enable additional compression algo |
compression_bzip2 | false | Enable additional compression algo |
compression_lzma | true | Enable additional compression algo |
compression_zstd | false | Enable additional compression algo |
protocol_udp | true | Connection::Udp |
protocol_websocket | false | Connection::WebSocket |
rand | false | impl Distribution |
cp437 | true | Conversion to and from CP-437 |
Look at the main project README for further information.