https://github.com/thatzok/komsi-lib
Rust library for the KOMSI protocol, primarily used for vehicle telemetry (speed, lamps, etc.) in simulators.
https://github.com/thatzok/komsi-lib
komsi omsi2 rust rust-lang simulator-api thebus
Last synced: 3 months ago
JSON representation
Rust library for the KOMSI protocol, primarily used for vehicle telemetry (speed, lamps, etc.) in simulators.
- Host: GitHub
- URL: https://github.com/thatzok/komsi-lib
- Owner: thatzok
- License: mit
- Created: 2026-01-19T02:06:30.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-01-19T10:13:01.000Z (5 months ago)
- Last Synced: 2026-02-24T00:11:49.375Z (4 months ago)
- Topics: komsi, omsi2, rust, rust-lang, simulator-api, thebus
- Language: Rust
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# komsi
[
](https://github.com/thatzok/komsi-lib)
[
](https://crates.io/crates/komsi)
[](https://github.com/thatzok/komsi-lib/actions/workflows/build.yml)

This Rust crate is a library for the KOMSI protocol, primarily used for vehicle telemetry (speed, lamps, etc.) in
simulators (e.g., "The Bus", "OMSI 2") using the [KOMSI protocol](https://github.com/thatzok/Komsi-Protocol).
## Features
- **KOMSI Protocol Implementation:** Support for various [KOMSI protocol](https://github.com/thatzok/Komsi-Protocol)
commands like Ignition, Engine, Speed, RPM, etc.
- **Vehicle State Tracking:** Easily manage and track the state of a vehicle.
## Installation
Add `komsi` to your `Cargo.toml`:
```bash
cargo add komsi
```
Or manually add it to your `Cargo.toml`:
```toml
[dependencies]
komsi = "0.5" # Replace with the latest version
```
## Usage Example
```rust
use komsi::vehicle::{VehicleState, VehicleLogger};
struct MyLogger;
impl VehicleLogger for MyLogger {
fn log(&self, msg: String) {
println!("LOG: {}", msg);
}
}
fn main() {
let old_state = VehicleState::new();
let mut new_state = old_state.clone();
new_state.ignition = 1;
new_state.speed = 50;
let logger = MyLogger;
let commands = old_state.compare(&new_state, false, Some(&logger));
// 'commands' now contains the byte buffer to be sent via KOMSI
println!("Generated {} bytes of commands", commands.len());
}
```
## Documentation
For detailed API documentation, run:
```bash
cargo doc --open
```
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.