Environment Variables

Environment variables transfer information between the client (Spock) and the MacroServer. Once an environment variable is defined it remains valid for the next Spock sessions.

An environment variable is set with the senv command:

p09/door/exp.01 [2]: senv ScanFile "FirstTest.fio"
ScanFile = FirstTest.fio

The command lsenv lists all available environment variables:

p09/door/exp.01 [1]: lsenv
                  Name                                                                              Value   Type
 --------------------- ---------------------------------------------------------------------------------- ------
                ScanID                                                                                279    int
              ScanFile                                                                      FirstTest.fio    str
       PreScanSnapshot                                                                                 []   list
          JsonRecorder                                                                               True   bool
          ActiveMntGrp                                                                                mg1    str
                   var                                                                                123    int
   DataCompressionRank                                                                                  0    int
           ScanHistory   [{'endts': 1346249829.4525681, 'title': 'ascan exp_mot65 0.0 0.1 5 0.1', ' [...]   list
               ScanDir                                                                  /home/kracht/temp    str

The command usenv deletes an environment variable:

 
p09/door/exp.01 [4]: senv var 123
var = 123

p09/door/exp.01 [5]: usenv var
Success!

Here is the complete list of commands related to environment variables:



Subsections
2019-11-13