Agenda
======
0. Preliminaries, 5 mins

  Let's restart use of the bug tracker.
  Normative Types bindings.

1. Status review of items for demo of beta 2 [1].

2. NTURI and Service API [2].

  Should the URI form of a pvaccess RPC request that includes an entity,
  put the entity in the query part of the URI (i below), or in the path part (ii below).

   normal form: $ pvget -s modelservice -a entity=swissfel/in/quads

   i) uri form:    $ pvget pva:///modelservice?entity=swissfel/in/quads
   or
   ii) uri form:    $ pvget pva:///modelservice/swissfel/in/quads

[1] http://epicsv4.titanpad.com/ep/pad/view/27/latest
[2] http://epics-pvdata.sourceforge.net/alpha/EPICS_URI.txt

Minutes
======
Present: MK, BD, TK, GS, GW, DH
Scribe: GW

********
NEW TOPIC: Status review of items for demo of beta 2
********
1. Get the value of an V3 PV [user has no knowledge that it's V3 as opposed to V4]
eget QUAD:34:IDES
23.424
----------------------Done (Matej Confirm. I confim, but only via v3Channel (V4 server on-top V3 IOC))---------------------------------------

*MS*
2. Get the values of all the V3 CA standard fields (-r is pvAccess request string)
eget QUAD:34:IDES -r 'field()'
---------------------Done (Matej Confirm. I confim, but only via v3Channel (V4 server on-top V3 IOC)----------------------------------------

*MK*
3. Get the value of an UNSIGNED V3 PV
AI: Greg, give MK a short requirement for unsigned PVs

    bpm01:x   (+/-) usually in mm
    bpm01:y   (+/-) usually in mm
    bpm01:tmit (+) usually in culomb, or simply number charged particles
    
AI: MK, implement an unsigned V3 demo



*MS*
4. Get the value of a V4 scalar pv
-----------------------Done (Matej Confrim. I confirm.)----------------

*MS*
5. Get the value of a V4 array pv to the command line
eget QAUD:LI:18:POLYOMIALS
34.6
19.5
29.3
-------------------Done (Matej Confrim. I confirm.)-------------------------

*MS*
6. Put the value of a V4 scalar pv
eput -v 34.4 XCOR:LI:34:IDES
------------------Done (Matej Confirm. I confirm, can be done using pvput)--------------------------

*MS*
7. Put the value of a V4 array PV
eput -v 34.4 19.6 29.3 XCOR:LI:34:IDES
-----------------Done (Matej Confirm. I confirm, can be done using pvput)---------------------------

*MS*
8. Put the value of a V3 waveform [(!!!) is this possible?]
eput -v 34.4 19.6 29.3 QUAD:34:POLY
----------------Done (Matej Confirm. I confim, but only via v3Channel (V4 server on-top V3 IOC) using pvput)------------------------------

*MS*
9. Monitor the value of a simple type V4 PV
emon BPMS:LI34:X
[MS: says we have pvget with a special switch for monitor]
--------------(Done, using pvget -m)--------------

*GW*&MS
10.  Get a NTMarix and print as a matrix
$ eget -a TYPE=DESIGN -a POS=MID -a RUN=LATEST QUAD:LI21:271/R
0.23 0.1234 0.0 0.0 0.067562 0.001167
-0.34520 0.0923 0.0 0.0 0.046981 0.001514
0.0 0.0 1.881007 4.857304 0.0 0.0
0.0 0.0 -1.50064 -3.862346 0.0 0.0
-0.00132 -0.001129 0.0 0.0 0.224701 0.003894
0.162595 0.10285 0.0 0.0 -19.603 -0.233109
----------------- (Done, note that eget uses -p instead of -a. Easy to change, what to use?)-------------------------------------------

10.1 Get values according to arguments in a consistent way from any RPC service
See examples eget -a above.

*DH*
11. Get a NTTable and print as a table. Illustrate with archive service.
$ eget -a start="3 minutes ago" -a end="now" -a p=12 QUAD34_Bfield
------------------(
    
DH: Channel Archiver service updated for fieldname move, pointer->shared pointers and various other changes. Quiet mode (-q) added as requested. Output can be piped into other apps. Verbose mode too. Some improved output. Have some real data instead of fred and janet, will push soon. Some issues with the archiver as we've modded the data format in ours, so had to get some old data. When I've finished either someone will have to try it against the regular archiver or I'll have to build a regular one and test (former is better, good to have two pairs of eyes on it). Only works with existing tool gethist. Need to  a bit more to get it to use eget. Output conforms to NT table in terms of fields, but doesn't use ID field yet. Will send out mail when it's all done and someone can test.
   
DH: The service takes nameofchannel and start-seconds-past-epoch and end-seconds-past-epoch.
GW: So to use eget with it, you might use the unix date command.
 
Use Cases of Directory Service
==============================
*RL*
12.  Get the names of a number of PVs (v3 or v4 potentially heterogeneous  mix) where their names match a string, using the Directory Service.  Ideally, sort by a tag or option. E.g.:
eget -s DirectoryService -a pattern 'XCOR:*:BDES' -a options "sortbyz"
-------------------(Service is turned over but the use of a NT Table is not verified)----------

*RL*
13.  As above but additionally get the values. In the case illustrated below  done with a pipe, but better if integrated into eget.
------------------(This is not done - but should be a short step ;)  ---)
AI: RL to test this through EGET


*RL*
14. Get the value of a number of PVs, where the names match the conjunction (AND) of Directory Service tags
E.g.: Print the value of the desired B field (BDES) from all correctors in the (SwissFEL) section SINBC01
eget -s DirectoryService -a property='section=SINBC01' -a property='type=COR' tag='BDES' -options="sortbyz" | eget -t
sinbc01.cor01:B 23.34345
sinbc01.cor02:B 43.47543
-------------------(Service is turned over but the use with eget for complex query not verified)----------

Use Cases of Gather Service
===========================
*TK*
15. Use of an ad hoc Gather to get the field value (V3 PVs) of many magnets or BPMs.
Show use of gather service to simply give LATEST gathered values from a Gather record defined by the client:
So this is something probably done in Matlab
[TODO insert example]
----------------------------------------Just started - Timo will handle this)------------------

*TK*
16. Get synchronous BPM orbit data from a BPM service, that is using the gather service in combination with a SLAC/PSI
like BPM synchronous data system. Data form is NTTable.

eget -a Npulses=3 SwissFELTI:sync:bpmorbit
pulse_Id bpm_name            X         Y             TMIT         Status
31330    sinlh01.diag01.bpm  0.331939 -0.20821595 9.2273582E9 OK
31690 sinlh01.diag01.bpm  0.343939 -0.21321534 9.3973582E9 OK
32056 sinlh01.diag01.bpm  0.343939 -0.21321534 9.3973582E9 OK
31330 sinlh02.diag01.bpm  0.430091 -0.19211863 9.4554767E9 OK
31690 sinlh02.diag01.bpm  0.429820  -0.18054654    9.3577114E9 OK
32056 sinlh02.diag01.bpm  0.476549  -0.23452345    9.3245235E9 OK
... snipped many more
Total number of rows printed would be M bpms in the gather record named SwissFELTI:sync:bpmorbit, times
N pulses
BD: Maybe we should shelve this because pvManager can do it.
What would be nice to put a service on top of pvmanager.
TK: Have an idea of how to do it.
GW: In the context of BNL the pvManager is sensible. But for PSI, they don't have pvmanager,
so it's sensible for them to implement their server side independently.

Consensus: Synchronous BPM service is not the highest priority. But should be done soon.

*MK*
17. Get the values of a number of V3 PV (fields) from one V3 IOC, through a V4 record on V3 IOC PVA
[ie, "The Dirk Requirement" ].
Ideally a heterogenous structure of V3 scalar and waveforms.
E.g. Get a summary of the PVs relating to a QUAD from an IOC. In this example the V4 PV
is QUAD35:SUMMARY, to illustrate that one might use the "physics" name (QUAD35) for such summary
PVs, and their values might be composed of a structure of V3 PVs named with engineering names and their values:

eget QUAD35:SUMMARY
QUAD:SECT02:13:B 42.3
QUAD:SECT02:13:POLY 23234.2342 5435.34 753.3 4.34234 5.32E-23
QUAD:SECT02:13:E 4.454

MK trying it.
TK: tried it and it seems to work!
TK: When service is running, can use pvput to put the waveform, but caput didn't work!!

AI: MK, check use of caput to a waveform that is one of those channels aggregated by a V4 IOC.


EasyPVA, Model Service and Directory Service from Matlab.
=========================================================

Overall *GW*, from input from RL and TK.

18.  Example of orbit correction from Matlab, done using easyPVA
Illustrates requirements for:
1. EasyPVA understanding request for PVStructure
2. EasyPVA understanding arguments as part of request for data
3. EasyPVA understanding that an argument TO a service may be an array
   (in the example a table of magnet names and B field values)
Also assumes the Directory Service requirement articulated above to get Corrector and BPM names
-------------------------------
% SwissFEL orbit correction in 1/2 page of matlab
% The following is syntactically valid Matlab, but need to see from Ralph how it is actually done.
%
import org.epics.ca.easyPVA.*;
easyPVA = EasyPVAFactory.get();

*******
NEW TOPIC: Use of Bug Tracker
*******
BD: sounds like apple pie.
GW: Right, let's start using it.


*******
NEW TOPIC: BNL Meeting
*******
BD: A db meeting will be on Mon, Tue and Wed morning. EPICS V4 will come after.
BD: Mon is db technology
      Tue is db applications. Egs Inventory, cable management, op logs.
      Wed morning: DS, Masar, physics db eg models. Maybe Archive service.
      Wed afternoon EPICS v4 status review demos.
      Thursday will be beamline