Package com.cosylab.epics.caj
Class CAJMonitor
- java.lang.Object
-
- gov.aps.jca.Monitor
-
- com.cosylab.epics.caj.CAJMonitor
-
- All Implemented Interfaces:
MonitorListener,EventListener
public class CAJMonitor extends Monitor implements MonitorListener
Implementation of CAJ JCAMonitor.- Version:
- $id$
- Author:
- Matej Sekoranja
-
-
Field Summary
Fields Modifier and Type Field Description protected CAJChannelchannelMonitored channel.protected booleanclearedCleared flag.protected CAJContextcontextContext.protected intcountNumber of elements (size of array) of monitored value type.protected EventAddRequesteventAddRequestEvent add request.protected ArrayListlistenersMonitor listeners.protected intmaskMonitor mask.protected intsubsidSubscription ID.protected DBRTypetypeMonitored value type.
-
Constructor Summary
Constructors Constructor Description CAJMonitor(CAJContext context, DBRType type, int count, CAJChannel channel, MonitorListener listener, int mask)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMonitorListener(MonitorListener l)voidclear()ChannelgetChannel()ContextgetContext()intgetCount()intgetMask()MonitorListenergetMonitorListener()MonitorListener[]getMonitorListeners()intgetSID()Get this monitor subscription ID.DBRTypegetType()booleanisCleared()Get cleared flag.voidmonitorChanged(MonitorEvent ev)voidremoveMonitorListener(MonitorListener l)-
Methods inherited from class gov.aps.jca.Monitor
isMonitoringAlarm, isMonitoringLog, isMonitoringProperty, isMonitoringValue
-
-
-
-
Field Detail
-
context
protected CAJContext context
Context.
-
type
protected DBRType type
Monitored value type.
-
count
protected int count
Number of elements (size of array) of monitored value type.
-
channel
protected CAJChannel channel
Monitored channel.
-
eventAddRequest
protected EventAddRequest eventAddRequest
Event add request.
-
mask
protected int mask
Monitor mask.
-
listeners
protected ArrayList listeners
Monitor listeners.
-
subsid
protected int subsid
Subscription ID.
-
cleared
protected volatile boolean cleared
Cleared flag.
-
-
Constructor Detail
-
CAJMonitor
public CAJMonitor(CAJContext context, DBRType type, int count, CAJChannel channel, MonitorListener listener, int mask) throws CAException
Constructor.- Parameters:
context- CAJContexttype- DBRTypecount- countchannel- CAJChannellistener- MonitorListenermask- mask- Throws:
CAException- JCA Exception
-
-
Method Detail
-
clear
public void clear() throws CAException- Specified by:
clearin classMonitor- Throws:
CAException- See Also:
Monitor.clear()
-
getContext
public Context getContext()
- Specified by:
getContextin classMonitor- See Also:
Monitor.getContext()
-
getChannel
public Channel getChannel()
- Specified by:
getChannelin classMonitor- See Also:
Monitor.getChannel()
-
getType
public DBRType getType()
- Specified by:
getTypein classMonitor- See Also:
Monitor.getType()
-
getCount
public int getCount()
- Specified by:
getCountin classMonitor- See Also:
Monitor.getCount()
-
getMask
public int getMask()
- Specified by:
getMaskin classMonitor- See Also:
Monitor.getMask()
-
getMonitorListener
public MonitorListener getMonitorListener()
- Specified by:
getMonitorListenerin classMonitor- See Also:
Monitor.getMonitorListener()
-
addMonitorListener
public void addMonitorListener(MonitorListener l)
- Specified by:
addMonitorListenerin classMonitor- See Also:
Monitor.addMonitorListener(gov.aps.jca.event.MonitorListener)
-
removeMonitorListener
public void removeMonitorListener(MonitorListener l)
- Specified by:
removeMonitorListenerin classMonitor- See Also:
Monitor.removeMonitorListener(gov.aps.jca.event.MonitorListener)
-
getMonitorListeners
public MonitorListener[] getMonitorListeners()
- Specified by:
getMonitorListenersin classMonitor- See Also:
Monitor.getMonitorListeners()
-
monitorChanged
public void monitorChanged(MonitorEvent ev)
- Specified by:
monitorChangedin interfaceMonitorListener- See Also:
MonitorListener.monitorChanged(gov.aps.jca.event.MonitorEvent)
-
getSID
public int getSID()
Get this monitor subscription ID.- Returns:
- monitor subscription ID
-
isCleared
public boolean isCleared()
Get cleared flag.- Returns:
- cleared flag.
-
-