com.ionetrics.lib.annotatorcomm.annotatorjr
Class TriggerTimestamp

java.lang.Object
  extended by com.ionetrics.lib.annotatorcomm.Timestamp
      extended by com.ionetrics.lib.annotatorcomm.MicrosecondTimestamp
          extended by com.ionetrics.lib.annotatorcomm.annotatorjr.TriggerTimestamp
All Implemented Interfaces:
java.lang.Comparable<Timestamp>

public class TriggerTimestamp
extends MicrosecondTimestamp

Timestamp containing the time at a trigger point. Triggers can be hardware generated or software generated.


Field Summary
 
Fields inherited from class com.ionetrics.lib.annotatorcomm.MicrosecondTimestamp
dayOfYear, microsecond, secondOfDay, year
 
Constructor Summary
TriggerTimestamp(int year, int dayOfYear, int secondOfDay, int microsecond)
          Construct a TriggerTimestamp.
 
Method Summary
static TriggerTimestamp makeTimestamp(byte[] timestamp, int offset)
           typedef struct { uint16_t year; uint16_t dayofyear; uint32_t secondofday; } realtimeclock_t; uint32_t microsecond;
 void offsetDays(int offset)
          Offset the timestamp by a given number of days.
 void offsetMicrosecond(int offset)
          Offset the timestamp by a given number of microseconds.
 void offsetSeconds(int offset)
          Offset the timestamp by a given number of seconds.
 void offsetYear(int offset)
          Offset the timestamp by a given number of years.
 
Methods inherited from class com.ionetrics.lib.annotatorcomm.MicrosecondTimestamp
getDayOfYear, getMicrosecond, getSecondOfDay, getYear
 
Methods inherited from class com.ionetrics.lib.annotatorcomm.Timestamp
compareTo, equals, getExtendedFormatTime, getFormattedTime, getHourOfDay, getMinuteOfHour, getSecondOfMinute, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TriggerTimestamp

public TriggerTimestamp(int year,
                        int dayOfYear,
                        int secondOfDay,
                        int microsecond)
Construct a TriggerTimestamp.

Parameters:
year - timestamp year
dayOfYear - timestamp day of year
secondOfDay - timestamp second of day
microsecond - timestamp microsecond
Method Detail

offsetYear

public void offsetYear(int offset)
Offset the timestamp by a given number of years. The offset can be positive or negative.

Parameters:
offset - years to offset

offsetDays

public void offsetDays(int offset)
Offset the timestamp by a given number of days. The offset can be positive or negative and can be greater than the number of days in a year. Rollover will be propagated through the timestamp as years.

Parameters:
offset - days to offset

offsetSeconds

public void offsetSeconds(int offset)
Offset the timestamp by a given number of seconds. The offset can be positive or negative and can be greater than the number of seconds in a day. Rollover will be propagated through the timestamp as days.

Parameters:
offset - seconds to offset

offsetMicrosecond

public void offsetMicrosecond(int offset)
Offset the timestamp by a given number of microseconds. The offset can be positive or negative and can be greater than the number of microseconds in a second. Rollover will be propagated through the timestamp as seconds.

Parameters:
offset - microseconds to offset

makeTimestamp

public static TriggerTimestamp makeTimestamp(byte[] timestamp,
                                             int offset)
 typedef struct
 {
   uint16_t year;
   uint16_t dayofyear;
   uint32_t secondofday;
 } realtimeclock_t;
 uint32_t microsecond;
 



Copyright © 2006 Ionetrics Corp. All Rights Reserved.