Package xal.service.pvlogger
Class ChannelSnapshot
java.lang.Object
xal.service.pvlogger.ChannelSnapshot
ChannelSnapshot is a representation of the data associated with a channel at
some point in time.
- Author:
- tap
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionChannelSnapshot
(String pv, double[] value, int status, int severity, Timestamp timestamp) Primary constructor of a snapshot.ChannelSnapshot
(String pv, ChannelTimeRecord channelRecord) Constructor of a snapshot from a channel record. -
Method Summary
Modifier and TypeMethodDescriptiongetPV()
Get the PVdouble
get the scalar value which corresponds to the first element of the value array if it exists or NaN otherwiseint
Get the severity of the PV at the time of the snapshot.int
Get the status of the PV at the time of the snapshot.Get the timestamp of the PV's data identifying the time the data was acquired.double[]
getValue()
Get the value of the PV's data at the time of the snapshotint
Get the number of elements in the value arraytoString()
Override toString() to describe the snapshot in a meaningful way.
-
Field Details
-
pv
raw process variable -
timestamp
time stamp reported for the channel monitor event -
value
protected final double[] valuevalue array -
status
protected final int statusstatus code -
severity
protected final int severityseverity code
-
-
Constructor Details
-
ChannelSnapshot
Primary constructor of a snapshot.- Parameters:
pv
- The PV identifying the channel.value
- The value of the channel's data at the time of the snapshot.status
- The status of the channel at the time of the snapshot.severity
- The severity of the channel at the time of the snapshot.timestamp
- The timestamp of the snapshot identifying when the data was acquired.
-
ChannelSnapshot
Constructor of a snapshot from a channel record.- Parameters:
pv
- The PV identifying the channel.channelRecord
- The record holding the channel data, state and timestamp
-
-
Method Details
-
getPV
Get the PV- Returns:
- the PV
-
getValue
public double[] getValue()Get the value of the PV's data at the time of the snapshot- Returns:
- the value of the PV's data
-
getScalarValue
public double getScalarValue()get the scalar value which corresponds to the first element of the value array if it exists or NaN otherwise -
getValueCount
public int getValueCount()Get the number of elements in the value array -
getStatus
public int getStatus()Get the status of the PV at the time of the snapshot.- Returns:
- the status of the PV
-
getSeverity
public int getSeverity()Get the severity of the PV at the time of the snapshot.- Returns:
- the severity of the PV
-
getTimestamp
Get the timestamp of the PV's data identifying the time the data was acquired.- Returns:
- the timestamp of the PV's data
-
toString
Override toString() to describe the snapshot in a meaningful way.
-