1 unstable release

0.1.0 Oct 1, 2024

#7 in #twin-cat


Used in twincat

MIT license

5KB
73 lines

Usage

Apply this macro to all functions which access a PLC variable through ADS. Give as arguments the client definition, followed by the full range of each function argument. This macro writes a test which verifies that the PLC variable path is valid.

Example

#[ads_path_verify(crate::client::connect().unwrap(); 0..MAX; ALL_MODES)]
fn function_which_accesses_plc_variable(client: &mut Client, var0: usize, var1: Mode) -> Result<()> {
    client.set_value(
        &format!("Main.some_thing[{var0}].another_thing"),
        var1,
    )
}

Dependencies

~240–690KB
~16K SLoC