JavaIOC Marty Kraimer EPICS Collaboration Meeting ICALEPCS October 13-14 2007.

Slides:



Advertisements
Similar presentations
JavaIOC Overview and Update EPICS Seminar/Workshop Raja Ramanna Centre For Advanced Technology Indore India January Presented by: Marty Kraimer.
Advertisements

STRING AN EXAMPLE OF REFERENCE DATA TYPE. 2 Primitive Data Types  The eight Java primitive data types are:  byte  short  int  long  float  double.
1 1999/Ph 514: Channel Access Concepts EPICS Channel Access Concepts Bob Dalesio LANL.
PvData,pvAccess,pvIOC,pvService Status EPICS Meeting June 2011 NSRRC,Hsinchu, Taiwan Marty Kraimer, Guobao Shen, and Matej Sekoranja.
Status of VDCT Mark Pleško, Matej Šekoranja, John Maclean EPICS Meeting – Japan, 2004.
Jeffrey Hill.  LANSCE Requirements – a Review  EPICS Paradigm Shift – a Review  Status – What is Implemented  What is an Abstract Data Type?  Benefits.
PvData,pvAccess,javaIOC,pvService Status EPICS Meeting Aix-en-Provence, France Marty Kraimer, Guobao Shen, and Matej Sekoranja.
CS 106 Introduction to Computer Science I 12 / 04 / 2006 Instructor: Michael Eckmann.
CS-341 Dick Steflik Introduction. C++ General purpose programming language A superset of C (except for minor details) provides new flexible ways for defining.
SPEAR PV RDB Database EPICS Collaboration Meeting April 27, SPEAR PV RDB Database Clemens Wermelskirchen.
CVSQL 2 The Design. System Overview System Components CVSQL Server –Three network interfaces –Modular data source provider framework –Decoupled SQL parsing.
ORNL is managed by UT-Battelle for the US Department of Energy EPICS State Notation Language (SNL), “Sequencer” Kay Kasemir, SNS/ORNL Many slides from.
Abstract Types Defined as Classes of Variables Jeffrey Smith, Vincent Fumo, Richard Bruno.
Database Design with VisualDCT Nicholas Di Monte.
Avro Apache Course: Distributed class Student ID: AM Name: Azzaya Galbazar
CSCI 6962: Server-side Design and Programming JDBC Database Programming.
Announcements  If you need more review of Java…  I have lots of good resources – talk to me  Use “Additional Help” link on webpage  Weekly assignments.
Peter Andreae Computer Science Victoria University of Wellington Copyright: Peter Andreae, Victoria University of Wellington Summary and Exam COMP 102.
Imperial College Tracker Slow Control & Monitoring.
JavaIOC EPICS Meeting SSRF March Presented by: Marty Kraimer.
JavaIOC Status EPICS Meeting Vancouver May Presented by : Marty Kraimer Contributions by: Matej Sekoranja(cosyLab), Shen Guobao(BNL), Sheng Peng.
‘ActiveX’ CA Server (… and Client) Oct Kay-Uwe Kasemir, LANL.
1 1999/Ph 514: Record Support EPICS Record Support Marty Kraimer APS.
JavaIOC Status EPICS Meeting ICALEPCS2009 Kobe Japan Marty Kraimer And Matej Sekoranja.
A U.S. Department of Energy Office of Science Laboratory Operated by The University of Chicago Argonne National Laboratory Office of Science U.S. Department.
1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.
Data Design and Implementation. Definitions of Java TYPES Atomic or primitive type A data type whose elements are single, non-decomposable data items.
New Features in EPICS V4 Release 4.4 EPICS Meeting 2014, CEA, October 2014 Marty Kraimer, Matej Sekoranja.
Best Practices. Contents Bad Practices Good Practices.
Jožef Stefan Institute Oct. 8-9, 2005ACS 2005 Workshop Comparison of EPICS and ACS M. Plesko – JSI and Cosylab, in collaboration with Phil Duval, DESY.
Generic Programming  Object Type  Autoboxing  Bag of Objects  JCL Collections  Nodes of Objects  Iterators.
Chapter 6 Introduction to Defining Classes. Objectives: Design and implement a simple class from user requirements. Organize a program in terms of a view.
Writing a Channel Access Client in EPICS Bob Dalesio, April 5, 2000.
Writing a Channel Access Client in EPICS Bob Dalesio, April 5, 2000.
Managed by UT-Battelle for the Department of Energy CSS Update Matthias Clausen, Helge Rickens, Jan Hatje and DESY Delphy Armstrong, Xihui Chen,
EPICS EPICS Limitations Bob Dalesio Marty Kraimer.
A XML 1 An XML Driven Graphical User Interface and Application Management Toolkit Matthias Clausen (DESY & SLAC) Piotr Bartkiewicz (DESY & FPNT/AGH) Alexei.
Data Types written by Gabriele Carcassi performed by Bob Dalesio based on ideas/requirements from Bob Dalesio, Kay Kasemir, Ralph Lange, James Roland,
07/10/2007 VDCT Status Update EPICS Collaboration, October 2007 Knoxville, Tennessee
1 1999/Ph 514: Flow of Control EPICS Flow of Control Marty Kraimer APS.
Objects and Classes Chapter Nine. Definition “an object is a combination of some data (variables) and some actions (methods)”. Hopefully the data and.
Control System Overview J. Frederick Bartlett Fermilab June 1,1999.
Advanced Java Session 4 New York University School of Continuing and Professional Studies.
EPICS Development for the ASKAP Design Enhancements Program ASTRONOMY AND SPACE SCIENCE Craig Haskins 18 th October 2015 EPICS User Meeting – Melbourne.
EPICS to TANGO Translator Rok Šabjan on behalf of Rok Štefanič Presented at ICALEPCS, Knoxville, October.
 In the java programming language, a keyword is one of 50 reserved words which have a predefined meaning in the language; because of this,
Peter Andreae Computer Science Victoria University of Wellington Copyright: Peter Andreae, Victoria University of Wellington Types and Interfaces COMP.
Argonne National Laboratory is managed by The University of Chicago for the U.S. Department of Energy ICALEPCS 2005: EPICS Workshop EPICS V4 : Runtime.
Peter Andreae Computer Science Victoria University of Wellington Copyright: Peter Andreae, Victoria University of Wellington Summary and Exam COMP 102.
A U.S. Department of Energy Office of Science Laboratory Operated by The University of Chicago Argonne National Laboratory Office of Science U.S. Department.
Spring 2009 Programming Fundamentals I Java Programming XuanTung Hoang Lecture No. 8.
B. Dalesio, N. Arnold, M. Kraimer, E. Norum, A. Johnson EPICS Collaboration Meeting December 8-10, 2004 Roadmap for IOC.
PvaPy: Python API for EPICS PV Access Siniša Veseli Scientific Software Engineering & Data Management Advanced Photon Source EPICS Meeting October 2015.
Quick Review of OOP Constructs Classes:  Data types for structured data and behavior  fields and methods Objects:  Variables whose data type is a class.
1 EPICS Flow of Control: EPICS Workshop at IHEP, Beijing, August 2001 EPICS Flow of Control Marty Kraimer APS.
Control System Overview J. Frederick Bartlett Fermilab June 1,1999.
Flag Quiz Game App Android How to Program © by Pearson Education, Inc. All Rights Reserved.
How to Leverage Java in Oracle Forms Web Applications Duncan Mills Application Development Tools Oracle Corporation.
Apache Avro CMSC 491 Hadoop-Based Distributed Computing Spring 2016 Adam Shook.
1 BROOKHAVEN SCIENCE ASSOCIATES EPICS Version 4 – Normative V4 Team – presented by Bob Dalesio EPICS Meeting October 7, 2011.
This material is based upon work supported by the U.S. Department of Energy Office of Science under Cooperative Agreement DE-SC , the State of Michigan.
Chapter 27 Network Management Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Using COTS Hardware with EPICS Through LabVIEW – A Status Report EPICS Collaboration Meeting Fall 2011.
JavaIOC Overview and Update
Chapter No. : 1 Introduction to Java.
SLAC USA Marty Kraimer and Matej Sekoranja
pvData,pvAccess,pvIOC,pvService Overview and Status EPICS Meeting
pvData,pvAccess,pvIOC,pvService Overview and Status EPICS Meeting
Java Programming Review 1
pvData,pvAccess,pvIOC,pvService Overview and Status EPICS Meeting
Presentation transcript:

JavaIOC Marty Kraimer EPICS Collaboration Meeting ICALEPCS October

October 2007ICALEPCS/EPICS Meeting2 Overview Brief review of JavaIOC features types link, enum, and menu gone JavaIOC Data Model Generic structures and recordTypes Support – All support is generic PortDriver – JavaIOC version of asyn

October 2007ICALEPCS/EPICS Meeting3 JavaIOC Features Rich Set of Data Types Smart soft real-time Database  Record Instances can be processed.  Any field can optionally have support.  Connect to Hardware or other records. Defines Data Model  General Purpose Clients can easily find data.  Generic Support can easily find data. Rich set of record/structures and support.

October 2007ICALEPCS/EPICS Meeting4 Implemented PV (Process Variable) Database XML Parsers: DBD and Record Instance Record Processing/Scanning/Monitoring Channel Access Local COSYLab: CA Server for CSS/V3 clients Generic record/structures and support PortDriver – JavaIOC ASYN Support SWTSHELL: GUI iocshell

October 2007ICALEPCS/EPICS Meeting5 Not Implemented Remote Channel Access  JavaIOC client JavaIOC server  JavaIOC client V3 server VDCT: Visual Database Configuration Tool Access security Error logging ??? Lots to do!!

October 2007ICALEPCS/EPICS Meeting6 PV Database Field types  Primitive: all Java primitives except char boolean, byte, short, int, long, float, double  string: implemented as a Java String  structure: has fields. Each field can be any type  array: has elementType which can be any type Complex Structures fully supported Introspection and Data interfaces: Provide access to any field.

October 2007ICALEPCS/EPICS Meeting7 PV Introspection Introspection Interfaces, i.e. no data  Field: Methods: getType, getFieldName,...  Array: extends Field: Method: getElementType  Structure: extends Field Methods: getFields, getStructureName FieldFactory  Implements introspection interfaces  Can be extended but probably not necessary

October 2007ICALEPCS/EPICS Meeting8 PV Data Interfaces PVField: Base for data: Methods: getField,...  PVBoolean,...,PVString : Methods: get,put  PVArray: Base for array data interfaces PVBooleanArray,...,PVArrayArray : Methods get,put  PVStructure provides access to a structure.  PVRecord provides access to a record instance. PVDataFactory  Default implementation.  Any PVField can be replaced. Often useful ConvertFactory: Convert between data types

October 2007ICALEPCS/EPICS Meeting9 XML Parsers DBD - Database Definitions  structure  recordType - A top level structure  create – defines factory that replaces default data implementation.  support – defines a factory that implements support for a field. DB - Record Instance Macro Substitution and Include

October 2007ICALEPCS/EPICS Meeting10 Types Removed Previously javaIOC had types  link  enum  menu link replaced by support for structure enum and menu replaced by enumerated structure

October 2007ICALEPCS/EPICS Meeting11 Enumerated structure <field name = "choices" type = "array" elementType = "string" /> <create name = "enumerated" factoryName = "org.epics.ioc.create.EnumeratedFactory" />

October 2007ICALEPCS/EPICS Meeting12 enumerated An enumerated structure has fields  index – an int that selects one of choices  choice – a string that is the current choice  choices – an array of strings The enumerated create  Replaces the default implementation  A put to index also changes choice  A put to choice also changes index

October 2007ICALEPCS/EPICS Meeting13 alarmSeverity An enumerated structure with default choices <field name = "choices" type = "array" elementType = "string" default = "none minor major invalid" />

October 2007ICALEPCS/EPICS Meeting14 Java IOC Database Has a set of record instances. Each record and field is accessed via interfaces. Each instance can be processed  Periodically scanned  Event scanned  Passively scanned: by client or other record Factories: Data and Introspection

October 2007ICALEPCS/EPICS Meeting15 PV Naming EPICS pvname is.field JavaIOC is.name.name....  name can be field name or a property Some examples .value.value.display.limit.low.power.value.supply[0].power.value

October 2007ICALEPCS/EPICS Meeting16 JavaIOC Data Model Simple: All related data appears together in a structure Intended for Client tools and for Support Field name can be a property name  A null structure(no fields and no support) is not a property.  If a structure has a field named “value” than every other field is a property unless it is a null structure.

October 2007ICALEPCS/EPICS Meeting17 Finding Properties PVField provides method findProperty  PVField findProperty(String fieldName); Two examples for fieldName are:  “value”  “supply[0].power.value” If pvField refers to the value field than  “display”  “display.limit.low”

October 2007ICALEPCS/EPICS Meeting18 Generic structure/recordType The JavaIOC now has DBD definitions for  Each primitive type  An array with a primitive element type  A structure and recordType for each Record instances can  Just hold data  Be an input record, an output record, etc The structure versions are for device records

October 2007ICALEPCS/EPICS Meeting19 structure/recordType double XML definitions on next two slides Follows JavaIOC Data Model recordType double is defined. It can:  Just holds data  Be an input or output or both  Be an analog input or analog output Structure double is defined  It can be embeded in other recordTypes  Building block for “device” records

October 2007ICALEPCS/EPICS Meeting20 doubleCommon.xml

October 2007ICALEPCS/EPICS Meeting21 doubleRecord.xml <field name = "supportArray" type = "array" elementType = "structure" supportName = "supportArray" />

October 2007ICALEPCS/EPICS Meeting22 Fields in doubleCommon value has type double All other fields are a null structure  A record instance can override  If not overridden than NOT a property Following two slides show example  The definition of display  An example record instance

October 2007ICALEPCS/EPICS Meeting23 display.xml <field name = "limit" type = "structure" structureName = "doubleLimit" />

October 2007ICALEPCS/EPICS Meeting24 record instance Note that example.value will have property display. volts

October 2007ICALEPCS/EPICS Meeting25 Support Overview Implements record processing semantics Each record instance has support Each field of a record instance can optionally have support Support should always be as generic as possible  Look for required fields and ignore all others  If required fields not found don’t start

October 2007ICALEPCS/EPICS Meeting26 generic support Is often the default support Supports both recordType and structure Algorithm  For each field that has support call it.  Each support must complete before support for the next field is called.  If any support does not report success don’t call any more support.

October 2007ICALEPCS/EPICS Meeting27 Analog Input Example The recordType is double Input has structureName linearConvert  This has fields including value and input  The default support is generic The following support is used  generic  linearConvertInput  pdrvInt32Input

October 2007ICALEPCS/EPICS Meeting28 Analog Input Instance pdrvInt32Input puts input.value; linearConvertInput puts value. <input supportName = "pdrvInt32Input" structureName = "pdrvSupport"> aPortDriver

October 2007ICALEPCS/EPICS Meeting29 Analog Input Semantics The generic support for ai calls the support for field input The generic support for input  Calls the pdrvInt32Support It puts a value into input.value  Calls the linearConvertInput support It gets a value from input.value, converts it to engineering units, and puts the result into ai.value

October 2007ICALEPCS/EPICS Meeting30 powerSupply Example This is an example of a “device” record Only new support is powerSupplyCurrent  It gets power.value and voltage.value  From these it computes the current  Puts the current into current.value

October 2007ICALEPCS/EPICS Meeting31 powerSupplyCommon.xml <field name = "power" type = "structure" structureName = "double" /> <field name = "voltage" type = "structure" structureName = "double" /> <field name = "current" type = "structure" structureName = "double" />

October 2007ICALEPCS/EPICS Meeting32 powerSupplyRecord.xml <field name = "supportArray" type = "array" elementType = "structure" supportName = "supportArray" /> <support name = "powerSupplyCurrent" factoryName = "org.epics.ioc.support.PowerSupplyFactory" />

October 2007ICALEPCS/EPICS Meeting33 powerSupplyExample.xml

October 2007ICALEPCS/EPICS Meeting34 powerSupplyArray The following defines a recordType that can hold an array of powerSupply <field name = "supply" type = "array” elementType = “structure”/>

October 2007ICALEPCS/EPICS Meeting35 psArrayExample.xml

October 2007ICALEPCS/EPICS Meeting36 Finding Fields A V3 client could ask for  ai.value  ai.input.value  ps.power.value  ps.current.value  ps.voltage.value  psArray.supply[0].power.value  psArray.supply[1].current.value

October 2007ICALEPCS/EPICS Meeting37 portDriver Same functionality as asyn AsynManager does not exist  Methods moved to User, Port, or Device  Easier to understand: Code and Doc See javaDoc for org.epics.ioc.pdrv NOT Ready for use  NO real drivers have been implemented  STREAMS not implemented  devGpib will not be implemented

October 2007ICALEPCS/EPICS Meeting38 User.java Interface User { public static final int REASON_SIGNAL = -1; User duplicateUser(QueueRequestCallback queueRequestCallback); Port connectPort(String portName); void disconnectPort(); Port getPort(); Device connectDevice(int addr); void disconnectDevice(); Device getDevice(); void queueRequest(QueuePriority queuePriority); void cancelRequest(); Status lockPort(); void unlockPort(); void setMessage(String message); String getMessage(); void setTimeout(double timeout); double getTimeout();

October 2007ICALEPCS/EPICS Meeting39 User.java continued void setDeviceDriverPvt(Object deviceDriverPvt); Object getDeviceDriverPvt(); void setUserPvt(Object userPvt); Object getUserPvt(); void setReason(int reason); int getReason(); void setAuxStatus(int auxStatus); int getAuxStatus(); void setInt(int value); int getInt(); void setDouble(double value); double getDouble(); void setString(String value); String getString(); }