A pure Rust SunSpec library based on tokio.
toml
[dependencies]
tokio-sunspec = "*"
The src/models/
folder contains all pre generated models which may be available by the device. If you need to add your own model you can generate one with included Python script in the scripts
folder.
```rust
let socketaddr = "
let mut client = tokiosunspec::connecttcp(socketaddr, deviceid, start_addr).await?;
let res = client.readpoint(model1::Mn).await?; asserteq!(res, "SMA"); ```
This lib only implements the SunSpec part. The connection via modbus is done by the tokio-modbus lib.
Copyright (c) 2023 Lukas Kirner