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
-
SCA.JSca()
- Constructor with no arguments sets group
name to "DefaultGroup"
-
SCA.JSca(String)
- Constructor creates and names a group.
-
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'.
-
finalize()
- Frees the group
-
getFloat(String)
- Get a floating point value of the selected PV
-
getInt(String)
- Get a integer value of the selected PV
-
getStatus()
- Get the status of the previous get
-
getString(String)
- Get a string value of the selected PV
-
main(String[])
- Test application to get or set PVs
Usage: java SCA.JSca pv_name [new value]
-
sendValues()
- Sends all the values that have been set
To change a PV value, the new value must first be set, then sent.
-
setFloat(String, float)
- Set a floating point value of the selected PV
-
setInt(String, int)
- Set an integer value for the selected PV
-
setString(String, String)
- Set a string value of the selected PV
JSca
public JSca()
- Constructor with no arguments sets group
name to "DefaultGroup"
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
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.
finalize
protected void finalize()
- Frees the group
- Overrides:
- finalize in class Object
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.
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.
getStatus
public long getStatus()
- Get the status of the previous get
- Returns:
- The status of the previous get or put
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.
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.
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
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
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
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