gov.sns.jca
Class DbrTimeAdaptor

java.lang.Object
  |
  +--gov.sns.jca.DbrValueAdaptor
        |
        +--gov.sns.jca.DbrStatusAdaptor
              |
              +--gov.sns.jca.DbrTimeAdaptor
All Implemented Interfaces:
StatusAdaptor, TimeAdaptor, ValueAdaptor

public class DbrTimeAdaptor
extends DbrStatusAdaptor
implements TimeAdaptor

Wrap a DBR TIME record for high level access


Field Summary
 
Fields inherited from class gov.sns.jca.DbrValueAdaptor
_dbr, valueSelector
 
Constructor Summary
DbrTimeAdaptor(gov.aps.jca.dbr.DBR dbr)
          Creates a new instance of TimeAdaptor
 
Method Summary
protected static java.math.BigDecimal convertToJavaTime(java.math.BigDecimal rawSeconds)
          Convert the raw time in seconds since January 1, 1990 to seconds since the Java epoch with nanosecond precision.
 java.math.BigDecimal getRawTimestamp()
          Time stamp in seconds since the Epics epoch of January 1, 1990 Epics only provides nanosecond accuracy, so we limit the timestamp to nine decimal places to the right of the the decimal point.
 java.math.BigDecimal getTimestamp()
          Time stamp in seconds since the Java epoch Epics only provides nanosecond accuracy, so we limit the timestamp to nine decimal places to the right of the the decimal point.
 
Methods inherited from class gov.sns.jca.DbrStatusAdaptor
severity, status
 
Methods inherited from class gov.sns.jca.DbrValueAdaptor
getStore
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.sns.ca.StatusAdaptor
severity, status
 
Methods inherited from interface gov.sns.ca.ValueAdaptor
getStore
 

Constructor Detail

DbrTimeAdaptor

public DbrTimeAdaptor(gov.aps.jca.dbr.DBR dbr)
Creates a new instance of TimeAdaptor

Method Detail

getTimestamp

public java.math.BigDecimal getTimestamp()
Time stamp in seconds since the Java epoch Epics only provides nanosecond accuracy, so we limit the timestamp to nine decimal places to the right of the the decimal point.

Specified by:
getTimestamp in interface TimeAdaptor

getRawTimestamp

public java.math.BigDecimal getRawTimestamp()
Time stamp in seconds since the Epics epoch of January 1, 1990 Epics only provides nanosecond accuracy, so we limit the timestamp to nine decimal places to the right of the the decimal point.


convertToJavaTime

protected static java.math.BigDecimal convertToJavaTime(java.math.BigDecimal rawSeconds)
Convert the raw time in seconds since January 1, 1990 to seconds since the Java epoch with nanosecond precision.

Parameters:
rawSeconds - The number of seconds since January 1, 1990.
Returns:
The time in seconds since the Java epoch.