|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--gov.sns.ca.Channel
|
+--gov.sns.jca.JcaChannel
Objectizes the Java Channel Access (jca) library by Boucher. In particular, the jca.PV object and static jca.Ca are encapsulated. The the jca.PV and jca.Ca operations are collected and exposed as necessary to perform rudimentary process variable puts, gets, and monitors. The user may request a reference to the associated PV object to perform more complicated operations as appropriate.
| Field Summary | |
protected gov.aps.jca.Channel |
_jcaChannel
JCA Channel |
protected gov.aps.jca.Context |
_jcaContext
JCA Context |
static int |
BYTE
|
static double |
c_dblDefTimeEvent
|
static double |
c_dblDefTimeIO
|
static int |
DOUBLE
|
static int |
ENUM
|
static int |
FLOAT
|
protected boolean |
hasInitializedCa
indicates whether this channel ever initialized CA |
static int |
INT
|
protected static boolean |
s_bolCaInit
|
protected static boolean |
s_bolCaLock
|
protected static boolean |
s_bolDebug
|
protected static long |
s_lngCntRef
|
static int |
SHORT
|
static int |
STRING
|
| Fields inherited from class gov.sns.ca.Channel |
channelSystem, connectionFlag, connectionProxy, m_dblTmEvt, m_dblTmIO, m_strId, messageCenter |
| Method Summary | |
Monitor |
addMonitorValStatus(IEventSinkValStatus ifcSink,
int intMaskFire)
Setup a monitor on this channel |
Monitor |
addMonitorValTime(IEventSinkValTime ifcSink,
int intMaskFire)
Setup a monitor on this channel |
Monitor |
addMonitorValue(IEventSinkValue ifcSink,
int intMaskFire)
Setup a monitor on this channel |
static void |
caLock()
Channel access library lock. |
static void |
caUnlock()
Unlock the Channel Access library. |
boolean |
connect_async()
Open and secure channel across network, setup a connection monitor. |
boolean |
connect()
Open and secure channel across network |
void |
disconnect()
Terminate the network channel connection and clear all events associated with process variable |
int |
elementCount()
Return size of value array associated with process variable |
java.lang.Class |
elementType()
get the Java class associated with the native type of this channel |
protected void |
finalize()
Check if Channel Access library can be released |
protected gov.aps.jca.dbr.CTRL |
getCtrlInfo()
Returns a DBR_CTRL instance of the appropriate for this channel. |
double |
getEventTimeout()
Get the channel access Pend Event timeout |
double |
getIoTimeout()
Get the channel access Pend IO timeout |
ChannelStatusRecord |
getRawStatusRecord()
Return a ChannelStatusRecord representing the fetched record for the
native type of this channel. |
ChannelTimeRecord |
getRawTimeRecord()
Return a ChannelTimeRecord representing the fetched record for the
native type of this channel. |
void |
getRawValueCallback(IEventSinkValue listener)
Get value of process variable asynchronously with a "get monitor" object. |
ChannelRecord |
getRawValueRecord()
Return a ChannelRecord representing the fetched record for the
native type of this channel. |
protected int |
getStatusType()
Get the native value-status DBR type of this channel. |
protected int |
getTimeType()
Get the native DBR value-status-timestamp type of this channel. |
java.lang.String |
getUnits()
Convenience method which returns the units for this channel. |
java.lang.Object |
getValue()
5/6/2002 -tap This convenience method returns a data value object for a general data type. |
java.lang.String |
hostName()
Get the IOC host name which supports the process variable |
protected void |
initChannelAccess()
Initialize channel access and increment instance count |
int |
nativeType()
Return native type of process variable associated with channel |
void |
putRawValCallback(byte[] newVal,
PutListener listener)
Asynchronously put a raw value to the channel process variable. |
void |
putRawValCallback(byte newVal,
PutListener listener)
Asynchronously put a raw value to the channel process variable. |
void |
putRawValCallback(double[] newVal,
PutListener listener)
Asynchronously put a raw value to the channel process variable. |
void |
putRawValCallback(double newVal,
PutListener listener)
Asynchronously put a raw value to the channel process variable. |
void |
putRawValCallback(float[] newVal,
PutListener listener)
Asynchronously put a raw value to the channel process variable. |
void |
putRawValCallback(float newVal,
PutListener listener)
Asynchronously put a raw value to the channel process variable. |
void |
putRawValCallback(int[] newVal,
PutListener listener)
Asynchronously put a raw value to the channel process variable. |
void |
putRawValCallback(int newVal,
PutListener listener)
Asynchronously put a raw value to the channel process variable. |
void |
putRawValCallback(short[] newVal,
PutListener listener)
Asynchronously put a raw value to the channel process variable. |
void |
putRawValCallback(short newVal,
PutListener listener)
Asynchronously put a raw value to the channel process variable. |
void |
putRawValCallback(java.lang.String newVal,
PutListener listener)
Asynchronously put a raw value to the channel process variable. |
java.lang.Number |
rawLowerAlarmLimit()
Convenience method which returns the lower alarm limit. |
java.lang.Number |
rawLowerControlLimit()
Convenience method which returns the lower control limit. |
java.lang.Number |
rawLowerDisplayLimit()
Convenience method which returns the lower display limit. |
java.lang.Number |
rawLowerWarningLimit()
Convenience method which returns the lower warning limit. |
java.lang.Number |
rawUpperAlarmLimit()
Convenience method which returns the upper alarm limit. |
java.lang.Number |
rawUpperControlLimit()
Convenience method which returns the upper control limit. |
java.lang.Number |
rawUpperDisplayLimit()
Convenience method which returns the upper display limit. |
java.lang.Number |
rawUpperWarningLimit()
Convenience method which returns the upper warning limit. |
boolean |
readAccess()
Determine if channel has read access to process variable |
static void |
setDebugMode(boolean bDebug)
Set Forte debug mode. |
void |
setEventTimeout(double dblTm)
Set the channel access Pend Event timeout |
void |
setIoTimeout(double dblTm)
Set the channel access Pend IO timeout |
int |
state()
Get state of current process variable connection |
boolean |
writeAccess()
Determine if channel has write access to process variable |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static boolean s_bolCaInit
protected static boolean s_bolCaLock
protected static long s_lngCntRef
protected static boolean s_bolDebug
public static final double c_dblDefTimeIO
public static final double c_dblDefTimeEvent
public static final int STRING
public static final int SHORT
public static final int FLOAT
public static final int ENUM
public static final int BYTE
public static final int INT
public static final int DOUBLE
protected gov.aps.jca.Channel _jcaChannel
protected gov.aps.jca.Context _jcaContext
protected boolean hasInitializedCa
| Method Detail |
public static void caLock()
public static void caUnlock()
public static void setDebugMode(boolean bDebug)
bDebug - debug flag (on or off)
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic void setIoTimeout(double dblTm)
setIoTimeout in class ChanneldblTm - I/O timeoutpublic void setEventTimeout(double dblTm)
setEventTimeout in class ChanneldblTm - event timeoutpublic double getIoTimeout()
getIoTimeout in class Channelpublic double getEventTimeout()
getEventTimeout in class Channelprotected void initChannelAccess()
public boolean connect()
connect in class Channelpublic boolean connect_async()
connect_async in class Channelpublic void disconnect()
disconnect in class Channel
public int state()
throws ConnectionException
ConnectionException
public java.lang.Class elementType()
throws ConnectionException
elementType in class ChannelConnectionException
public int nativeType()
throws ConnectionException
ConnectionException
public int elementCount()
throws ConnectionException
elementCount in class ChannelConnectionException
public boolean readAccess()
throws ConnectionException
readAccess in class ChannelConnectionException - channel not connected
public boolean writeAccess()
throws ConnectionException
writeAccess in class ChannelConnectionException - channel not connected
public java.lang.String hostName()
throws ConnectionException
ConnectionException
protected int getStatusType()
throws ConnectionException,
GetException
ConnectionException
GetException
protected int getTimeType()
throws ConnectionException,
GetException
ConnectionException
GetException
public java.lang.String getUnits()
throws ConnectionException,
GetException
getUnits in class ChannelConnectionException
GetException
public java.lang.Number rawUpperDisplayLimit()
throws ConnectionException,
GetException
rawUpperDisplayLimit in class ChannelConnectionException
GetException
public java.lang.Number rawLowerDisplayLimit()
throws ConnectionException,
GetException
rawLowerDisplayLimit in class ChannelConnectionException
GetException
public java.lang.Number rawUpperAlarmLimit()
throws ConnectionException,
GetException
rawUpperAlarmLimit in class ChannelConnectionException
GetException
public java.lang.Number rawLowerAlarmLimit()
throws ConnectionException,
GetException
rawLowerAlarmLimit in class ChannelConnectionException
GetException
public java.lang.Number rawUpperWarningLimit()
throws ConnectionException,
GetException
rawUpperWarningLimit in class ChannelConnectionException
GetException
public java.lang.Number rawLowerWarningLimit()
throws ConnectionException,
GetException
rawLowerWarningLimit in class ChannelConnectionException
GetException
public java.lang.Number rawUpperControlLimit()
throws ConnectionException,
GetException
rawUpperControlLimit in class ChannelConnectionException
GetException
public java.lang.Number rawLowerControlLimit()
throws ConnectionException,
GetException
rawLowerControlLimit in class ChannelConnectionException
GetException
protected gov.aps.jca.dbr.CTRL getCtrlInfo()
throws ConnectionException,
GetException
String units = channel.getCtrlInfo().units();
double upperDisplayLimit = channel.getCtrlInfo().upperDispLimit().doubleValue();
ConnectionException
GetException
public java.lang.Object getValue()
throws ConnectionException,
GetException
ConnectionException
GetException
public ChannelRecord getRawValueRecord()
throws ConnectionException,
GetException
ChannelRecord representing the fetched record for the
native type of this channel. This is a convenient way to get the value of
the PV.
getRawValueRecord in class ChannelConnectionException
GetException
public ChannelStatusRecord getRawStatusRecord()
throws ConnectionException,
GetException
ChannelStatusRecord representing the fetched record for the
native type of this channel. This is a convenient way to get the value of
the PV along with status.
getRawStatusRecord in class ChannelConnectionException
GetException
public ChannelTimeRecord getRawTimeRecord()
throws ConnectionException,
GetException
ChannelTimeRecord representing the fetched record for the
native type of this channel. This is a convenient way to get the value of
the PV along with status and timestamp.
getRawTimeRecord in class ChannelConnectionException
GetException
public void getRawValueCallback(IEventSinkValue listener)
throws ConnectionException,
GetException
getRawValueCallback in class Channellistener - Listener of the callback event.
ConnectionException - channel is not connected
GetException - general channel access failure
public void putRawValCallback(java.lang.String newVal,
PutListener listener)
throws ConnectionException,
PutException
putRawValCallback in class ChannelnewVal - value sent to process variablelistener - The receiver of the callback event
ConnectionException - channel is not connected
PutException - general put failure
public void putRawValCallback(byte newVal,
PutListener listener)
throws ConnectionException,
PutException
putRawValCallback in class ChannelnewVal - value sent to process variablelistener - The receiver of the callback event
ConnectionException - channel is not connected
PutException - general put failure
public void putRawValCallback(short newVal,
PutListener listener)
throws ConnectionException,
PutException
putRawValCallback in class ChannelnewVal - value sent to process variablelistener - The receiver of the callback event
ConnectionException - channel is not connected
PutException - general put failure
public void putRawValCallback(int newVal,
PutListener listener)
throws ConnectionException,
PutException
putRawValCallback in class ChannelnewVal - value sent to process variablelistener - The receiver of the callback event
ConnectionException - channel is not connected
PutException - general put failure
public void putRawValCallback(float newVal,
PutListener listener)
throws ConnectionException,
PutException
putRawValCallback in class ChannelnewVal - value sent to process variablelistener - The receiver of the callback event
ConnectionException - channel is not connected
PutException - general put failure
public void putRawValCallback(double newVal,
PutListener listener)
throws ConnectionException,
PutException
putRawValCallback in class ChannelnewVal - value sent to process variablelistener - The receiver of the callback event
ConnectionException - channel is not connected
PutException - general put failure
public void putRawValCallback(byte[] newVal,
PutListener listener)
throws ConnectionException,
PutException
putRawValCallback in class ChannelnewVal - value sent to process variablelistener - The receiver of the callback event
ConnectionException - channel is not connected
PutException - general put failure
public void putRawValCallback(short[] newVal,
PutListener listener)
throws ConnectionException,
PutException
putRawValCallback in class ChannelnewVal - value sent to process variablelistener - The receiver of the callback event
ConnectionException - channel is not connected
PutException - general put failure
public void putRawValCallback(int[] newVal,
PutListener listener)
throws ConnectionException,
PutException
putRawValCallback in class ChannelnewVal - value sent to process variablelistener - The receiver of the callback event
ConnectionException - channel is not connected
PutException - general put failure
public void putRawValCallback(float[] newVal,
PutListener listener)
throws ConnectionException,
PutException
putRawValCallback in class ChannelnewVal - value sent to process variablelistener - The receiver of the callback event
ConnectionException - channel is not connected
PutException - general put failure
public void putRawValCallback(double[] newVal,
PutListener listener)
throws ConnectionException,
PutException
putRawValCallback in class ChannelnewVal - value sent to process variablelistener - The receiver of the callback event
ConnectionException - channel is not connected
PutException - general put failure
public Monitor addMonitorValTime(IEventSinkValTime ifcSink,
int intMaskFire)
throws ConnectionException,
MonitorException
addMonitorValTime in class ChannelifcSink - interface to data sinkintMaskFire - code specifying when the monitor is fired
or'ed combination of
{Monitor.VALUE, Monitor.LOG, Monitor.ALARM}
MonitorException - general monitor failure
ConnectionException - channel is not connected
public Monitor addMonitorValStatus(IEventSinkValStatus ifcSink,
int intMaskFire)
throws ConnectionException,
MonitorException
addMonitorValStatus in class ChannelifcSink - interface to data sinkintMaskFire - code specifying when the monitor is fired
or'ed combination of
{Monitor.VALUE, Monitor.LOG, Monitor.ALARM}
ConnectionException - channel is not connected
MonitorException - general monitor failure
public Monitor addMonitorValue(IEventSinkValue ifcSink,
int intMaskFire)
throws ConnectionException,
MonitorException
addMonitorValue in class ChannelifcSink - interface to data sinkintMaskFire - code specifying when the monitor is fired
or'ed combination of
{Monitor.VALUE, Monitor.LOG, Monitor.ALARM}
MonitorException - general monitor failure
ConnectionException - channel is not connected
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||