All,
Quick question about the protocol file in StreamDevice. Suppose I have an instrument where after I send a command to change one of its attributes, it responds back with a status of either OK or BAD. Furthermore, I have an analog output record,
whose value is used by a protocol file.
If I want to properly flush the status response, what is the preferred method of doing so, especially since the status response is a string, not a scaler value.
What I’m currently doing in the protocol is this:
setProp
{
out “set %f”;
in “”;
}
What is weird is that I am not getting a mismatch error, and it does seem like I am properly flushing the input with that method.
After looking at other code, Is it better to do this?
setProp
{
out “set %f”;
in “%*s”; # or this “%*f”;
}
Thanks!
Andy