Ruby bindings for the servicepoint library.
Find a file
Vinzenz Schroeter fae6ed4f96
All checks were successful
Rust / build (push) Successful in 5m6s
remove redundant infos
2025-02-16 18:26:33 +01:00
.github/workflows split ruby gem into separate repository 2025-02-16 17:09:26 +01:00
example split ruby gem into separate repository 2025-02-16 17:09:26 +01:00
lib split ruby gem into separate repository 2025-02-16 17:09:26 +01:00
servicepoint-binding-uniffi@1169d9f1d2 split ruby gem into separate repository 2025-02-16 17:09:26 +01:00
uniffi-bindgen remove redundant infos 2025-02-16 18:26:33 +01:00
.gitignore first CMD_UTF8_DATA implementation 2025-01-12 15:22:54 +01:00
.gitmodules split ruby gem into separate repository 2025-02-16 17:09:26 +01:00
Cargo.lock remove redundant infos 2025-02-16 18:26:33 +01:00
Cargo.toml split ruby gem into separate repository 2025-02-16 17:09:26 +01:00
flake.lock split ruby gem into separate repository 2025-02-16 17:09:26 +01:00
flake.nix split ruby gem into separate repository 2025-02-16 17:09:26 +01:00
generate-binding.sh split ruby gem into separate repository 2025-02-16 17:09:26 +01:00
LICENSE Create LICENSE 2024-05-12 00:10:34 +02:00
README.md remove redundant infos 2025-02-16 18:26:33 +01:00
rustfmt.toml reformat with max width 2024-05-11 23:28:08 +02:00
servicepoint.gemspec split ruby gem into separate repository 2025-02-16 17:09:26 +01:00

ServicePoint

In CCCB, there is a big pixel matrix hanging on the wall. It is called "Service Point Display" or "Airport Display".

This crate contains C# bindings for the servicepoint library based on servicepoint-binding-uniffi.

Example

connection = Connection.new("172.23.42.29:2342")

pixels = Bitmap.new_max_sized
x_offset = 0
loop do

  pixels.fill(false)

  (0..((pixels.height) -1)).each do |y|
    pixels.set((y + x_offset) % pixels.width, y, true);
  end

  command = Command.bitmap_linear_win(0, 0, pixels, CompressionCode::UNCOMPRESSED)

  connection.send(command)
  sleep 0.0005

  x_offset += 1
end

Installation

Including this repository as a submodule and building from source is the recommended way of using the library.

git submodule add https://git.berlin.ccc.de/servicepoint/servicepoint.git
git commit -m "add servicepoint submodule"

Run generate-binding.sh to regenerate all bindings. This will also build libservicepoint.so (or equivalent on your platform).

Note on stability

This library is still in early development. You can absolutely use it, and it works, but expect minor breaking changes with every version bump.

Notes on differences to rust library

  • Performance will not be as good as the rust version:
    • most objects are reference counted.
    • objects with mutating methods will also have a MRSW lock
  • You will not get rust backtraces in release builds of the native code
  • Panic messages will work (PanicException)

Everything else

Look at the main project README for further information.