gov.sns.tools.pvlogger
Class ChannelSnapshot

java.lang.Object
  |
  +--gov.sns.tools.pvlogger.ChannelSnapshot

public class ChannelSnapshot
extends java.lang.Object

ChannelSnapshot is a representation of the data associated with a channel at some point in time.


Field Summary
protected  java.lang.String _pv
           
protected  int _severity
           
protected  int _status
           
protected  Timestamp _timestamp
           
protected  double[] _value
           
 
Constructor Summary
ChannelSnapshot(java.lang.String pv, ChannelTimeRecord record)
          Constructor of a snaphsot from a channel record.
ChannelSnapshot(java.lang.String pv, double[] value, int status, int severity, Timestamp timestamp)
          Primary constructor of a snapshot.
 
Method Summary
 java.lang.String getPV()
          Get the PV
 int getSeverity()
          Get the severity of the PV at the time of the snapshot.
 int getStatus()
          Get the status of the PV at the time of the snapshot.
 Timestamp getTimestamp()
          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 snapshot
 java.lang.String toString()
          Override toString() to describe the snapshot in a meaningful way.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_pv

protected final java.lang.String _pv

_timestamp

protected final Timestamp _timestamp

_value

protected final double[] _value

_status

protected final int _status

_severity

protected final int _severity
Constructor Detail

ChannelSnapshot

public ChannelSnapshot(java.lang.String pv,
                       double[] value,
                       int status,
                       int severity,
                       Timestamp timestamp)
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

public ChannelSnapshot(java.lang.String pv,
                       ChannelTimeRecord record)
Constructor of a snaphsot from a channel record.

Parameters:
pv - The PV identifying the channel.
record - The record holding the channel data, state and timestamp
Method Detail

getPV

public java.lang.String 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

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

public Timestamp 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

public java.lang.String toString()
Override toString() to describe the snapshot in a meaningful way.

Overrides:
toString in class java.lang.Object
Returns:
a string describing the snapshot.