Download presentation
Presentation is loading. Please wait.
Published byRosaline Craig Modified over 9 years ago
1
JavaIOC Marty Kraimer EPICS Collaboration Meeting ICALEPCS October 13-14 2007
2
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
3
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.
4
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
5
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!!
6
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.
7
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
8
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
9
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
10
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
11
October 2007ICALEPCS/EPICS Meeting11 Enumerated structure <field name = "choices" type = "array" elementType = "string" /> <create name = "enumerated" factoryName = "org.epics.ioc.create.EnumeratedFactory" />
12
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
13
October 2007ICALEPCS/EPICS Meeting13 alarmSeverity An enumerated structure with default choices <field name = "choices" type = "array" elementType = "string" default = "none minor major invalid" />
14
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
15
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
16
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.
17
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”
18
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
19
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
20
October 2007ICALEPCS/EPICS Meeting20 doubleCommon.xml
21
October 2007ICALEPCS/EPICS Meeting21 doubleRecord.xml <field name = "supportArray" type = "array" elementType = "structure" supportName = "supportArray" />
22
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
23
October 2007ICALEPCS/EPICS Meeting23 display.xml <field name = "limit" type = "structure" structureName = "doubleLimit" />
24
October 2007ICALEPCS/EPICS Meeting24 record instance Note that example.value will have property display. volts 0.0 10.0
25
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
26
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.
27
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
28
October 2007ICALEPCS/EPICS Meeting28 Analog Input Instance pdrvInt32Input puts input.value; linearConvertInput puts value. <input supportName = "pdrvInt32Input" structureName = "pdrvSupport"> aPortDriver 0.2 20 0.0 10.0
29
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
30
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
31
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" />
32
October 2007ICALEPCS/EPICS Meeting32 powerSupplyRecord.xml <field name = "supportArray" type = "array" elementType = "structure" supportName = "supportArray" /> <support name = "powerSupplyCurrent" factoryName = "org.epics.ioc.support.PowerSupplyFactory" />
33
October 2007ICALEPCS/EPICS Meeting33 powerSupplyExample.xml
34
October 2007ICALEPCS/EPICS Meeting34 powerSupplyArray The following defines a recordType that can hold an array of powerSupply <field name = "supply" type = "array” elementType = “structure”/>
35
October 2007ICALEPCS/EPICS Meeting35 psArrayExample.xml
36
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
37
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
38
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();
39
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(); }
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.