1 unstable release

0.1.0 Oct 1, 2024

#7 in #twin-cat

Download history 77/week @ 2024-09-25 70/week @ 2024-10-02 6/week @ 2024-10-09

153 downloads per month
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

~250–700KB
~17K SLoC