Macro anchor::klipper_reply

klipper_reply!() { /* proc-macro */ }
Expand description

Sends a message to the remote end

This macro allows sending data to the remote end in a type safe way. The general syntax is:

klipper_reply!(reply_name[, arg: type = value]);

For example, the uptime command could be sent as:

klippy_reply!(uptime, high: u32 = var_high, clock: u32 = var_clock);

The = value part can be left out. In this case, a variable with the same name as the argument from the local scope will be used. E.g. the following is valid:

klipper_reply!(data, clock: u32 = clock.into(), data: u32);