|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--gov.aps.epics.jca.Channel
The class representing a CA Channel.
A Channel is a link between a client (the application) and a CA process variable located on a CA server. All operations between the client and the process variable are handled by this object of this class.
// Access a process variable thru a Channel.
try {
// Create a default context.
Context theContext= Ca.createContext();
// Print some info about the context.
Ca.printInfo(theContext);
System.out.println();
// Create a Channel
Channel theChannel= theContext.createChannel("myProcessVariableName");
theContext.pendIO(1.0);
// Print some info about the channel.
Ca.printInfo(theChannel);
System.out.println();
// Use the Channel
theChannel.put(45.5);
theContext.pendIO(1.0);
DBR theDBR= theChannel.get();
theContext.pendIO(1.0);
// Print some info about the requested value.
Ca.printInfo(theDBR);
System.out.println();
// Clear the channel and destroy the context.
theChannel.clear();
theContext.destroy();
} catch(CaException cae) {
cae.printStackTrace();
}
Ca,
Context,
DBR| Field Summary |
| Constructor Summary | |
Channel()
|
|
| Method Summary | |
abstract void |
addAccessRightsListener(gov.aps.epics.jca.AccessRightsListener l)
Adds a AccessRightsListener which will be notified of the access rights's changes of this Channel. |
abstract void |
addConnectionListener(gov.aps.epics.jca.ConnectionListener l)
Adds a ConnectionListener which will be notified of the connection state's changes of this Channel. |
abstract gov.aps.epics.jca.Monitor |
addMonitorListener(int type,
int count,
gov.aps.epics.jca.MonitorListener l,
int mask)
Adds a monitor to this Channel with a specified type,count and mask. |
gov.aps.epics.jca.Monitor |
addMonitorListener(gov.aps.epics.jca.MonitorListener l,
int mask)
|
abstract void |
destroy()
Clear the ressources used by this channel. |
gov.aps.epics.jca.dbr.DBR |
get()
Reads getElementCount() of getFieldType() elements from this Channel. |
void |
get(gov.aps.epics.jca.GetListener l)
Reads getElementCount() of getFieldType() elements from this Channel with a GetListener to be notified when the operation has been completed. |
gov.aps.epics.jca.dbr.DBR |
get(int count)
Reads a specified number of getFieldType() elements from this Channel. |
void |
get(int count,
gov.aps.epics.jca.GetListener l)
Reads a specified number of getFieldType() elements from this Channel with a GetListener to be notified when the operation has been completed. |
abstract gov.aps.epics.jca.dbr.DBR |
get(int type,
int count)
Reads a specified number of elements of a specified type from this Channel. |
abstract void |
get(int type,
int count,
gov.aps.epics.jca.GetListener l)
Reads a specified number of elements of a specified type from this Channel with a GetListener to be notified when the operation has been completed. |
abstract gov.aps.epics.jca.AccessRightsListener[] |
getAccessRightsListeners()
Returns the AccessRightsListener registered with this Channel. |
abstract gov.aps.epics.jca.ConnectionListener[] |
getConnectionListeners()
Returns the ConnectionListener registered with this Channel. |
abstract gov.aps.epics.jca.Context |
getContext()
Returns the context which created this channel. |
abstract int |
getElementCount()
Returns the element count of this Channel. |
abstract int |
getFieldType()
Returns the field type of this Channel. |
java.lang.String |
getFieldTypeString()
Returns the String representing the field type of this channel. |
abstract java.lang.String |
getHostName()
Returns the Channel's hostname. |
abstract java.lang.String |
getName()
Returns the name of this Channel. |
abstract boolean |
getReadAccess()
Returns whether read operations are allowed on this Channel. |
abstract int |
getState()
Returns the connection state of this channel |
java.lang.String |
getStateString()
|
abstract boolean |
getWriteAccess()
Returns whether write operations are allowed on this Channel. |
void |
printInfo()
Prints details information about this Channel to the standard output stream. |
void |
printInfo(java.io.PrintStream out)
Prints details information about this Channel to the specified output stream. |
void |
put(byte value)
Writes a value to this Channel. |
abstract void |
put(byte[] value)
Writes an array to this Channel. |
abstract void |
put(byte[] value,
gov.aps.epics.jca.PutListener l)
Writes an array to this Channel with a PutListener to be notified when the operation has been completed. |
void |
put(byte value,
gov.aps.epics.jca.PutListener l)
Writes a value to this Channel with a PutListener to be notified when the operation has been completed. |
void |
put(double value)
Writes a value to this Channel. |
abstract void |
put(double[] value)
Writes an array to this Channel. |
abstract void |
put(double[] value,
gov.aps.epics.jca.PutListener l)
Writes an array to this Channel with a PutListener to be notified when the operation has been completed. |
void |
put(double value,
gov.aps.epics.jca.PutListener l)
Writes a value to this Channel with a PutListener to be notified when the operation has been completed. |
void |
put(float value)
Writes a value to this Channel. |
abstract void |
put(float[] value)
Writes an array to this Channel. |
abstract void |
put(float[] value,
gov.aps.epics.jca.PutListener l)
Writes an array to this Channel with a PutListener to be notified when the operation has been completed. |
void |
put(float value,
gov.aps.epics.jca.PutListener l)
Writes a value to this Channel with a PutListener to be notified when the operation has been completed. |
void |
put(int value)
Writes a value to this Channel. |
abstract void |
put(int[] value)
Writes an array to this Channel. |
abstract void |
put(int[] value,
gov.aps.epics.jca.PutListener l)
Writes an array to this Channel with a PutListener to be notified when the operation has been completed. |
void |
put(int value,
gov.aps.epics.jca.PutListener l)
Writes a value to this Channel with a PutListener to be notified when the operation has been completed. |
void |
put(short value)
Writes a value to this Channel. |
abstract void |
put(short[] value)
Writes an array to this Channel. |
abstract void |
put(short[] value,
gov.aps.epics.jca.PutListener l)
Writes an array to this Channel with a PutListener to be notified when the operation has been completed. |
void |
put(short value,
gov.aps.epics.jca.PutListener l)
Writes a value to this Channel with a PutListener to be notified when the operation has been completed. |
void |
put(java.lang.String value)
Writes a value to this Channel. |
abstract void |
put(java.lang.String[] value)
Writes an array to this Channel. |
abstract void |
put(java.lang.String[] value,
gov.aps.epics.jca.PutListener l)
Writes an array to this Channel with a PutListener to be notified when the operation has been completed. |
void |
put(java.lang.String value,
gov.aps.epics.jca.PutListener l)
Writes a value to this Channel with a PutListener to be notified when the operation has been completed. |
abstract void |
removeAccessRightsListener(gov.aps.epics.jca.AccessRightsListener l)
Removes a AccessRightsListener which will be notified of the access rights's changes of this Channel. |
abstract void |
removeConnectionListener(gov.aps.epics.jca.ConnectionListener l)
Removes a ConnectionListener . |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Channel()
| Method Detail |
public abstract gov.aps.epics.jca.Context getContext()
public abstract void destroy()
throws CaException
CaExceptionpublic abstract gov.aps.epics.jca.ConnectionListener[] getConnectionListeners()
public abstract void addConnectionListener(gov.aps.epics.jca.ConnectionListener l)
throws CaException
l - the ConnectionListener to be registered.
CaException
public abstract void removeConnectionListener(gov.aps.epics.jca.ConnectionListener l)
throws CaException
l - the ConnectionListener to be removed.
CaExceptionpublic abstract gov.aps.epics.jca.AccessRightsListener[] getAccessRightsListeners()
public abstract void addAccessRightsListener(gov.aps.epics.jca.AccessRightsListener l)
throws CaException
l - the ConnectionListener to be registered.
CaException
public abstract void removeAccessRightsListener(gov.aps.epics.jca.AccessRightsListener l)
throws CaException
l - the ConnectionListener to be removed.
CaExceptionpublic abstract java.lang.String getName()
public java.lang.String getFieldTypeString()
public abstract int getFieldType()
CaConstantspublic abstract int getElementCount()
public abstract int getState()
CaConstantspublic java.lang.String getStateString()
public abstract java.lang.String getHostName()
public abstract boolean getReadAccess()
public abstract boolean getWriteAccess()
public void put(byte value)
throws CaException
value - the value.
CaException
public void put(byte value,
gov.aps.epics.jca.PutListener l)
throws CaException
value - the value.
CaException
public void put(short value)
throws CaException
value - the value.
CaException
public void put(short value,
gov.aps.epics.jca.PutListener l)
throws CaException
value - the value.
CaException
public void put(int value)
throws CaException
value - the value.
CaException
public void put(int value,
gov.aps.epics.jca.PutListener l)
throws CaException
value - the value.
CaException
public void put(float value)
throws CaException
value - the value.
CaException
public void put(float value,
gov.aps.epics.jca.PutListener l)
throws CaException
value - the value.
CaException
public void put(double value)
throws CaException
value - the value.
CaException
public void put(double value,
gov.aps.epics.jca.PutListener l)
throws CaException
value - the value.
CaException
public void put(java.lang.String value)
throws CaException
value - the value.
CaException
public void put(java.lang.String value,
gov.aps.epics.jca.PutListener l)
throws CaException
value - the value.
CaException
public abstract void put(byte[] value)
throws CaException
value - the value.
CaException
public abstract void put(byte[] value,
gov.aps.epics.jca.PutListener l)
throws CaException
value - the value.
CaException
public abstract void put(short[] value)
throws CaException
value - the value.
CaException
public abstract void put(short[] value,
gov.aps.epics.jca.PutListener l)
throws CaException
value - the value.
CaException
public abstract void put(int[] value)
throws CaException
value - the value.
CaException
public abstract void put(int[] value,
gov.aps.epics.jca.PutListener l)
throws CaException
value - the value.
CaException
public abstract void put(float[] value)
throws CaException
value - the value.
CaException
public abstract void put(float[] value,
gov.aps.epics.jca.PutListener l)
throws CaException
value - the value.
CaException
public abstract void put(double[] value)
throws CaException
value - the value.
CaException
public abstract void put(double[] value,
gov.aps.epics.jca.PutListener l)
throws CaException
value - the value.
CaException
public abstract void put(java.lang.String[] value)
throws CaException
value - the value.
CaException
public abstract void put(java.lang.String[] value,
gov.aps.epics.jca.PutListener l)
throws CaException
value - the value.
CaException
public gov.aps.epics.jca.dbr.DBR get()
throws CaException
CaException
public void get(gov.aps.epics.jca.GetListener l)
throws CaException
l - the GetListener.
CaException
public gov.aps.epics.jca.dbr.DBR get(int count)
throws CaException
count - the number of element to read.
CaException
public void get(int count,
gov.aps.epics.jca.GetListener l)
throws CaException
count - the number of element to read.l - the GetListener.
CaException
public abstract gov.aps.epics.jca.dbr.DBR get(int type,
int count)
throws CaException
count - the number of element to read.
CaException
public abstract void get(int type,
int count,
gov.aps.epics.jca.GetListener l)
throws CaException
type - the element type.count - the number of element to read.l - the GetListener.
CaException
public abstract gov.aps.epics.jca.Monitor addMonitorListener(int type,
int count,
gov.aps.epics.jca.MonitorListener l,
int mask)
throws CaException
type - the monitor element type.count - the monitor element count.l - the MonitorListener to be notified.mask - the mask value indicating when the listener need to be notified.
CaException
public gov.aps.epics.jca.Monitor addMonitorListener(gov.aps.epics.jca.MonitorListener l,
int mask)
throws CaException
CaExceptionpublic void printInfo()
public void printInfo(java.io.PrintStream out)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||