From: <jam...@di...> - 2012-02-13 17:54:45
|
>> If this require users input, how does they input t0secPastEpoch magic number correctly? That's a very good question for me and Greg! ________________________________________ From: Shen, Guobao [sh...@bn...] Sent: 13 February 2012 17:11 To: Rowland, James (DLSLtd,RAL,DIA) Cc: epi...@li... Subject: Re: Archiver Example On 2/13/12 11:48 AM, jam...@di... wrote: > Hi Guobao > > The magic numbers are the EPICS archiver codes for disconnected, disabled etc. Thanks. Is that a stand magic number by archiver engine? > > I have considered inhomogeneous data and it's not allowed as EPICS channels change type very rarely, and it's not supported by NTTable. > Type will be determined by the type of the first sample in the time range. > Strings aren't supported yet. I see. That is one channel over time. I confused myself by extending it to multiple channels. > > String date is there because it's useful to have the data in human-readable format, yes it's UTC. This is my interpretation of Greg's requirement. If this is for the convenience of human reading, why not put this to the client side? > > Waveforms are not supported yet. Either the table can have one value column per waveform element, called 'sample0', 'sample1', etc. or there will be one extra column called 'sample index' and a waveform will produce one row per waveform element. I slightly prefer the latter. I believe the waveform can be the last step. But is current NTTable suitable for this? Not sure. > > For multiple channel queries (you guessed it, not supported) the result will either be: > 1) a list of NTTables, one per channel > 2) a single table, with a new column called 'channel index' to identify the channel. In that case, all channels will have to be numbers or all channels will have to be strings. > > The parameter type isn't name/value pair but there's an action on me and Greg to come up with something that will work with the command line tool > > This is the current parameter type: > > structure MYArchiverQuery > string index /home/jr76/epics4/cpp/exampleCPP/ChannelArchiverService/data/index > string name fred > long t0secPastEpoch 496169402 > int t0nsec 0 > long count 20 If this require users input, how does they input t0secPastEpoch magic number correctly? Guobao > > James > >> -----Original Message----- >> From: Shen, Guobao [mailto:sh...@bn...] >> Sent: 13 February 2012 16:31 >> To: epi...@li... >> Cc: Rowland, James (DLSLtd,RAL,DIA) >> Subject: Re: Archiver Example >> >> Thanks James. >> It is really great for the first step. >> >> Some question: >> What is the NTType you use for the request, NTNameValue? >> >> What is your considering to have the date in your NTTable since it can be >> retrieve form secPastEPoch and nano-sec? >> Actually, the date give me kind of confusion, for example, is it a UTC time, >> or local time? >> >> Do you have any considering about supporting inhomogeneous data, for example a >> mixed data type of double, string, and integer? >> Further more, how about a mixed waveform and scalar with inhomogeneous data? >> >> It might be too much to consider, but... >> >> ps: >> just very curious, in your security array, you have some magic # like 3094 and >> 3872. What is that? >> >> Guobao >> >> On 2/13/12 10:24 AM, jam...@di... wrote: >>> Hi >>> >>> I have pushed the archiver example (no decimation). Below are the request >> and result structures. The result is an NTTable. The request API may change to >> support the generic command line tool. Included is a small command line tool >> with fixed parameters. >>> I have also copied a example archiver index and data files into hg. >>> >>> James >>> >>> >>> Request: >>> >>> structure MYArchiverQuery >>> string index >> /home/jr76/epics4/cpp/exampleCPP/ChannelArchiverService/data/index >>> string name fred >>> long t0secPastEpoch 496169402 >>> int t0nsec 0 >>> long count 20 >>> >>> Result: >>> >>> structure MYArchiverTable >>> string[] labels [value,secPastEpoch,nsec,date,status,severity] >>> double[] value >>> [0.168245,0.255837,0.317312,0.215941,0.495392,0.318756,0,0,0,0.3379,0. >>> 429723,0.518855,0.485716,0.528851,0.207881,0.355957,\ >>> 0.248583,0.0180872,0.226599,0.0924722] >>> long[] secPastEpoch >>> [496169401,496169410,496169420,496169430,496169440,496169450,496169450 >>> ,496169450,496169537,496169542,496169544,496169\ >>> >> 550,496169560,496169570,496169580,496169590,496169600,496169610,496169620,4961 >> 69630] >>> int[] nsec >>> [996447000,52636000,109690000,100015000,81932000,89935000,699760000,69 >>> 9760000,905713000,934346000,936794000,934487000,90968400\ >>> 0,900124000,880791000,865753000,859166000,834278000,809687000,794591000] >>> string[] date [Wed Sep 21 17:50:01 2005,Wed Sep 21 17:50:10 >>> 2005,Wed Sep 21 17:50:20 2005,Wed Sep 21 17:50:30 2005,Wed Sep 21 >>> 17:50:40 20\ 05,Wed Sep 21 17:50:50 2005,Wed Sep 21 17:50:50 2005,Wed >>> Sep 21 17:50:50 2005,Wed Sep 21 17:52:17 2005,Wed Sep 21 17:52:22 >>> 2005,Wed Sep 21 17\ >>> :52:24 2005,Wed Sep 21 17:52:30 2005,Wed Sep 21 17:52:40 2005,Wed Sep >>> 21 17:52:50 2005,Wed Sep 21 17:53:00 2005,Wed Sep 21 17:53:10 2005,Wed \ Sep >> 21 17:53:20 2005,Wed Sep 21 17:53:30 2005,Wed Sep 21 17:53:40 2005,Wed Sep 21 >> 17:53:50 2005] >>> int[] status [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] >>> int[] severity [0,0,0,0,0,0,3904,3872,3904,0,0,0,0,0,0,0,0,0,0,0] >>> >> -- >> Guobao Shen >> Bldg. 902-B, 17 Cornell Avenue >> National Synchrotron Light Source II >> Brookhaven National Laboratory >> Upton, New York 11973 >> Tel. : +1 (631) 344 7540 >> Fax. : +1 (631) 344 8085 >> http://www.bnl.gov/nsls2 > -- Guobao Shen Bldg. 902-B, 17 Cornell Avenue National Synchrotron Light Source II Brookhaven National Laboratory Upton, New York 11973 Tel. : +1 (631) 344 7540 Fax. : +1 (631) 344 8085 http://www.bnl.gov/nsls2 -- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom |