Macro scpi::cmd_qonly

source ·
macro_rules! cmd_qonly {
    () => { ... };
}
Expand description

Marks the command as query only by creating a stub for Command::meta.


struct MyQuery;
impl Command<MyDevice> for MyQuery {
    cmd_qonly!();

    fn query(
        &self,
        _device: &mut MyDevice,
        _context: &mut Context,
        _params: Parameters,
        _response: ResponseUnit,
    ) -> Result<(), Error> {
        // Do stuff
        Ok(())
    }
}