org.diirt.datasource.sample.jca.JCAClientExample Maven / Gradle / Ivy
/**
* Copyright (C) 2010-14 diirt developers. See COPYRIGHT.TXT
* All rights reserved. Use is subject to license terms. See LICENSE.TXT
*/
package org.diirt.datasource.sample.jca;
import gov.aps.jca.JCALibrary;
import org.diirt.vtype.VEnum;
import org.diirt.vtype.VString;
import org.diirt.vtype.VDouble;
import org.diirt.vtype.VInt;
import org.diirt.datasource.PVReader;
import org.diirt.datasource.PVManager;
import org.diirt.datasource.PVReaderListener;
import org.diirt.vtype.VByteArray;
import org.diirt.vtype.VDoubleArray;
import org.diirt.vtype.VFloatArray;
import org.diirt.vtype.VIntArray;
import org.diirt.vtype.VShortArray;
import org.diirt.vtype.VStringArray;
import static org.diirt.datasource.ExpressionLanguage.*;
import org.diirt.datasource.PVReaderEvent;
import static org.diirt.datasource.vtype.ExpressionLanguage.*;
import org.diirt.support.ca.JCADataSourceConfiguration;
import org.diirt.util.time.TimeDuration;
import static org.diirt.util.time.TimeDuration.*;
/**
*
* @author carcassi
*/
public class JCAClientExample {
private static final String doublePV = "counter1";
private static final String enumPV = doublePV + ".SCAN";
private static final String intPV = doublePV + ".RVAL";
private static final String stringPV = doublePV + ".EGU";
private static final String doubleArrayPV = "SR:C00-Glb:G00RB-X";
public static void main(String[] args) throws Exception {
System.out.println(Double.NEGATIVE_INFINITY);
System.out.println(System.getProperty("java.library.path"));
System.loadLibrary("jca");
PVManager.setDefaultDataSource(new JCADataSourceConfiguration()
.jcaContextClass(JCALibrary.JNI_THREAD_SAFE).create());
PVReader
© 2015 - 2025 Weber Informatics LLC | Privacy Policy