API
QInsControlCore.Controller — TypeController(instrnm, addr)construct a Controller to send commands to the instrument determined by (instrnm, addr). A Controller has three ways to send commands to the Processor: wirte read query.
julia> ct(write, cpu, "*IDN?", Val(:write))
"done"
julia> ct(read, cpu, Val(:read))
"read"
julia> ct(query, cpu, "*IDN?", Val(:query))
"query"the commands needed to execute is not necessary to be wirte, read or query.
julia> idn_get(instr) = query(instr, "*IDN?")
idn_get (generic function with 1 method)
julia> ct(idn_get, cpu, Val(:read))
"query"the definition of function idn_get must happen before the Controller ct is logged in or one can log out and log in again.
QInsControlCore.Processor — TypeProcessor()construct a Processor to deal with the commands sended into by Controllers.
Base.read — Methodread(instr)read the instrument.
Base.write — Methodwrite(instr, msg)write some message string to the instrument.
QInsControlCore.connect! — Methodconnect!(rm, instr)connect to an instrument with given ResourceManager rm.
connect!(instr)same but with auto-generated ResourceManager.
QInsControlCore.disconnect! — Methoddisconnect!(instr)disconnect the instrument.
QInsControlCore.fast! — Methodfast!(cpu::Processor)change the cpu mode to fast mode. Default mode is slow mode. The fast mode is not necessary in most cases.
QInsControlCore.find_resources — Methodfind_resources(cpu::Processor)auto-detect available instruments.
QInsControlCore.instrument — Methodinstrument(name, addr)generate an instrument with (name, addr) which automatically determines the type of this instrument.
QInsControlCore.isconnected — Methodisconnected(instr)determine if the instrument is connected.
QInsControlCore.login! — Methodlogin!(cpu::Processor, ct::Controller)log the Controller in the Processor which can be done before and after the cpu started.
QInsControlCore.logout! — Methodlogout!(cpu::Processor, ct::Controller)log the Controller out the Processor.
logout!(cpu::Processor, addr::String)log all the Controllers that control the instrument with address addr out the Processor.
QInsControlCore.query — Methodquery(instr, msg; delay=0)query the instrument with some message string.
QInsControlCore.reconnect! — Methodreconnect!(cpu::Processor)reconnect the instruments that log in the Processor.
QInsControlCore.slow! — Methodslow!(cpu::Processor)change the cpu mode to slow mode. Default mode is slow mode, which decrease the cpu cost.
QInsControlCore.start! — Methodstart!(cpu::Processor)start the Processor.
QInsControlCore.stop! — Methodstop!(cpu::Processor)stop the Processor.