Open oz-piita opened 1 month ago
Yes I wrotevisa-rs
wrong XD, thanks.
The read_line()
method is from the std library, so I can't change it.
The visa does have the VI_ATTR_TERMCHAR
attribute, but it only affects the low-level read/write IO functions, not the behavior of read_line()
because it does not change the message sent or received. If you want to change this attribute, use the HasAttribute::set_attr method.
Whether the message ends with a \n
or not, to my knowledge, is decided by the instrument driver, VISA only handles the communication between your computer and the instrument driver. But the SCPI standard requires all messages end with \<newline>, <^END> or \<newline><^END>
・Did you write visa-rs wrong about Cargo.toml? I'm getting an error because of visars ( is wrong, - is correct).
・Using the read_line() method, but is there any way to explicitly change the ReadTermination? I always read with read_until(b'\n',&mut buf) instead of read_line() but I want to check best practices.