Crates.io | ioddengine |
lib.rs | ioddengine |
version | 0.1.3 |
source | src |
created_at | 2024-04-16 19:50:31.688626 |
updated_at | 2024-04-16 19:50:31.688626 |
description | IODD 1.1 Engine |
homepage | |
repository | https://github.com/uneidel/ioddengine |
max_upload_size | |
id | 1210624 |
size | 96,856 |
This repository houses the implementation of an IoDD Engine, featuring a parser command-line interface (CLI) and a catalog system. The IoDD Engine is designed to facilitate seamless interaction and management of digital devices within interconnected networks.
It also has a implementation of a Client for IFM IoTCore.
The parser CLI offers a user-friendly interface for executing commands and queries, enabling efficient communication with the IoDD Engine. This Engine only targets Version 1.1 of IODD.
Catalog: - Store Information about VendorId, DeviceId and Productname and the correspoding IODD Zip File.
Engine: - allows to parse PDIn and settings of variables. ObserverMenu and ParameterMenu are implemented.
Cli:
- allows cli based interactions with IODD Sensor
IoTCoreConnect: - Client for interaction with IFM IotCore
This Code is licensed under Apache 2.0.
Additional needed files Standard Definitions manually in place it into /data/specs.
Please see CLI for further information how to work with Library. This library was tested with serveral io-link devices.
Vendor: 310, ProductName:SD1540, Device:872
HexData: 0000000000000000FE00079EFE0000000300
Name: Totalisator, Desc: Durchflussmenge. Der Wert entspricht der aktuellen Verbrauchsmenge seit dem letzten Reset, Value: 0.0, Unit: m³
Name: Durchfluss, Desc: Aktueller Durchfluss, Value: 0.0, Unit: m³/h
Name: Temperatur, Desc: Aktuelle Temperatur, Value: 19.5, Unit: °C
Name: Druck, Desc: Aktueller Druck, Value: 0.0, Unit: bar
Name: Gerätestatus, Desc: Aktueller Gerätestatus, eine Kopie des Parameters [Gerätestatus, Index 36] im Prozessdatenkanal, Value: 0.0
Name: OUT2, Desc: Aktueller Zustand des digitalen Signals [OUT2], Value: "OFF"
Name: OUT1, Desc: Aktueller Zustand des digitalen Signals [OUT1], Value: "OFF"
ioddcli eval --ip 192.168.56.89 --port 1
ioddcli read-parameter 192.168.56.89 2 551 0
ioddcli list-variable --vendorid 310 --deviceid 706 --productname TN2405 --accessrights rw
ioddcli variable --vendorid 310 --deviceid 706 --productname TN2405 --id V_diS
cli read-parameter --ip 192.168.56.89 --port 2 --index 551 --subindex 0
ioddcli encode-variable --vendorid 310 --deviceid 706 --productname TN2405 --id V_diS --param false, true, 4
cargo run set-parameter --ip 192.168.56.89 --port 2 --index 552 --subindex 0 --hexdata 4400
ioddcli encode-variable --vendorid 310 --deviceid 706 --productname TN2405 --id V_uni --param "0" or ioddcli encode-variable --vendorid 310 --deviceid 706 --productname TN2405 --id V_diS --param "true, false, 4"
cargo run get-menu --vendorid 310 --deviceid 706 --productname TN2405 --role observer --menu parameter
let catalog = Catalog::new_with_db(None);
let (drivername,files) = catalog.queryfordriver(*deviceid, productname.to_owned(), *vendorid).await;
let p = Parser::new(drivername, files);
let e = Engine::new(&p.iodevice, super::super::LANGLOCALE);
println!("HexData: {}", hex_data);
let datapoints = match e.parse(hex_data){
Ok(x) => x,
Err(err) => {panic!("Error: {:?}", err)}
};
for h in entries {
println!(
"Name: {}, Desc: {}, Value: {}{}",
h.name,
h.description,
h.value,
if !h.unit.is_empty() {
format!(", Unit: {}", h.unit)
} else {
String::new() // Empty string if unit is empty
}
);
}
please note: In the event of any potential copyright violations, we kindly request that you contact the owner or administrator of the content in question before taking any further action. It is essential to address such matters through respectful and constructive communication to ensure that any concerns are properly addressed and resolved in accordance with applicable laws and regulations. By reaching out to the content owner first, we aim to foster a collaborative approach to resolving any copyright issues while upholding the integrity of intellectual property rights. Thank you for your understanding and cooperation in this matter.