new PV(name)
The Process Variable that is actually exposed to end user.
Parameters:
Name | Type | Description |
---|---|---|
name |
name of the PV. |
- Source:
Returns:
the pv object.
Members
-
id :number
-
Id of the PV.
Type:
- number
- Source:
-
name :string
-
Name of the PV.
Type:
- string
- Source:
Methods
-
addCallback(callback)
-
Add a callback to the PV that will be notified on PV's event.
Parameters:
Name Type Description callback
WebPDA~PV~PVCallback the callback function.
- Source:
-
close()
-
Close the pv to dispose all resources related to the pv.
- Source:
-
getAllBufferedValues()
-
Get all buffered values in an array. return {Array.<object>} an object array in which each object is a PV value.
- Source:
-
getValue()
-
Get value of the PV. return {object} the value which is a data structure depending on the PV.
- Source:
-
isBufferingAllValues() → {boolean}
-
If all values are buffered during the update period. If false, only the latest value is preserved.
- Source:
Returns:
true if values are buffered.
- Type
- boolean
-
isConnected() → {boolean}
-
If the pv is connected to the device.
- Source:
Returns:
true if the pv is connected.
- Type
- boolean
-
isPaused() → {boolean}
-
If the pv is paused
- Source:
Returns:
- Type
- boolean
-
isWriteAllowed() → {boolean}
-
If write operation is allowed on the pv
- Source:
Returns:
- Type
- boolean
-
removeCallback(callback)
-
Remove a callback.
Parameters:
Name Type Description callback
WebPDA~PV~PVCallback the callback function.
- Source:
-
setPaused(True)
-
Pause/resume notification on this PV.
Parameters:
Name Type Description True
boolean is setting to pause, false is setting to resume.
- Source:
-
setValue(value)
-
Set pv value.
Parameters:
Name Type Description value
object the value to be set. It must be a value type that the PV can accept, for example, a number for numeric PV.
- Source:
Type Definitions
-
PVCallback(event, pv, data)
-
A callback function that is notified on PV's event.
Parameters:
Name Type Description event
string the event on the PV. For a control system PV, it could be "conn" (connection state changed), "val" (value changed), "bufVal"(buffered values changed if PV is buffering values), "error", "writePermission" (write permission changed), "writeFinished".
pv
WebPDA~PV the PV itself.
data
object the data associated with this event, for example, an error message object for error event.
- Source: