Skip to content

Commit 886c192

Browse files
committed
Merge the normativeTypes project into epicsCore
2 parents 3dac31f + 83afae4 commit 886c192

69 files changed

Lines changed: 19217 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

normativeTypesJava/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/target/
2+
documentation/html

normativeTypesJava/.travis.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
sudo: required
2+
language: java
3+
jdk: oraclejdk8
4+
5+
script:
6+
- mvn clean verify
7+
8+
after_failure:
9+
- find ./ -type d -name "surefire-reports" -print0 | xargs -0 -I {} find {} -iname "*.txt" -type f | xargs cat
10+
- find . -type f -name "*.log" -print0 -exec cat {} \;

normativeTypesJava/LICENSE.txt

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
Copyright and License Terms
2+
---------------------------
3+
4+
Copyright (c) 2006-2016 Martin R. Kraimer
5+
Copyright (c) 2006-2016 UChicago Argonne LLC, as Operator of Argonne
6+
National Laboratory.
7+
Copyright (c) 2006 Deutsches Elektronen-Synchrotron,
8+
Member of the Helmholtz Association, (DESY), HAMBURG, GERMANY.
9+
Copyright (c) 2007-2016 Control System Laboratory,
10+
(COSYLAB) Ljubljana Slovenia
11+
Copyright (c) 2010-2016 Brookhaven Science Associates, as Operator
12+
of Brookhaven National Laboratory
13+
Copyright (c) 2011-2016 Diamond Light Source Limited,
14+
(DLS) Didcot, United Kingdom
15+
16+
Permission is hereby granted, free of charge, to any person
17+
obtaining a copy of this software and associated documentation
18+
files (the "Software"), to deal in the Software without
19+
restriction, including without limitation the rights to use,
20+
copy, modify, merge, publish, distribute, sublicense, and/or sell
21+
copies of the Software, and to permit persons to whom the
22+
Software is furnished to do so, subject to the following
23+
conditions:
24+
25+
The above copyright notice and this permission notice shall be
26+
included in all copies or substantial portions of the Software.
27+
28+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
29+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
30+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
31+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
32+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
33+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
34+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
35+
OTHER DEALINGS IN THE SOFTWARE.
36+
37+
________________________________________________________________________
38+
39+
Additional Disclaimers
40+
----------------------
41+
42+
This software is copyright in part by these institutions:
43+
44+
* Brookhaven Science Associates, as Operator of Brookhaven
45+
National Laboratory, New York, USA
46+
* Control System Laboratory, Ljubljana, Slovenia
47+
* Deutsches Elektronen-Synchroton, Member of the Helmholtz
48+
Association, Hamburg, Germany
49+
* Diamond Light Source Limited, Didcot, United Kingdom
50+
* Helmholtz-Zentrum Berlin fuer Materialien und Energie m.b.H.,
51+
Berlin, Germany.
52+
* UChicage Argonne LLC, as Operator of Argonne National Laboratory,
53+
Illinois, USA
54+
55+
In no event shall these institutions be liable to any party for direct,
56+
indirect, special, incidental, or consequential damages arising out of
57+
the use of this software, its documentation, or any derivatives thereof,
58+
even if advised of the possibility of such damage.
59+
60+
These institutions specifically disclaim any warranties, including, but
61+
not limited to, the implied warranties of merchantability, fitness for a
62+
particular purpose, and non-infringement. This software is provided on
63+
an "as is" basis, and these institutions have no obligation to provide
64+
maintenance, support, updates, enhancements, or modifications.
65+

normativeTypesJava/README.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
normativeTypesJava [![Build Status](https://travis-ci.org/epics-base/normativeTypesJava.svg?branch=master)](https://travis-ci.org/epics-base/normativeTypesJava)
2+
==================
3+
4+
normativeTypesJava is a Java module containing helper classes which implement
5+
and provide support for the EPICS V4 Normative Types.
6+
7+
The latter are a set of standard high-level data types to aid interoperability
8+
of EPICS V4 applications and are specified in the
9+
[NormativeTypes Specification](http://epics-pvdata.sourceforge.net/alpha/normativeTypes/normativeTypes.html).
10+
11+
12+
Status
13+
------
14+
15+
The current version implements fully the
16+
[16 Mar 2015 version](http://epics-pvdata.sourceforge.net/alpha/normativeTypes/normativeTypes_20150316.html)
17+
of the Normative Types Specification.
18+
19+
The module status is alpha and the API and behaviour may change signifcantly
20+
in future versions.
21+
22+
The is no documentation (i.e. ntJava.html) yet.
23+
24+
Dependencies
25+
------------
26+
27+
normativeTypesJava depends on pvDataJava.
28+
29+
30+
Build
31+
-----
32+
33+
Building normativeTypesJava from the source module requires maven.
34+
35+
To build type
36+
37+
mvn compile install
38+
39+
To clean
40+
41+
mvn clean
42+
43+
Building the module will generate jars of the .class files, the source
44+
and the javadoc.
45+
46+
To unzip the a jar, for example the javadoc jar, type
47+
48+
java xf <name-of-jar>
49+
e.g.
50+
51+
java xf normativeTypesJava-0.2.0-SNAPSHOT-javadoc.jar
52+
53+
from the directory containing the jar.
54+
55+
56+
To Use
57+
------
58+
59+
To use normativeTypesJava in a Java application, add the location of the jar
60+
containing the .class files to your CLASSPATH
61+
62+
export CLASSPATH=$CLASSPATH:<path-to-nt-jar>
63+
64+
65+
You will also need to do the same for pvDataJava.
66+
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<h1>Release 0.1</h1>
2+
3+
<p>This is the first release of normativeTypesJava.</p>
4+
5+
<p>This release provides support through wrapper classes and builders for the
6+
following Normative Types:</p>
7+
8+
<ul>
9+
<li>NTScalar</li>
10+
<li>NTScalarArray</li>
11+
<li>NTEnum</li>
12+
<li>NTMatrix</li>
13+
<li>NTURI</li>
14+
<li>NTNameValue</li>
15+
<li>NTTable</li>
16+
<li>NTAttribute</li>
17+
<li>NTMultiChannel</li>
18+
<li>NTNDArray</li>
19+
<li>NTContinuum</li>
20+
<li>NTHistogram</li>
21+
<li>NTAggregate</li>
22+
<li>NTUnion</li>
23+
<li>NTScalarMultiChannel</li>
24+
</ul>
25+
26+
<p>Release 0.1 therefore implements fully the
27+
<a href="http://epics-pvdata.sourceforge.net/alpha/normativeTypes/normativeTypes_20150316.html">16 Mar 2015 version</a>
28+
of the normativeTypes specification.</p>
29+
30+
<p>Each type has a wrapper class of the same name which has functions for checking
31+
compatibility (isCompatible) and the reported types (is_a) of existing
32+
structures (either Structures or PVStructures) and of the validity of the data
33+
of wrapped PVStructures with respect to the specification (isValid), wraps
34+
existing PVStructures (wrap, wrapUnsafe) and provides a convenient interface to
35+
all required and optional fields.</p>
36+
37+
<p>Each type has a builder which can create a Structure, a PVStructure or a
38+
wrapper around a new PVStructure. In each case optional or extra fields can be
39+
added and options such as choice of scalar type can be made.</p>
40+
41+
<p>Additional features are:</p>
42+
43+
<ul>
44+
<li>Utility classes NTField and NTPVField for standard structure fields and
45+
NTUtils and NTID for type IDs.</li>
46+
<li>Unit tests for all the implemented types and other classes, providing
47+
extensive coverage for all the Normative Types (except NTNDArray).</li>
48+
</ul>
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
Release 0.1
2+
===========
3+
4+
This is the first release of normativeTypesJava.
5+
6+
This release provides support through wrapper classes and builders for the
7+
following Normative Types:
8+
9+
* NTScalar
10+
* NTScalarArray
11+
* NTEnum
12+
* NTMatrix
13+
* NTURI
14+
* NTNameValue
15+
* NTTable
16+
* NTAttribute
17+
* NTMultiChannel
18+
* NTNDArray
19+
* NTContinuum
20+
* NTHistogram
21+
* NTAggregate
22+
* NTUnion
23+
* NTScalarMultiChannel
24+
25+
Release 0.1 therefore implements fully the
26+
[16 Mar 2015 version](http://epics-pvdata.sourceforge.net/alpha/normativeTypes/normativeTypes_20150316.html)
27+
of the normativeTypes specification.
28+
29+
Each type has a wrapper class of the same name which has functions for checking
30+
compatibility (isCompatible) and the reported types (is_a) of existing
31+
structures (either Structures or PVStructures) and of the validity of the data
32+
of wrapped PVStructures with respect to the specification (isValid), wraps
33+
existing PVStructures (wrap, wrapUnsafe) and provides a convenient interface to
34+
all required and optional fields.
35+
36+
Each type has a builder which can create a Structure, a PVStructure or a
37+
wrapper around a new PVStructure. In each case optional or extra fields can be
38+
added and options such as choice of scalar type can be made.
39+
40+
Additional features are:
41+
42+
* Utility classes NTField and NTPVField for standard structure fields and
43+
NTUtils and NTID for type IDs.
44+
* Unit tests for all the implemented types and other classes, providing
45+
extensive coverage for all the Normative Types (except NTNDArray).
46+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
TODO
2+
====
3+
4+
Documentation
5+
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<?xml version="1.0" encoding="iso-8859-1"?>
2+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4+
<html xmlns="http://www.w3.org/1999/xhtml">
5+
<head>
6+
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
7+
<title>EPICS normativeTypesJava</title>
8+
<link rel="stylesheet" type="text/css"
9+
href="http://epics-pvdata.sourceforge.net/base.css" />
10+
<link rel="stylesheet" type="text/css"
11+
href="http://epics-pvdata.sourceforge.net/epicsv4.css" />
12+
<style type="text/css">
13+
/*<![CDATA[*/
14+
.about { margin-left: 3em; margin-right: 3em; font-size: .83em}
15+
table { margin-left: auto; margin-right: auto }
16+
.diagram { text-align: center; margin: 2.5em 0 }
17+
span.opt { color: grey }
18+
span.nterm { font-style:italic }
19+
span.term { font-family:courier }
20+
span.user { font-family:courier }
21+
span.user:before { content:"<" }
22+
span.user:after { content:">" }
23+
.nonnorm { font-style:italic }
24+
p.ed { color: #AA0000 }
25+
span.ed { color: #AA0000 }
26+
p.ed.priv { display: inline; }
27+
span.ed.priv { display: inline; }
28+
/*]]>*/</style>
29+
<!-- Script that generates the Table of Contents -->
30+
<script type="text/javascript"
31+
src="http://epics-pvdata.sourceforge.net/script/tocgen.js">
32+
</script>
33+
</head>
34+
<body>
35+
36+
<div class="head">
37+
<h1>EPICS normativeTypesJava</h1>
38+
39+
<h2 class="nocount">Release 0.2-DEV - 2016.03.18</h2>
40+
<dl>
41+
<dt>Editor:</dt>
42+
<dd> David Hickin, Diamond Light Source
43+
</dd>
44+
</dl>
45+
46+
<p class="copyright">This product is made available subject to acceptance of the <a
47+
href="http://epics-pvdata.sourceforge.net/LICENSE.html">EPICS open source
48+
license.</a></p>
49+
<hr />
50+
</div>
51+
<h2 class="nocount">Abstract</h2>
52+
53+
<p>EPICS Version 4 provides efficient
54+
storage, access, and communication, of memory resident structured data.
55+
The EPICS V4 Normative Types are a collection of structured data types
56+
that can be used by the application level of EPICS V4 network endpoints,
57+
to interoperably exchange scientific data.
58+
normativeTypesJava is the Java implementation.
59+
It is one part of the set of related products in the EPICS
60+
V4 control system programming environment:<br />
61+
<a href="http://epics-pvdata.sourceforge.net/relatedDocumentsV4.html">relatedDocumentsV4.html</a>
62+
</p>
63+
64+
65+
<h2 class="nocount">Status of this Document</h2>
66+
67+
<p>This is the 18-March-2016 version for the 0.2-development release of the
68+
Java implementation of normativeTypes.
69+
</p>
70+
71+
72+
<p>RELEASE_NOTES.md provides changes since the last release.
73+
TODO.md describes things to do before the next release.
74+
</p>
75+
76+
77+
78+
</div>
79+
</body>
80+
</html>

normativeTypesJava/pom.xml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<parent>
6+
<groupId>org.epics</groupId>
7+
<artifactId>epics-parent</artifactId>
8+
<version>7.0.0-SNAPSHOT</version>
9+
</parent>
10+
11+
<artifactId>epics-ntypes</artifactId>
12+
<version>0.3.0-SNAPSHOT</version>
13+
14+
<name>normativeTypesJava</name>
15+
<url>https://github.com/epics-base/normativeTypesJava</url>
16+
17+
<!-- Explicitly declare snapshot repository -->
18+
<repositories>
19+
<repository>
20+
<id>sonatype-nexus-snapshots</id>
21+
<name>OSS Snapshots</name>
22+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
23+
</repository>
24+
</repositories>
25+
26+
<dependencies>
27+
<dependency>
28+
<groupId>${project.groupId}</groupId>
29+
<artifactId>epics-pvdata</artifactId>
30+
</dependency>
31+
</dependencies>
32+
33+
</project>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
* Copyright information and license terms for this software can be
3+
* found in the file LICENSE that is included with the distribution
4+
*/
5+
package org.epics.nt;
6+
7+
import org.epics.pvdata.pv.PVStructure;
8+
import org.epics.pvdata.property.PVAlarm;
9+
10+
/**
11+
* Interface for pvData type wrappers with, possibly optional, alarm field.
12+
* <p>
13+
* The alarm field should be a PVStructure conformant to the alarm
14+
* type alarm_t described in the NormativeTypes specification, which may or
15+
* may not have field name "alarm".
16+
* @author dgh
17+
*/
18+
public interface HasAlarm
19+
{
20+
/**
21+
* Attaches a PVAlarm to an alarm field.
22+
* Will return false if there is no alarm field.
23+
*
24+
* @param pvAlarm the PVAlarm to be attached
25+
* @return true if the operation was successfull, otherwise false
26+
*/
27+
public boolean attachAlarm(PVAlarm pvAlarm);
28+
29+
/**
30+
* Returns the alarm field.
31+
*
32+
* @return the alarm field or null if there is no alarm field
33+
*/
34+
public PVStructure getAlarm();
35+
}

0 commit comments

Comments
 (0)