Client Data Types Gabriele Carcassi Oct 12 2010. Scope and requirements  Define client side data structures to represent data for control systems and.

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

Arrays.
Control System Studio (CSS) Data Access Layer (DAL) Kay Kasemir, Xihui Chen July 2009.
Computer Science 209 Software Development Equality and Comparisons.
Dr. Kalpakis CMSC 661, Principles of Database Systems Representing Data Elements [12]
CSS Developments at BNL / NSLS-II Gabriele Carcassi Feb
Hashing as a Dictionary Implementation
Appendix I Hashing. Chapter Scope Hashing, conceptually Using hashes to solve problems Hash implementations Java Foundations, 3rd Edition, Lewis/DePasquale/Chase21.
PvData,pvAccess,javaIOC,pvService Status EPICS Meeting Aix-en-Provence, France Marty Kraimer, Guobao Shen, and Matej Sekoranja.
Arrays. Memory organization Table at right shows 16 bytes, each consisting of 8 bits Each byte has an address, shown in the column to the left
CSE 143 Lecture 22: Advanced List Implementation (ADTs; interfaces; abstract classes; inner classes; generics; iterators)
Representing Data Elements Gayatri Gopalakrishnan.
Arrays. A problem with simple variables One variable holds one value –The value may change over time, but at any given time, a variable holds a single.
Arrays. A problem with simple variables One variable holds one value –The value may change over time, but at any given time, a variable holds a single.
CS 171: Introduction to Computer Science II Stacks Ymir Vigfusson.
Java Unit 9: Arrays Declaring and Processing Arrays.
JavaIOC Marty Kraimer EPICS Collaboration Meeting ICALEPCS October
CSE 331 Software Design & Implementation Hal Perkins Autumn 2012 Java Classes, Interfaces, and Types 1.
Avro Apache Course: Distributed class Student ID: AM Name: Azzaya Galbazar
WSDL: Web Services Definition Language CS 795/895.
Files and Streams. Java I/O File I/O I/O streams provide data input/output solutions to the programs. A stream can represent many different kinds of sources.
1 SAD2 - UML 4 th Lecture Class Diagram in Construction Phase Patterns Case Study Lecturer: Dr Dimitrios Makris
Writing JavaDocs Mimi Opkins CECS 274 Copyright (c) Pearson All rights reserved.
Introduction to Programming David Goldschmidt, Ph.D. Computer Science The College of Saint Rose Java Fundamentals (Comments, Variables, etc.)
Basic Java Syntax CSE301 University of Sunderland Harry R Erwin, PhD.
16-Oct-15 JSP Implicit Objects. 2 JSP Implicit Objects are the Java objects that the JSP Container makes available to developers in each page and developer.
Arrays Part 9 dbg. Arrays An array is a fixed number of contiguous memory locations, all containing data of the same type, identified by one variable.
JAVA: An Introduction to Problem Solving & Programming, 5 th Ed. By Walter Savitch and Frank Carrano. ISBN © 2009 Pearson Education, Inc., Upper.
2: Everything is an Object You Manipulate Objects Using References Primitives Arrays in Java Scoping You Never Destroy Objects Creating New Data Types:
Hello.java Program Output 1 public class Hello { 2 public static void main( String [] args ) 3 { 4 System.out.println( “Hello!" ); 5 } // end method main.
PVManager Gabriele Carcassi Feb PVManager goals  Simplify data collection and aggregation  Simplify (UI) development  Re-use code as much.
String Processing Opening Discussion zDo you have any questions about the quiz? zWhat did we talk about last class? zDo you have questions.
MASAR Service Guobao Shen Photon Sciences Department Brookhaven National Laboratory EPICS Collaboration Workshop Oct 05, 2013.
New Features in EPICS V4 Release 4.4 EPICS Meeting 2014, CEA, October 2014 Marty Kraimer, Matej Sekoranja.
MASAR Server & Application Guobao Shen Photon Sciences Department Brookhaven National Laboratory Collaboration Working Group Oct 02, 2013.
Object Based Programming Chapter 8. 2 In This Chapter We will learn about classes Garbage Collection Data Abstraction and encapsulation.
ICOM 4035 – Data Structures Dr. Manuel Rodríguez Martínez Electrical and Computer Engineering Department Lecture 4 – August 30, 2001.
Wir schaffen Wissen – heute für morgen Paul Scherrer Institut EPICS V4 Archiver Service and Matlab client Timo Korhonen.
INTERFACES More OO Concepts. Interface Topics Using an interface Interface details –syntax –restrictions Create your own interface Remember polymorphism.
M180: Data Structures & Algorithms in Java Arrays in Java Arab Open University 1.
Documentation javadoc. Documentation not a programmer's first love lives in a separate file somewhere usually a deliverable on the schedule often not.
Introduction to Java Lecture Notes 3. Variables l A variable is a name for a location in memory used to hold a value. In Java data declaration is identical.
DT228/3 Web Development Databases. Querying a database: Partial info Search engines, on-line catalogues often need to allow user to search a database.
CompSci 100E 40.1 Java 5 New Features  Generics  Enhanced for loop  Autoboxing/unboxing  Typesafe enums  Other  Varargs  Static Import  Metadata.
Chapter 6 Introduction to Defining Classes. Objectives: Design and implement a simple class from user requirements. Organize a program in terms of a view.
Everything is an object (CH-2) Manipulating Objects with References. Manipulating Objects with References. String s; String s = “IS2550” String s = new.
Data Types written by Gabriele Carcassi performed by Bob Dalesio based on ideas/requirements from Bob Dalesio, Kay Kasemir, Ralph Lange, James Roland,
CSCI 1100/1202 April 1-3, Program Development The creation of software involves four basic activities: –establishing the requirements –creating.
Java Basics Opening Discussion zWhat did we talk about last class? zWhat are the basic constructs in the programming languages you are familiar.
GoodOO Programming Practice in Java © Allan C. Milne v
M1G Introduction to Programming 2 3. Creating Classes: Room and Item.
Adapter and Façade Patterns By Wode Ni and Leonard Bacon-Shone.
Arrays. The array data structure Array is a collection of elements, that have the same data type Integers (int) Floating point numbers (float, double)
PvaPy: Python API for EPICS PV Access Siniša Veseli Scientific Software Engineering & Data Management Advanced Photon Source EPICS Meeting October 2015.
Today’s lecture Review chapter 5 go over exercises.
Arrays Chapter 7. MIS Object Oriented Systems Arrays UTD, SOM 2 Objectives Nature and purpose of an array Using arrays in Java programs Methods.
Announcements Assignment 2 Out Today Quiz today - so I need to shut up at 4:25 1.
Arrays – two dimensional Chapter 14 This chapter explains how to do the following with a two dimensional array: Declare, use indices, obtain size, pass.
Chapter 9 Introduction to Arrays Fundamentals of Java.
Arrays. What is an array? An array is a collection of data types. For example, what if I wanted to 10 different integers? int num1; int num2; int num3;
1 BROOKHAVEN SCIENCE ASSOCIATES EPICS Version 4 – Normative V4 Team – presented by Bob Dalesio EPICS Meeting October 7, 2011.
3-July-2002cse142-D2-Methods © 2002 University of Washington1 Methods CSE 142, Summer 2002 Computer Programming 1
Lecture 6:Interfaces and Abstract Classes Michael Hsu CSULA.
LESSON 8: INTRODUCTION TO ARRAYS. Lesson 8: Introduction To Arrays Objectives: Write programs that handle collections of similar items. Declare array.
Switch, Rounding Errors, Libraries
Classes A class is a blueprint of an object
SLAC USA Marty Kraimer and Matej Sekoranja
5. 3 Coding with Denotations
Chap 2. Identifiers, Keywords, and Types
Java Coding 6 David Davenport Computer Eng. Dept.,
Presentation transcript:

Client Data Types Gabriele Carcassi Oct

Scope and requirements  Define client side data structures to represent data for control systems and high level applications Indicates what goes on the wire, but it’s not what goes on the wire  Definition through Java interfaces  Compatibility between Epics 3 and 4  Defined as part of PVManager for convenience, but they do not have dependencies on PVManager nor PVManager depends on them

References and documentation  Project available at  JavaDocs (with actual documentation) at l l  Package org.epics.pvmanager.data

Design guidelines  All data types defined through interfaces  Two types of interfaces Full type (e.g. VDouble, VMultiInt, VStatistics): they represent types that are actually implemented and can be asked; they all look like VXxx (where V is value) Partial type (e.g. Scalar, Alarm, Time): they represent common parts of data across different full types; they are defined separately so that we have one definition and so that clients can code to that partial interface  Full types are made up as collections of partial types (mostly don’t define new methods)

VDouble  Let’s start with the most common one, VDouble Scalar Alarm Time Display  Let’s go through details of all interfaces

Scalar  Defines: T getValue()  Returns the value of some type.

Alarm  Defines: AlarmSeverity getAlarmSeverity(); Set getAlarmStatus(); List getPossibleAlarms();  AlarmSeverity: enumeration of NONE, MINOR, MAJOR, INVALID, UNDEFINED  It can return more than one status, each status a String plus an AlarmSeverity Note: client side. Protocol might send a byte, with Strings only at connection or hardcoded client/server.

Time  Defines: TimeStamp getTimeStamp(); Integer getTimeUserTag();  TimeStamp is a nanosecond accuracy instant Investigating use of JSR-310 Date and Time API javax.time.Instant (64 bit second + 32 bit nanosecond)  TimeUserTag can be used to identify fill patterns (improved from Epics 3)

Display  Defines: T getLower/UppterDisplayLimit(); T getLower/UppterCtrlLimit(); T getLower/UppterAlarmLimit(); T getLower/UppterWarningLimit(); String getUnits(); NumberFormat getFormat();

VDouble  VDouble is one type, and defines all those elements.  Does it mean that it provides all those elements? That every time I ask for a VDouble I get everything?  NO! You can still have partial implementations, that throw UnsupportedOperationException on the pieces that they do not implement. You can fill in with default data.  The point is to avoid 2^4 combinations

All scalar types  VDouble – Scalar, Alarm, Time, Display  VInt - Scalar, Alarm, Time, Display  VString - Scalar, Alarm, Time  VEnum - Scalar, Enum, Alarm, Time

Enumeration  Enum defines: List getLabels();  Venum defines: int getIndex();

Multi dimensional arrays  VDoubleArray - Array, Alarm, Time, Display  VIntArray - Array, Alarm, Time, Display  VStringArray - Array, Alarm, Time  VEnumArray - Array, Enum, Alarm, Time

Array  Defines: List getSizes();  The list of sizes for the multi dimensional array. One dimensional array can simply disregard this field. Difference between primitives and objects forces the array in the Full type. VDoubleArray: double[] getArray(); VIntArray: int[] getArray(); VEnumArray, VStringArray: String[] getArray();

Multi Channel arrays  Multiple values coming from different channels (e.g. all X BPM readbacks)  VMultiDouble: MultiScalar, Alarm, Time, Display  VMultiInt: MultiScalar, Alarm, Time, Display  VMultiString: MultiScalar, Alarm, Time  VMultiEnum: MultiScalar, Enum, Alarm, Time

MultiScalar  Defines: List getValues();

Statistics  VStatistics: Statistics, Alarm, Time, Display  Statistics define: Double getAverage(); Double getStdDev(); Double getMin(); Double getMax(); Integer getNSamples();  Does not define how it’s calculated (different weights)

VTable  Defines: int getColumnCount(); Class getColumnType(int column); String getColumnName(int column); Object getColumnArray(int column);  A table is a list of columns. A column is an array of elements of a particular type plus a name.

Status  Interface definition 90% done  PVManager tests and example re-implemented on these interfaces  Scalar types integrated in PVManager Generated by simulation and epics 3 data sources  MultiDouble used for synchronized array reconstruction