61 lines
1.8 KiB
Markdown
61 lines
1.8 KiB
Markdown
# ServicePoint
|
|
|
|
In [CCCB](https://berlin.ccc.de/), 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](https://git.berlin.ccc.de/servicepoint/servicepoint) library based on [servicepoint-binding-uniffi](https://git.berlin.ccc.de/servicepoint/servicepoint-binding-uniffi).
|
|
|
|
## Example
|
|
|
|
```ruby
|
|
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.
|
|
|
|
```bash
|
|
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](https://git.berlin.ccc.de/servicepoint/servicepoint/src/branch/main/README.md) for
|
|
further information.
|