From cec343977c688529614b5292b80584fefd96c7ec Mon Sep 17 00:00:00 2001 From: watts Date: Fri, 14 Aug 2026 11:15:31 +0200 Subject: [PATCH] Update ZMQ Message Reference --- ZMQ-Message-Reference.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/ZMQ-Message-Reference.md b/ZMQ-Message-Reference.md index 7f0a607..f0b0346 100644 --- a/ZMQ-Message-Reference.md +++ b/ZMQ-Message-Reference.md @@ -393,8 +393,40 @@ msg2 = ['modified zonePlate definition', ## 'loadFile directory' +Request that a the content list of a directory (on the tree available to Pixelator) be published. Required dict keys are: +* "directory": Full path to the directory. +* "showHidden": Optional flag to indicate if hidden files should be included in the published list of directory contents. Valid values are integer 1 or 0 (default 0) +* "fileExtension": Optional flag to filter list to include only files with the given file extension. Affects files only, directories are treated separately. The value should be a string representing the final characters of the filename strings. +* "pluginNumber": An integer that identifies which window is requesting the file data. This key/value will be added to the published data so that receiving GUIs can decide if/how they want to present the published data. + +Example message: +``` +msg = ['loadFile file', +'{ +"directory":"/home/control/LocalData/2026-08-14" +,"showHidden":0 +,"fileExtension":".hdf5" +,"pluginNumber":0 +}'] +``` + ## 'loadFile file' +Request that a the data from a file be published by Pixelator. Required dict keys are: +* "file": Full path to the file (or reference file) on the directory tree available to Pixelator. For reference files (i.e. with a defined "mode"), it doesn't matter if the discard directory is present or not, the code will check first without the discard directory and if not found there, will then look in the discard directory. +* "mode": Optional flag to load a scan with an adjacent scan number. Valid values are "next" (scan number +1) and "previous" (scan number -1). When the mode value is an empty string, or the key is not present, the function will try to load the exact path given in the "file" key (no checking for discard). +* "pluginNumber": An integer that identifies which window is requesting the file data. This key/value will be added to the published data so that receiving GUIs can decide if/how they want to present the published data. + +Example message: +``` +mesg = ['loadFile file', +'{ +"file":"/home/control/LocalData/2026-08-14/discard/Sample_Image_2026-08-14_002.hdf5" +,"mode":"previous" +,"pluginNumber":0 +}'] +``` + ## 'loadDefinition' ## 'change user'