You are here: Foswiki>Frontend Web>JAPC (01 Sep 2017, LudwigHechler)Edit Attach

Java API for Parameter Controll (JAPC)

General

The basic idea of JAPC is to provide a transparent API to access device parameters, read and set their values. It provides the same interface for parameters, independent from the actual platform on which the devices are run or which communication mechanism is used. The user only needs to provide the device and parameter names for the communication. JAPC then chooses the right protocol and wraps the calls to the device. The main advantage of the API is its transparency to the user, since it hides the underlying layer implementation.

JAPC core does not provide any protocol implementation by default. Each protocoll needs to be implemented in form of JAPC extenension (plug-ins). To use the excensions and therefore protocols they need to be provided in the classpath.

Currently there are 2 plugins used for JAPC at GSI:
  • RDA3: japc-ext-rda3
  • DevAcc: japc-ext-devacc

Using JAPC

Maven dependencies

JAPC core can be added to the project with the following maven dependency:
<dependency>
    <groupId>cern.japc</groupId>
    <artifactId>japc</artifactId>
    <version> ... </version>
</dependency></span>

Current (01.12.2016) version is: 4.6.3

The JAPC core dependency will also be linked with any existing plug-in. Therfore developers can simply add the desired JAPC extension direclty.

!DevAcc extension dependency:

<dependency>
   <groupId>de.gsi.cs.co.ap.japc</groupId>
   <artifactId>japc-ext-devacc</artifactId>
   <version>(1.0.19,)</version>
</dependency>

RDA3 extension dependency:

<dependency>
   <groupId>cern.japc</groupId>
   <artifactId>japc-ext-cmwrda3</artifactId>
   <version>4.4.0</version>
   <exclusions>
      <exclusion> <!-- declare the exclusion here -->
         <groupId>org.zeromq</groupId>
         <artifactId>zeromq</artifactId>
      </exclusion>
   </exclusions> 
</dependency>

This dependency excludes explicitly the zeromq package, since in this case the zeromq package is not generic one, but comes compiled (packaged) from CERN and contain CPU/OS specifc libraries. To use zeroMQ libraries at GSI one will be also need following dependencies, which are delivered by SV team at GSI:

<dependency>
   <groupId>org.zeromq</groupId>
   <artifactId>jzmq</artifactId>
   <version>3.1.0</version>
</dependency>
 
<dependency>
   <groupId>de.gsi.cs.co.sv.zmq</groupId>
   <artifactId>gsi-jzmq-native-sl7</artifactId>
   <version>3.1.0</version>
</dependency>

JeroMQ:

Instead of using the compiled system specific libraries of zeroMQ, there is also a possilibity to add the jeroMQ - native Java implementation of the zeroMQ protocoll. However this solution is not officially supported. Altough both solution are compatible with each other, the jeroMQ is based on the older version of the protocol implementation and it seems that is not actively supported anymore.

<dependency>
   <groupId>org.zeromq</groupId>
   <artifactId>jeromq</artifactId>
   <version>0.3.5</version>
</dependency>

VM arguments:

Following VM arguments needs to be provided in order to use JAPC with DevAcc and RDA3 plugins.
-Dmetafactory.service.name.resolvers=de.gsi.bel.ap.japc.ext.devacc.GSIServiceNameResolver 
-Dcmw.directory.client.serverList=cmwdev00a.acc.gsi.de:5021
-Dcmw.nameresolution=direct 
-Dsun.net.client.defaultConnectTimeout=30000 
-Dsun.net.client.defaultReadTimeout=30000
-Dde.gsi.gsi-eqmodparser.parseOnStartup=false
-Djapc.jmx.bootstrap.enabled=false
Topic revision: r7 - 01 Sep 2017, LudwigHechler
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback