Presentation is loading. Please wait.

Presentation is loading. Please wait.

JavaIOC Status EPICS Meeting Vancouver May 2 2009 Presented by : Marty Kraimer Contributions by: Matej Sekoranja(cosyLab), Shen Guobao(BNL), Sheng Peng.

Similar presentations


Presentation on theme: "JavaIOC Status EPICS Meeting Vancouver May 2 2009 Presented by : Marty Kraimer Contributions by: Matej Sekoranja(cosyLab), Shen Guobao(BNL), Sheng Peng."— Presentation transcript:

1 JavaIOC Status EPICS Meeting Vancouver May 2 2009 Presented by : Marty Kraimer Contributions by: Matej Sekoranja(cosyLab), Shen Guobao(BNL), Sheng Peng

2 Vancouver May 2 2009EPICS Meeting: javaIOC2 Outline of Talk Major changes since EPICS Meeting last October at INFN in Italy Overview of pvData  Types  Xml syntax Work in Progress  Channel Access  VDCT  JavaIOC Extensions: Model Server for Physics Application Standard records for JavaIOC  JavaIOC developments Next Release Logic Support and Finite State Machine

3 Vancouver May 2 2009EPICS Meeting: javaIOC3 Major Changes Since INFN Meeting JavaIOC moved to source forge: epics-pvdata  Sorry no current release. Multiple source forge modules. Each is eclipse project  pvData: The PV database.  CAJv4: Version 4 of CAJ. Uses pvData.  JavaIOC: Uses pvData and will use CAJv4 pvData changes  Simplified Types. Array elements can not be structure or array. Idea came from example XSD created by Matej  XML syntax completely changed At INFN meeting Matej and Andrew Johnson said:  The way elements and attributes were defined is weird.  Was not possible to develop XSD for syntax. Another minor change being implemented.

4 Vancouver May 2 2009EPICS Meeting: javaIOC4 Source Forge Can import into eclipse from CVS  Host: epics-pvdata.cvs.sourceforge.net  Repository Path: /cvsroot/epics-pvData  Module, i.e. Eclipse project: pvData CAJv4 javaIOC  User: anonymous Before first sourceforge release  CAJv4 working  Another module that is example application Local xml files. Skeleton support module. Jar files for pvData, CAJv4, javaIOC.

5 Vancouver May 2 2009EPICS Meeting: javaIOC5 Overview of JavaIOC Basic Ideas are:  PVDatabase has records consisting of structured data  For JavaIOC each field of a record can optionally have support pvData  PVDatabase  Introspection and data interfaces for each field.  Factories for creating everything for PVDatabase.  PVRecord Has top level PVStructure. Can monitor any field including a PVStructure. JavaIOC adds:  Record processing  Support

6 Vancouver May 2 2009EPICS Meeting: javaIOC6 PVDatabase A PVDatabase contains instances of the following:  structure A structured set of fields. Is used to create a default set of fields in a sub-field of:  Another structure definition  A record instance  record A record instance.

7 Vancouver May 2 2009EPICS Meeting: javaIOC7 PVData: field types enum Type { scalar,scalarArray,structure; } enum ScalarType { // for xml is boolean,... string pvBoolean,pvByte,pvShort,pvInt,pvLong,pvFloat,pvDouble, pvString; // The following are convenience methods public boolean isInteger(); public boolean isNumeric()‏ public boolean isPrimitive() public static ScalarType getScalarType(String type); } A scalar field must have a scalarType. An array field must have all elements with the same scalarType. A structure can have an arbitrary number of subfields.  Each subfield has a Type.

8 Vancouver May 2 2009EPICS Meeting: javaIOC8 PVData XML Syntax Concise Description scalarValue/scalar> <array name = "name" scalarType = "scalarType" capacity = "capacity" capacityMutable = "true/false" length = "length" offset = "offset"> arrayValues

9 Vancouver May 2 2009EPICS Meeting: javaIOC9 Example structure definitions org.epics.pvData.enumeratedFactory none,minor,major,invalid

10 Vancouver May 2 2009EPICS Meeting: javaIOC10 Example Record Instances 1.0> somePV

11 Vancouver May 2 2009EPICS Meeting: javaIOC11 Work In Progress CAJv4 – CAJv4 supports PVData, i.e. Structured data VDCT  CosyLab is developing next generation. Will support pvData.  Not discussed further in this report. Model server for High Level Physics Application.  Proof of concept. Record Templates for Process Control. JavaIOC  New Install features.  PortDriver developments.  Logic Support.

12 Vancouver May 2 2009EPICS Meeting: javaIOC12 CAJv4 Structured data (pvData) support. Possible to transfer arrays by parts. Client-specified monitor filters. New (simple) CA header, no repeater needed, reduced beacon traffic, copy- less get, flow control improvements, advanced search (introspection), etc. Status:  base “framework” completed (tx/rx queues, connection mgmt, etc.)‏  get, put and basic monitoring done (on-put, on-change, on absolute/relative change).  completing flow control… Planned features: group get/put, on-event actions/monitors, multicast monitoring.

13 Online model server prototype Online model server  Based on a so-called “virtual accelerator” Originally developed by SOLEIL and Diamond  Wrap into EPICS based  Integrate with the narrow API interface  Support Tracy-3 and Elegant  Use CA-V3 for the communication protocol Tracy/Elegant simulator (shared library)‏ Lattice configuration Distributed IOC Process Databases EPICS device support (API Interface)‏ EPICS Channel Access Lattice

14 Online model server prototype Plan for updating model server  A structured data is needed Using PVdata structure javaIOC will be used for the prototype A support will be developed  Communication protocol CA-v3/CA-v4  Fetching lattice information from IRMIS instead of local file

15 Vancouver May 2 2009EPICS Meeting: javaIOC15 Record Templates For Process Control A set of record templates are under design and implementation  Most of the features of the existing basic record types will be preserved  Some possible new features are planned and will be implemented Dynamic load/unload records Improved alarm handling Integration with event system  How to define the hardware interface is still under design  The deployment facility is under design

16 Vancouver May 2 2009EPICS Meeting: javaIOC16 Before Next Release JavaIOC uses CAJv4  Server  Client for links Make sure all support takes advantage of new AfterStart facility (See below). More effort on portDriver but will not delay release. Develop sourceforge module for Example Application. Create a nice homepage for epics-pvdata. Should be in the next couple of months. Goal is Beta release by fall Epics Meeting.

17 Vancouver May 2 2009EPICS Meeting: javaIOC17 JavaIOC: Install New Database: Background JavaIOC supports on line add of structures or records.  PVDatabase master holds completely installed structures and records.  PVDatabase beingInstalled holds structures or records to install. Structures are easy.  If xml file is parsed without error beingInstalled is merged into master. Records are harder.  Must create RecordProcess for each record.  Must create,initialize, and start the support for each field with support.  If any support does not start just fail.  If all support starts then merge beingInstalled into master  BUT what about initialization for asynchronous support EPICS has PINI and initHooks JavaIOC has afterStart – Recent development.  Next slide provides motivation.

18 Vancouver May 2 2009EPICS Meeting: javaIOC18 Initialization of asynchronous support For both input and output:  Normally want initial value before posting any monitors.  May be dependence between supports: For example output before input. PortDriver  Provide time to connect. Port must connect before device can connect. Give device time to connect before link support initializes. Can be dependence between supports. Allow unrelated ports to initialize in parallel. Servers, e. g. Channel Access  Should not allow access to new records until initialization done.

19 Vancouver May 2 2009EPICS Meeting: javaIOC19 Condensed Version of Support // following is condensed version of Support interface Support { void initialize(LocateSupport locateSupport); // WHAT IS AfterStart. Next Slide void start(AfterStart afterStart); void stop(); void uninitialize(); void process(SupportProcessRequester supportProcessRequester); }

20 Vancouver May 2 2009EPICS Meeting: javaIOC20 AfterStart Support.start calls requestCallback.  Before or after beingMerged is merged into master.  A set of queues is kept for both before and after merge. All callbacks at a requested priority must complete before the callbacks at the next lower priority are called. Support is called back when it's queue is being emptied.  It must not block but use another thread for blocking calls.  Must call done when it is finished.  Can issue doneAndRequest for later queue. interface AfterStart { void callRequesters(boolean afterMerge); void requestCallback(AfterStartNode node,boolean afterMerge,ThreadPriority priority); void done(AfterStartNode node); void doneAndRequest(AfterStartNode node,boolean afterMerge,ThreadPriority priority); }

21 Vancouver May 2 2009EPICS Meeting: javaIOC21 AfterStart – Other definitions NewAfterStart is for servers, e. g. Channel Access and portDriver.  Calls newAfterStartRegister.  Each time a new database is being called NewAfterStartRequester.callback is called Server can call AfterStart.requestCallback. public interface AfterStartNode {} interface AfterStartRequester { void callback(AfterStartNode node); } class AfterStartFactory { public static AfterStart create(); public static AfterStartNode allocNode(AfterStartRequester requester); public static void newAfterStartRegister(NewAfterStartRequester requester); public static void newAfterStartUnregister(NewAfterStartRequester requester); } interface NewAfterStartRequester { void callback(AfterStart afterStart); }

22 Vancouver May 2 2009EPICS Meeting: javaIOC22 InstallFactory InstallRecords does the following  Creates PVDatabase beingInstalled and asks that definitions from file be put into it. If any errors quit.  Creates RecordProcess for each record and Support for each field.  Calls recordProcess.initialize for each record. If failure quit.  Creates a new AfterStart.  Calls recordProcess.start for each record. If any failure quit.  Empty the beforeMerge callback queues in priority order.  Merge beingInstalled into master.  Empty the afterMerge callback queues in priority order.  ALL DONE!! class InstallFactory { public static boolean installStructures(String file,Requester requester); public static boolean installRecords(String file,Requester requester); }

23 Vancouver May 2 2009EPICS Meeting: javaIOC23 PortDriver Status Have communicated with:  Keithley 2000 Multimeter via Agilent E2050A LAN/GPIB Gateway. Thus VXI11 has been tested.  Serial port of a MOXA UC7408 LAN Gateway.  Canadian Light Source Loaned hardware. Many thanks to Elder Matias and Carl Finlay!!!!!! AutoConnect changes (Note: asyn has similar change for port).  Periodically try to connect to unconnected port or device.  Queue and lockPort requests fail if port or device not connected. AfterStart incorporated.  For connection to port and device.  Link support still needs changes.

24 Vancouver May 2 2009EPICS Meeting: javaIOC24 PortDriver Status Cont. SCPI (Standard Commands For Programmable Instruments)‏  Command and Query Should also work for many non-SCPI devices.  Beginning of support for SCPI data model. So far just scalars.  Must investigate Status and Reporting Model. Structure support that only processes when error is detected. Asyn Interpose Interface  Removed. Not needed.  Same goal attained via structures. STREAMS  I think not needed.  Again structures solve the problem.  No need for separate syntax, parser, etc.

25 Vancouver May 2 2009EPICS Meeting: javaIOC25 Logic Support EPICS has  FLNK – In dbCommon  Record Types Fanout Sequence Select Others JavaIOC has generic support  Supports a structure Calls support for each field that has support Can process in parallel or wait for previous support to finish  Replaces FLNK, Fanout, and sequence Will add additional logic support

26 Vancouver May 2 2009EPICS Meeting: javaIOC26 Future Logic Support logicIf – Semantics like Java or C if statement. logicSwitch – Semantics like Java or C switch statement. Finite State Machine  Top level support that Is the record process requester, i. e. It decides when to process. Emulates a finite state machine.  LogicStateSet – Semantics like SNL ss.  logicWhen – Semantics like SNL (State Notation Language) when.  Comments VDCT will be GUI. Channel Access can monitor internal state. Full Channel Access, portDriver, etc support.


Download ppt "JavaIOC Status EPICS Meeting Vancouver May 2 2009 Presented by : Marty Kraimer Contributions by: Matej Sekoranja(cosyLab), Shen Guobao(BNL), Sheng Peng."

Similar presentations


Ads by Google