#display #cccb #udp #pixel #point #matrix #service

servicepoint

A rust library for the CCCB Service Point Display

13 releases (8 breaking)

new 0.13.2 Feb 17, 2025
0.13.0 Jan 16, 2025
0.12.0 Nov 23, 2024
0.7.0 Jun 27, 2024

#109 in Compression

Download history 123/week @ 2024-11-13 165/week @ 2024-11-20 18/week @ 2024-11-27 23/week @ 2024-12-04 13/week @ 2024-12-11 1/week @ 2025-01-08 143/week @ 2025-01-15 9/week @ 2025-01-22 15/week @ 2025-02-05 403/week @ 2025-02-12

436 downloads per month
Used in 3 crates

GPL-3.0-or-later

135KB
3K SLoC

servicepoint

crates.io Crates.io Total Downloads docs.rs GPLv3 licensed

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. The library itself is written in Rust, but can be used from multiple languages via language bindings.

This project moved to git.berlin.ccc.de/servicepoint/servicepoint. The GitHub repository remains available as a mirror.

Examples

// everything you need is in the top-level
use servicepoint::*;

fn main() {
    // establish connection
    let connection = Connection::open("172.23.42.29:2342")
        .expect("connection failed");

    // clear screen content
    connection.send(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.

Installation

cargo add servicepoint

or

[dependencies]
servicepoint = "0.13.2"

Note on stability

This library can be used for creative project or just to play around with the display. A decent coverage by unit tests prevents major problems and I also test this with my own projects, which mostly use up-to-date versions.

That being said, the API is still being worked on. Expect breaking changes with every minor version bump. There should be no breaking changes in patch releases, but there may also be features hiding in those.

All of this means for you: please specify the full version including patch in your Cargo.toml until 1.0 is released.

Features

This library has multiple optional dependencies. You can choose to (not) include them by toggling the related features.

Name Default Description Dependencies
protocol_udp true Connection::Udp
cp437 true Conversion to and from CP-437 once_cell
compression_lzma true Enable additional compression algo rust-lzma
compression_zlib false Enable additional compression algo flate2
compression_bzip2 false Enable additional compression algo bzip2
compression_zstd false Enable additional compression algo zstd
protocol_websocket false Connection::WebSocket tungstenite
rand false impl Distribution<Brightness> for Standard rand

Supported language bindings

Language Support level Repo
.NET (C#) Full servicepoint-binding-csharp contains bindings and a .csproj to reference
C Full servicepoint-binding-c contains a header and a library to link against
Ruby Working servicepoint-binding-ruby contains bindings
Python Unsupported bindings can be generated from servicepoint-binding-uniffi, tested once
Go Unsupported bindings can be generated from servicepoint-binding-uniffi
Kotlin Unsupported bindings can be generated from servicepoint-binding-uniffi
Swift Unsupported bindings can be generated from servicepoint-binding-uniffi

Projects using the library

To add yourself to the list, open a pull request.

You can also check out awesome-servicepoint for a bigger collection of projects, including some not related to this library.

If you have access, there is even more software linked in the wiki.

Contributing

See CONTRIBUTING.md.

What happened to servicepoint2?

After servicepoint2 has been merged into servicepoint, servicepoint2 will not continue to get any updates.

Dependencies

~1.2–2.6MB
~55K SLoC