EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024  2025  2026  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024  2025  2026 
<== Date ==> <== Thread ==>

Subject: RE: INFICON Transpector MPH Residual Gas Analyzer (RGA) - http GET requests.
From: Mark Rivers via Tech-talk <[email protected]>
To: "Govednik, Janez" <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Mon, 9 May 2022 20:01:41 +0000

Hi Janez,

 

I recently wrote an areaDetector plugin that needs to parse JSON.  It is here:

https://github.com/areaDetector/ADCore/blob/master/ADApp/pluginSrc/NDPluginBadPixel.cpp

 

I used this very nice C++ parser:

https://github.com/nlohmann/json

 

It is just a C++ header file, so no library is needed.

 

I think you could write a simple asynPortDriver that uses drvAsynIPPort for the HTTP gets and the JSON parser to do what you want.

 

Mark

 

 

From: Tech-talk <[email protected]> On Behalf Of Govednik, Janez via Tech-talk
Sent: Monday, May 9, 2022 2:50 PM
To: [email protected]
Subject: INFICON Transpector MPH Residual Gas Analyzer (RGA) - http GET requests.

 

Hello,

 

We want to develop an EPICS support for Residual Gas Analyzer from Inficon. Unfortunately, RGA is running a web server which is listening for http GET requests on port 80. The response from the web server is in JSON format. My question is if somebody already develop an IOC for this type of device? If not, what would be the best solution? We were thinking that using simple stream device support and .proto file might be too messy in this case. Is there a library for http requests and simple JSON parser if we make our own support?  Do you have an example of http device support or use of JSON parser?

 

Here are two examples of the request and response (what you see in the web browser):

  • /mmsp/scanSetup/channel/1/get
{
    "data": {
        "@id": 1,
        "channelType": "Sweep",
        "startMassRaw": 0,
        "stopMassRaw": 10000,
        "ppamu": 10,
        "dwell": 4.000,
        "emVoltage": null,
        "focusVoltage": null,
        "ionEnergy": null,
        "extra": 0,
        "leadIn": 0,
        "enabled": "True",
        "scaleFactor": 1,
        "relativeRef": 0,
        "reportType": "Absolute",
        "reportUnits": "Current",
        "equivIonFactor": -1,
        "digOutNum": -1,
        "digOutThresUpper": 1,
        "digOutThresLower": -1,
        "startMass": 0.00,
        "stopMass": 100.00,
        "channelMode": "Sweep",
        "rfEquivAMU": 0,
        "dcEquivAMU": 0,
        "rfEquivDAC": 0,
        "dcEquivDAC": 0
    },
    "name": "got",
    "origin": "/mmsp/scanSetup/channel/1"
}

 

·         /mmsp/measurement/scans
·             {
        "name": "got",
        "origin": "/mmsp/measurement/scans",
        "data": [
            {
                "scannum": 31,
                "scansize": 503,
                "values": [
                    538398,
                    4.475908e-10,
                    6.700834e-14,
                    -6.796693e-14,
                    ...
                ]
            },
            {
                "scannum": 32,
                "scansize": 503,
                "values": [
                    556335,
                    1.643438e-09,
                    -1.408637e-13,
                    ...
                ]
            }
        ]
    }
 
Thanks in advance! 
 
Best,
Janez

 


Replies:
Re: INFICON Transpector MPH Residual Gas Analyzer (RGA) - http GET requests. Andrew Johnson via Tech-talk
References:
INFICON Transpector MPH Residual Gas Analyzer (RGA) - http GET requests. Govednik, Janez via Tech-talk

Navigate by Date:
Prev: INFICON Transpector MPH Residual Gas Analyzer (RGA) - http GET requests. Govednik, Janez via Tech-talk
Next: Re: INFICON Transpector MPH Residual Gas Analyzer (RGA) - http GET requests. Andrew Johnson via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024  2025  2026 
Navigate by Thread:
Prev: INFICON Transpector MPH Residual Gas Analyzer (RGA) - http GET requests. Govednik, Janez via Tech-talk
Next: Re: INFICON Transpector MPH Residual Gas Analyzer (RGA) - http GET requests. Andrew Johnson via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024  2025  2026 
ANJ, 19 Mar 2026 · Home · News · About · Talk · Base · Modules · Extensions ·
· Distributions · Download · Documents · Links · Licensing ·