Download Raw file

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
National Superconducting
Cyclotron Laboratory
SOFTWARE ARCHITECTURE DOCUMENT
Project Name
Project Code
Account
Department
Project Leader
Project Coordinator
Serialization of EPICS Datatype Standards
SEDS
Controls and Computing
Sheng Peng
Vasu Vuppala
Name
Prepared By
Reviewed By
Approved By
Aaron Barber
Signature
Date
6/27/14
Serialization of EPICS Datatype Standards
Revision History
Version
1.0
Date
6/27/14
Author
Barber
Description
Initial document
Page 2 of 14
Serialization of EPICS Datatype Standards
Table of Contents
1
INTRODUCTION ............................................................................................................................................. 5
1.1
PURPOSE .........................................................................................................................................................5
1.2
SCOPE.............................................................................................................................................................5
1.3
DEFINITIONS, ACRONYMS, AND ABBREVIATIONS .....................................................................................................5
1.4
REFERENCES .....................................................................................................................................................6
1.5
OVERVIEW .......................................................................................................................................................6
2
ARCHITECTURAL DESIGN ............................................................................................................................... 7
2.1
UML DIAGRAMS ..............................................................................................................................................7
2.1.1 Class Diagram ...........................................................................................................................................7
2.1.1.1
SEDS Data Structures ......................................................................................................................7
2.1.1.2
SEDS API: Summary .........................................................................................................................8
2.1.1.3
SEDS API: JSON and SEDS ................................................................................................................9
2.1.1.3.1 SedsWriter ................................................................................................................................9
2.1.1.3.2 SedsReader ...............................................................................................................................9
2.1.1.3.3 SedsSerializer ...........................................................................................................................9
2.1.1.3.4 SedsDeserializer .......................................................................................................................9
2.1.1.4
SEDS API: SEDS Conversions..........................................................................................................10
2.1.1.4.1 SedsConverter ........................................................................................................................11
2.1.1.4.2 AbstractMapper .....................................................................................................................11
2.1.1.4.3 JsonMapper ............................................................................................................................11
2.1.1.4.4 VTypeMapper .........................................................................................................................11
2.1.1.5
SEDS API: Processing Factory ........................................................................................................12
2.1.1.5.1 Seds ........................................................................................................................................12
2.1.1.6
SEDS API: Helper Utilities ..............................................................................................................13
2.1.1.6.1 CSVConverter .........................................................................................................................13
2.1.1.6.2 SimpleSedsFactory .................................................................................................................13
3
INTERFACES ................................................................................................................................................. 14
4
IMPLEMENTATION STRATEGY ..................................................................................................................... 14
Page 3 of 14
Serialization of EPICS Datatype Standards
List of Figures and Tables
Figure 1 Class Diagram of SEDS Data Structures........................................................................................... 7
Figure 2 Class Diagram of SEDS API .............................................................................................................. 8
Figure 3 Class Diagram of SEDS API (JSON interactions)............................................................................... 9
Figure 4 Class Diagram of SEDS API (SEDS conversions) ............................................................................. 10
Figure 5 Class Diagram of SEDS API (processing factory)............................................................................ 12
Figure 6 Class Diagram of SEDS API (helper utilities) .................................................................................. 13
Table 1 Definition, Acronyms, and Abbreviations ........................................................................................ 5
Page 4 of 14
Serialization of EPICS Datatype Standards
1 Introduction
National Superconducting Cyclotron Laboratory (NSCL) is a world leader in rare isotope research and
nuclear science education. NSCL scientists and researchers conduct advanced research in fundamental
nuclear science, nuclear astrophysics, and accelerator physics. To facilitate the research, NSCL operates
multiple particle accelerators. The control system at NSCL enables operators to control the various
devices in the lab: ion sources, cyclotrons, beam lines, experimental devices, and auxiliary equipment. It
is based on the Experimental Physics and Industrial Control Systems (EPICS) standard. EPICS is a
distributed soft real-time control system for large scientific experiments.
SEDS is a protocol for data processing. SEDS provides a set of software designs for high level composite
data types suitable for the application level data exchange between EPICS V4 network endpoints. SEDS
provides protocol documentation and datatype schemas. The intent is to serialize and deserialize the
datatypes as self-describing data for persistence. This project will provide users the ability to transmit
standardized data between programming languages and to store standardized data in a database.
The software requirements for the proposed system, named SEDS (Serialization of EPICS Datatype
Standards), are elaborated in [1].
1.1 Purpose
The purpose of this document is to describe the high-level design for SEDS protocol. It is intended for
the following audience:



Members of the Controls department that are overseeing the project (the Customer); they need
to make sure that the design fulfills the requirements
Members of the design team at Controls;
Members of the software development team at Controls; they need to make sure that the
design is accurate and feasible
1.2 Scope
1.3 Definitions, Acronyms, and Abbreviations
Table 1 Definition, Acronyms, and Abbreviations
Item
SEDS
Controls
EPICS
NSCL
FRIB
PV
Description
Serialization of EPICS Datatype Standards
FRIB’s Controls and Computing Department
Experimental Physics and Industrial Control System
National Superconducting Cyclotron Laboratory
Facility for Rare Isotope Beams
Process Variable. Identifier for a data item in EPICS.
Page 5 of 14
Serialization of EPICS Datatype Standards
1.4 References
1. SEDS Software Requirement Specifications, Controls Department, NSCL
1.5 Overview
The next section, Architecture, describes the high-level design for the system.
Page 6 of 14
Serialization of EPICS Datatype Standards
2 Architectural Design
The following is the design information for the Java implementation of the SEDS protocol.
2.1 UML Diagrams
2.1.1
Class Diagram
2.1.1.1 SEDS Data Structures
Figure 1 Class Diagram of SEDS Data Structures
Page 7 of 14
Serialization of EPICS Datatype Standards
2.1.1.2 SEDS API: Summary
Figure 2 Class Diagram of SEDS API
Page 8 of 14
Serialization of EPICS Datatype Standards
2.1.1.3 SEDS API: JSON and SEDS
Figure 3 Class Diagram of SEDS API (JSON interactions)
2.1.1.3.1 SedsWriter
A processing object to take a JsonObject (in memory) and export the data to a JSON output source. A
SedsWriter should be used with a SedsSerializer.
2.1.1.3.2 SedsReader
A processing object to take a JSON input source and import the data into a JsonObject (in memory). A
SedsReader should be used with a SedsDeserializer.
2.1.1.3.3 SedsSerializer
A processing object to take a SEDS data structure (in memory) and build the data into a JsonObject (in
memory). A SedsSerializer should be used with a SedsWriter.
2.1.1.3.4 SedsDeserializer
A processing object to take a JsonObject (in memory) and parse the data into a SEDS data structure (in
memory). A SedsDeserializer should be used with a SedsReader.
Page 9 of 14
Serialization of EPICS Datatype Standards
2.1.1.4 SEDS API: SEDS Conversions
Figure 4 Class Diagram of SEDS API (SEDS conversions)
Page 10 of 14
Serialization of EPICS Datatype Standards
2.1.1.4.1 SedsConverter
The processing object to provide conversions between SEDS, JsonObject, and a system of client data
types (that correspond to SEDS data structures).
2.1.1.4.2 AbstractMapper
The interface that specifies all conversion methods required to be able to map SEDS data structures into
a different system of data types.
2.1.1.4.3 JsonMapper
The implementation of AbstractMapper to perform mappings of SEDS data structures to and from
JsonObject structures.
2.1.1.4.4 VTypeMapper
The implementation of AbstractMapper to perform mappings of SEDS data structures to and from VType
structures.
Page 11 of 14
Serialization of EPICS Datatype Standards
2.1.1.5 SEDS API: Processing Factory
Figure 5 Class Diagram of SEDS API (processing factory)
2.1.1.5.1 Seds
The factory class to create all SEDS processing objects mentioned in this section. The processing objects
provide the capabilities to convert SEDS types (to and from JSON sources, EPIC VType data structures,
CSV sources, and JsonObject data structures).
Page 12 of 14
Serialization of EPICS Datatype Standards
2.1.1.6 SEDS API: Helper Utilities
Figure 6 Class Diagram of SEDS API (helper utilities)
2.1.1.6.1 CSVConverter
Processing object to convert a CSV file to and from a SEDS data structure. Currently, a SEDS table is the
only structure that supports CSV conversion.
2.1.1.6.2 SimpleSedsFactory
Factory to quickly create the value-based SEDS data structures without having to attach additional
standard metadata fields such as alarm or timestamp information.
Page 13 of 14
Serialization of EPICS Datatype Standards
3 Interfaces
4 Implementation Strategy
-
-
SEDS Protocol
o Document the basic data types (number, string, etc.) specifications of SEDS
o Document the basic SEDS data structures
o Document the self-describing data format used
Java Implementation of SEDS Protocol
o SEDS Data Structures
 Create objects that represent the SEDS data structures in memory
 Create functions to create SEDS data structures and access data from the
structure
o SEDS Mapper
 Create object that interfaces with client data structures to map to and from
SEDS data structures in memory (this implementation must be done on the
client-side)
o VType Mapper
 Implement a SEDS Mapper that maps EPICS VType data structures to and from
SEDS data structures in memory
o SEDS Validator
 Create object that validates a JSON structure based on the JSON schemas
provided by the SEDS protocol
o SEDS Serializer
 Create object that takes a SEDS data structure and maps the data to JSON object
defined by the SEDS protocol
o SEDS Deserializer
 Create object that takes a JSON object defined by the SEDS protocol and maps
the data to a SEDS data structure in memory
o Reader
 Create object that parses a JSON object from an input source
o Writer
 Create object that stores a JSON object into an output source
Page 14 of 14