Crates.io | profidcp |
lib.rs | profidcp |
version | 1.0.3 |
source | src |
created_at | 2024-02-23 07:00:58.169301 |
updated_at | 2024-02-23 07:03:58.6914 |
description | Profinet discovery protocol |
homepage | |
repository | https://github.com/uneidel/profinetdcp |
max_upload_size | |
id | 1150218 |
size | 22,073 |
Profinet DCP (Discovery and Configuration Protocol) is a fundamental aspect of Profinet communication within industrial automation systems. This protocol facilitates the discovery and (configuration) of Profinet devices within a network, allowing for seamless integration and interoperability.
Note:
This need to run in privileged mode or you use capabilities
fn main(){
let networkdevicename = "wlp3s0".to_string();
let mac = "00:00:00:00:00";
let mut dcp = Dcphandler::new(networkdevicename);
dcp.blink(mac.clone());
dcp.set_name_of_station(mac.clone(), "cool".to_string());
dcp.factory_reset(mac.clone());
let devices = dcp.identify_all();
for device in &devices {
println!("Device: {}", device);
}
}
this library was inspired by https://gitlab.com/pyshacks/pnio_dcp/