|
||
---|---|---|
.github/workflows | ||
example | ||
lib | ||
servicepoint-binding-uniffi@1169d9f1d2 | ||
uniffi-bindgen | ||
.gitignore | ||
.gitmodules | ||
Cargo.lock | ||
Cargo.toml | ||
flake.lock | ||
flake.nix | ||
generate-binding.sh | ||
LICENSE | ||
README.md | ||
rustfmt.toml | ||
servicepoint.gemspec |
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.