-
Notifications
You must be signed in to change notification settings - Fork 40
Description
Hello.
My setup version:
PyVISA-sim==0.4.0
- pyvisa [required: >=1.11.0, installed: 1.11.3]
- typing-extensions [required: Any, installed: 4.2.0]
- PyYAML [required: Any, installed: 6.0]
- stringparser [required: Any, installed: 0.5]
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?