Class SCA.JSca
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class SCA.JSca

Object
   |
   +----SCA.JSca

public class JSca
extends Object
Implements Simple Channel Access for accessing EPICS PVs

Version:
1.0
Author:
Chris Timossi Lawrence Berkeley National Laboratory

Constructor Index

 o SCA.JSca()
Constructor with no arguments sets group name to "DefaultGroup"
 o SCA.JSca(String)
Constructor creates and names a group.

Method Index

 o addItem(String)
Add a PV to the group Adding PVs to a group optimizes performance of the name look ups and allows batching of the 'gets'.
 o finalize()
Frees the group
 o getFloat(String)
Get a floating point value of the selected PV
 o getInt(String)
Get a integer value of the selected PV
 o getStatus()
Get the status of the previous get
 o getString(String)
Get a string value of the selected PV
 o main(String[])
Test application to get or set PVs Usage: java SCA.JSca pv_name [new value]
 o sendValues()
Sends all the values that have been set To change a PV value, the new value must first be set, then sent.
 o setFloat(String, float)
Set a floating point value of the selected PV
 o setInt(String, int)
Set an integer value for the selected PV
 o setString(String, String)
Set a string value of the selected PV

Constructors

 o JSca
public JSca()
Constructor with no arguments sets group name to "DefaultGroup"

 o JSca
public JSca(String group)
Constructor creates and names a group. PVs that are in the group will have their values refreshed at the same rate.

Parameters:
group - A user selected string to identify the group

Methods

 o addItem
public int addItem(String pvname) throws JScaException
Add a PV to the group Adding PVs to a group optimizes performance of the name look ups and allows batching of the 'gets'. Once all the items are added, the first 'get' triggers the name look up. So the first 'get' will be slowest.

Parameters:
pvname - The name of the process variable to add.
Returns:
The number of the item.
Throws: JScaException
Raised if get fails.
 o finalize
protected void finalize()
Frees the group

Overrides:
finalize in class Object
 o getFloat
public float getFloat(String pvname) throws JScaException
Get a floating point value of the selected PV

Parameters:
pvname - The name of the process variable.
Returns:
The floating point value of the PV.
Throws: JScaException
Raised if get fails.
 o getInt
public int getInt(String pvname) throws JScaException
Get a integer value of the selected PV

Parameters:
pvname - The name of the process variable.
Returns:
The integer point value of the PV.
Throws: JScaException
Raised if get fails.
 o getStatus
public long getStatus()
Get the status of the previous get

Returns:
The status of the previous get or put
 o getString
public java.lang.String getString(String pvname) throws JScaException
Get a string value of the selected PV

Parameters:
pvname - The name of the process variable.
Returns:
The string value of the PV.
Throws: JScaException
Raised if get fails.
 o main
public static void main(String[] argv)
Test application to get or set PVs Usage: java SCA.JSca pv_name [new value]

Parameters:
argv[0] - The name of the process variable to get/set.
argv[1] - If present, the PV is set to this value.
 o sendValues
public int sendValues() throws JScaException
Sends all the values that have been set To change a PV value, the new value must first be set, then sent. In this fashion, a number of new values maybe set before they are actually sent out.

See Also:
setString, setInt, setFloat
 o setFloat
public void setFloat(String pvname,
                     float value) throws JScaException
Set a floating point value of the selected PV

Parameters:
pvname - The name of the process variable.
value - The floating point value to set.
Throws: JScaException
Raised if the set fails.
See Also:
sendValues
 o setInt
public void setInt(String pvname,
                   int value) throws JScaException
Set an integer value for the selected PV

Parameters:
pvname - The name of the process variable.
value - The integer value to set.
See Also:
sendValues
 o setString
public void setString(String pvname,
                      String value) throws JScaException
Set a string value of the selected PV

Parameters:
pvname - The name of the process variable.
value - The string value to set.
See Also:
sendValues

All Packages  Class Hierarchy  This Package  Previous  Next  Index