The SpecTcl attach command can be accessed using the /spectcl/attach URL domain.
Attaches a new data source to SpecTcl. Query parameters are:
The type of data source. Currently this is one of file to read data from a file or pipe to read data from a program on the other end of a pipe.
The source string expected by the attach command for the specified source type. For file data sources, this is just the path to the file to read. Note that since SpecTcl's directory is not known it's recommended the full path be provided. For pipe data sources this is the full command string.
Optional query parameter that, if supplied, sets the blocking factor for reads from the data source. This defaults to 8192
Optional query parameter that, if supplied, sets the data format. Acceptable values are:
The data are ring items, see, however the /spectcl/ringformat domain to select the version of ring items. This is the default value
Data are fixed length 8192 byte buffers from NSCLDAQ before version 10.0
Data are fixed length buffers longer than 128K bytes from NSCLDAQ prior to version 10.0. This was used for some MoNA experiments that took trace data and therefore needed longer buffers. The difference is an extension to the 16 bit used blocksize (in 16 bit words) that supports these sizes.
The data are XDR filter data. Note that SpecTcl must have been configured to analyze filter data.
Note that attaching does not imply starting data analysis. That requires using the /spectcl/start request.
The detail part of the JSON returned is the of the form SourceType: string where SourceType: is either File or Pipe and the string is the data source string, that is the filename for File: and the command on the other end of the Pipe:.