(C)Quarch Technology Ltd 2022, QPS v1.29

List of commands supported by the QPS script interface.
Any command which does not start with '$' will be passed directly to the currently connected device.
	
$annotate
	Creates an annotation in the currently open dataset:
	$annotate timeSpecifier(1) text to display at this annotation point
	see also the advanced XML syntax.
	
$channels
	Returns a list of the current channels:
	$channels
	Status status NA
	5V voltage mV
	5V current uA
	12V voltage mV
	12V current uA
	5V power uW
	12V power uW
	Avg Test B/s
	bw Test B/s
		
$comment
	Creates a comment in the currently open dataset:
	$comment timeSpecifier(1) text to display at this comment point
	see also the advanced XML syntax.
	
$connect
	Connects QPS to the specified device:
	$connect usb::QTL1999-02-999
	
$connected
	Returns the connected device:
	$connected
	usb::QTL1999-02-999

$create channel
	Creates a sparse data channel as part of the current recording:
	$create channel channelName channelGroup baseUnits usePrefix[yes/no]

	channelName     : String
	channelGroup    : String
	baseUnits       : String, if metric prefix is enabled the baseUnits string should not itself include a metric prefix
	yes/no          : text as specified

	Examples
		Temperature does not use metric prefix
		$create channel T1 Temp C no

		IOPS may use a metric prefix and should be specified without prefix
		Correct:
		$create channel Wr Pref IOPS yes/no
		Incorrect:
		$create channel Wr Pref kIOPS yes/no
		
$echo
	Echos back a string of text
	
$get stats
	Returns the Stats Grid as a CSV table
	
$get custom stats range
	Returns statistics for a specified range
	$get custom stats range startTime endTime|numRecords
	
	The second argument can be either an end time or number of records of form: [endTime | lnumber of records] 
	in which letter "l" denotes that number of records is being specified
	 
$help
	Provides information about all supported commands
	$help type
	Argument type indicates the type of help to return and has the following options: 1) None [same as "all"], 2) "all", 3) "internal"
	
	Examples
	$help
	$help all
	
$hide channel
	Hides a channel
	$hide channel channelInfo
	channelInfo is a string split by ":" and assumed the following order: #0 = name, #1 = groupName
	
	Examples
	$hide channel 5v:voltage
	
$list
	Returns a list of devices discovered on the most recent scan
	
$list -details
	Lists available device details
	
$log
	Logs a value at the specified timeSpecifier(1). Once logged the data cannot be changed:
	$log channelName channelGroup timeSpecifier(1) value:
	$log T1 Temp 1528370532877 23.4
	
	A 'gap' may be created in the logged data by issuing a $log with value of endSeq:
	$log T1 Temp 1528370532878 endSeq
	
$qis status
	Returns QIS connection status

$read
	Reads data between from a given start time and number of record
		
	The second argument can be either an end time or number of records of form: [endTime | lnumber of records] 
	in which letter "l" denotes that number of records is being specified
	
	Examples
	$read 0 l10
	
$save csv
	Saves current data to csv file or set of files:
	$save csv "file path/file name" -l[ALL|Max lines per file] -c[yes/no] -s[","|"\t"|";"|" "]
		Defaults:
		Max Lines Per File  -l : ALL
		Line End -c: CR/LF
		Separator -s: ","		

(1)
	timeSpecifier is expressed as either UNIX time or as elapsed time since the start of
	the dataset:
		UNIX time eg: 1528370532877
		elapsed time, exxxDxxx:xxx:xxx.xxxx eg: 
			e12D13:14:15.167 specifies 12 days, 13 hours, 14 minutes, 15.167 seconds
			e600.777 specifies 600.77 seconds
			e120:30.40 specifies 120 minutes, 30.40 seconds
		
$scan
	Starts a QIS scan
	
$show channel
	Shows a channel
	$show channel channelInfo
	channelInfo is a string split by ":" and assumed the following order: #0 = name, #1 = groupName
	
	Examples
	$show channel 5v:voltage

$shutdown
	Closes QPS, will also close QIS if it was launched by this copy of QPS
	$shutdown
	
$start stream recordingDirectoryPath
	Starts a stream
	
$stats to csv
	Saves the statistics to CSV format
	$stats to csv file
	The file argument is a string specifying the file path
	The default is no specified file and the path/file then takes the form:
	*STREAM_DIR* + "statsGrid" + yyyyMMddHHmmss + ".csv"
	 
	 Examples
	 $save csv C:\Temp\quarch\MyRecording.csv
	 
$stop stream
	Stops a stream
	
$stream state
	Returns the current streaming state
	$stream state
	Recording
	
$take snapshot
	Takes a snapshot of the chart, timeline and channels windows
	$take snapshot type
	
	Argument type indicates the type of snapshot to be taken and supports the 
	options [all, chart, timeline, key] with all being the default
	
	Examples
	$take snapshot                  --> default and captures chart+timeline+key
	$take snapshot all              --> same as default
	$take snapshot chart            --> chart only
	$take snapshot chart,key        --> chart+key
	$take snapshot chart,timeline   --> chart+timeline

$version
	Returns the version number of QPS