You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to simulate in unit test binary write (file transfer) command.
PyVisa command:
self._resource.write_binary_values(message, values, datatype=datatype)
The device is Rohde&Schwarz SMBV100B Vector Signal Generator.
The command should send the file to the virtual device, without raising system errors.
Hello.
My setup version:
PyVISA-sim==0.4.0
I am trying to simulate in unit test binary write (file transfer) command.
PyVisa command:
self._resource.write_binary_values(message, values, datatype=datatype)
The device is Rohde&Schwarz SMBV100B Vector Signal Generator.
The command should send the file to the virtual device, without raising system errors.
message = 'MMEM:DATA "/var/user/flight-plan.txt"'
values = b'RESOLUTION: 161897\n64.846910, 12.197980, 100\n64.882251, 12.197944, 100\n'
datatype = 'B'
But I don't know what to write to YAML file, or even if the pyvisa-sim has support for binary write.
The YAML file looks like that:
`spec: "1.0"
resources:
TCPIP0::gps-simulator::5025::SOCKET:
device: device 1
devices:
device 1:
eom:
TCPIP SOCKET:
q: "\n"
r: "\n"
error: ERROR
dialogues:
- q: "*CLS"
- q: "*RST"
- q: "*IDN?"
r: "TCPIP,MOCK,VERSION_1.0"
- q: "*OPC?"
r: 1
- q: "SYST:ERR?"
r: "+0,No error."
- q: 'MMEM:DATA "/var/user/flight-plan.txt" RESOLUTION: 161897\n64.846910, 12.197980, 100\n64.882251, 12.197944, 100\n'
properties:
frequency:
default: "1000"
getter:
q: "FREQ?"
r: "{:s}000000"
setter:
q: "FREQuency {:s} MHz"
e: "FREQ_ERROR"
specs:
type: str
`
Any ideas?
The text was updated successfully, but these errors were encountered: