Skip to content
Snippets Groups Projects
Select Git revision
  • 651ed04e05cb4e77cd9a85634039272c1e630487
  • master default protected
  • vxi
  • 0.16.467
  • 0.16.462
  • 0.16.460
  • 0.16.457
  • 0.16.455
  • 0.16.413
  • 0.16.0
  • 0.15.1
  • 0.15.0
  • 0.14.0
  • 0.13.0
14 results

EXAMPLES-EXECUTE.md

Blame
  • Thomas Bock's avatar
    Thomas Bock authored
    6420b749
    History
    EXAMPLES-EXECUTE.md 1.35 KiB

    EXECUTE examples

    Set

    H="Content-Type: application/json"
    URL=http://localhost:9009/
    

    and use it this way

    curl -H "$H" -d "$D" -X POST $URL
    D='{"Action":"EXECUTE","Cmd":"ls", "Wait":100 , "Repeat":2}'
    
    ## =>
    ## {
    ##    "_x":[
    ##       {
    ##          "exit":0,
    ##          "out":"CHANGELOG.md\ndoc\ndocs\nLICENSE\npre-commit.sh\nproject.clj\nREADME.md\nresources\nsrc\ntarget\ntest\n",
    ##          "err":""
    ##       },
    ##       {
    ##          "exit":0,
    ##          "out":"CHANGELOG.md\ndoc\ndocs\nLICENSE\npre-commit.sh\nproject.clj\nREADME.md\nresources\nsrc\ntarget\ntest\n",
    ##          "err":""
    ##       }
    ##    ],
    ##    "_t_start":[
    ##       "1608482700761",
    ##       "1608482700871"
    ##    ],
    ##    "_t_stop":[
    ##       "1608482700771",
    ##       "1608482700875"
    ##    ],
    ##    "_dt":[
    ##       10,
    ##       4
    ##    ]
    ## }
    D='{"Action":"EXECUTE", "Cmd":"ls", "Wait":100, "Repeat":5, "PostScriptPy": "ls-demo"}'
    
    ## =>
    ## {"ToExchange":{"FileAmount":[12,12,12,12,12]}}

    Read out the second channel of a Inficon VGC50x via a direct connected usb wire:

    D='{"Action":"EXECUTE", "Cmd":"python3 resources/py/inficon-vgc.py 2 10 1"}'

    With post processing

    D='{"Action":"EXECUTE", "Cmd":"python3 py/inficon-vgc.py 2 3 0.1", "PostScript":"inf-vgc.read-out", "PostScriptInput":{"Type":"ind", "Unit":"mbar"}}'