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  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Testing the new DBE property in EPICS R3-14-11
From: Andrew Johnson <[email protected]>
To: [email protected]
Date: Thu, 16 Sep 2010 11:20:00 -0500
On Thursday 16 September 2010 08:57:37 Ralph Lange wrote:
>
> I would think that camonitor for the complex structures would yield a
> hard to read, if not unusable output.

We could provide an option to output the complex structures using JSON, 
although it might be better to provide this functionality in a separate 
program.  Suggested output:

tux% cajson -d DBR_CTRL_DOUBLE -mvap anj:aiExample
{
  "anj:aiExample": {
    "field_type": "DBF_DOUBLE",
    "value": 0,
    "status": "UDF",
    "severity": "INVALID",
    "units": "Volts",
    "precision": 1,
    "lower_disp_limit": 0,
    "upper_disp_limit": 10,
    "lower_alarm_limit": null,
    "lower_warning_limit": null,
    "upper_warning_limit": null,
    "upper_alarm_limit": null,
    "upper_ctrl_limit": 0,
    "lower_ctrl_limit": 10,
  }
}

I'm using "null" for NaN values since JSON doesn't permit them in numerics, 
although I guess they could be expressed as "nan" instead.  I think each CA 
monitor event should output a complete JSON object, although I'm not sure 
whether parsers will like this.  The cajson program could use -m to mean 
monitor and do a ca_get_callback if you don't specify it.

Having created the above example I realize one problem with the DBR_CTRL_xxx 
types is that they don't include a time-stamp, so they're not very good for 
monitoring values that change over time.

- Andrew
-- 
The best FOSS code is written to be read by other humans -- Harald Welte


References:
Testing the new DBE property in EPICS R3-14-11 Xu, Chengcheng
Re: Testing the new DBE property in EPICS R3-14-11 Ben Franksen
Re: Testing the new DBE property in EPICS R3-14-11 Ralph Lange

Navigate by Date:
Prev: Re: controlling cross compiled build products Andrew Johnson
Next: Re: Testing the new DBE property in EPICS R3-14-11 Ben Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Testing the new DBE property in EPICS R3-14-11 Ralph Lange
Next: Re: Testing the new DBE property in EPICS R3-14-11 Ben Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·