jca
Class Ca

java.lang.Object
  |
  +--jca.Ca

public final class Ca
extends java.lang.Object

The Java Channel Access class.

See Also:
PV, Monitor

Field Summary
static int OP_ADD_EVENT
           
static int OP_CLEAR_EVENT
           
static int OP_CONN_DOWN
           
static int OP_CONN_UP
           
static int OP_GET
           
static int OP_OTHER
           
static int OP_PUT
           
static int OP_SEARCH
           
 
Constructor Summary
Ca()
           
 
Method Summary
static long eventProcessed()
           
static void exit()
          Frees all CA resources and exits the Channel Access thread
static void flushIO()
          Sends all buffered IO requests.
static void init()
          Initializes the Channel Access threads.
static void pendEvent(double period)
          Flushes the send buffer and waits for asynchronous event.
static void pendIO(double timeout)
          Flushes the send buffer and waits until outstanding queries complete.
static void queueEvent(CaEvent e, int status)
           
static int queueSize()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OP_GET

public static final int OP_GET

OP_PUT

public static final int OP_PUT

OP_SEARCH

public static final int OP_SEARCH

OP_ADD_EVENT

public static final int OP_ADD_EVENT

OP_CLEAR_EVENT

public static final int OP_CLEAR_EVENT

OP_OTHER

public static final int OP_OTHER

OP_CONN_UP

public static final int OP_CONN_UP

OP_CONN_DOWN

public static final int OP_CONN_DOWN
Constructor Detail

Ca

public Ca()
Method Detail

init

public static void init()
Initializes the Channel Access threads.

exit

public static void exit()
Frees all CA resources and exits the Channel Access thread

flushIO

public static void flushIO()
Sends all buffered IO requests. Usually performed by pendIO or pendEvent. However, some users may wish to flush remote operation requests early so that they can perform operations in parallel with outstanding remote operations.
See Also:
pendEvent(double), pendIO(double)

pendIO

public static void pendIO(double timeout)
                   throws TimeOutException
Flushes the send buffer and waits until outstanding queries complete. At this time queries include calls to PV(name) and PV.get(value).

Comments: Any values written into your program's variables by a CA synchronous request should not be referenced by your program until Ca.pendIO() has been called.

Parameters:
timeout - time in seconds to wait before the function times out. A timeout of zero means wait forever.
Throws:
TimeOutException - The timeout has expire and all outstanding queries were not completed.

pendEvent

public static void pendEvent(double period)
Flushes the send buffer and waits for asynchronous event. Asynchronous event include all call to PV(name,listener), PV.get(value,listener), PV.put(value,listener) and all monitors events. This routine will not return before the period expires and all unfinished channel access labor has been processed.

Comments: A very short timeout such as 0.0001 seconds will result in a poll (i.e. channel access will just check for file descriptor activity and then return).

Parameters:
period - time in seconds to wait before the function returns. A period of zero means wait forever.

queueEvent

public static void queueEvent(CaEvent e,
                              int status)

queueSize

public static int queueSize()

eventProcessed

public static long eventProcessed()