com.ionetrics.lib.annotatorcomm.annotatorjr
Class AnnotatorJr

java.lang.Object
  extended by com.ionetrics.lib.annotatorcomm.AnnotatorComm
      extended by com.ionetrics.lib.annotatorcomm.annotatorjr.AnnotatorJr
All Implemented Interfaces:
java.io.Closeable

public class AnnotatorJr
extends AnnotatorComm

Annotator Jr Communication, Command, and Control over FTD2XX USB.


Field Summary
static int ANNOTATOR_JR_USB_PID
          Annotator Jr USB Product ID
static int IONETRICS_USB_VID
          Ionetrics USB Vendor ID
 
Fields inherited from class com.ionetrics.lib.annotatorcomm.AnnotatorComm
ETX, MAX_NAME_LEN, STX
 
Constructor Summary
AnnotatorJr(FTD2XXDeviceInfo deviceInfo)
          Construct an AnnotatorJr from FTD2XXDeviceInfo.
 
Method Summary
 void clearTimeTags()
          Clear all timestamps stored in the current storage destination.
 void close()
          Close the FTD2XX interface to the Annotator.
 int getRtcCalibration()
          Get the RTC calibration value.
 int getTimestampCount()
          Get the number of timestamps stored in the currently selected destination.
 TimestampDestination getTimeStampDestination()
          Get the timestamp storage destination.
 TriggerTimestamp[] getTimestamps(int first, int last)
          Get the requested timestamps from the current storage destination.
 TriggerMode getTriggerMode()
          Get the event trigger mode.
 void saveRtcCalibration()
          Save the RTC calibration value to flash.
static FTD2XXDeviceInfo[] scanForAnnotatorJrs()
          Scan FTD2XX devices for the Ionetrics VID and Annotator Jr PID.
 void setRtcCalibration(int cal)
          Set the RTC calibration value.
 void setRtcCalibrationMode(boolean isEnabled)
          Enter and exit RTC calibration mode.
 void setTimeStampDestination(TimestampDestination destination)
          Set the timestamp storage destination.
 void setTriggerMode(TriggerMode triggerMode)
          Set the event trigger mode.
protected  void signal(ResponseMessage rspmsg)
          Signal that a response message has been read and needs tending.
 
Methods inherited from class com.ionetrics.lib.annotatorcomm.AnnotatorComm
addTextMessageListener, addTimestampListener, getCurrentTime, getDeviceId, getDeviceName, getFirmwareTimestamp, getFirmwareVersion, getLibAnnotatorCommVersion, getSerialNumber, getSupportedTimeSources, getTextMessageListeners, getTimeSource, getTimeSourceLockStatus, getTimestampListeners, isTimeSourceTimestampMode, noop, removeTextMessageListener, removeTimestampListener, saveOptions, sendRecv, setCurrentTime, setDeviceName, setSerialNumber, setTimeSource, setTimeSourceTimestampMode, signalSynchronousResponse, signalTimestampListeners, sleep
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IONETRICS_USB_VID

public static final int IONETRICS_USB_VID
Ionetrics USB Vendor ID

See Also:
Constant Field Values

ANNOTATOR_JR_USB_PID

public static final int ANNOTATOR_JR_USB_PID
Annotator Jr USB Product ID

See Also:
Constant Field Values
Constructor Detail

AnnotatorJr

public AnnotatorJr(FTD2XXDeviceInfo deviceInfo)
            throws java.io.IOException
Construct an AnnotatorJr from FTD2XXDeviceInfo.

Parameters:
deviceInfo - device infomation
Throws:
java.io.IOException - thrown on failure to open
Method Detail

close

public void close()
           throws java.io.IOException
Close the FTD2XX interface to the Annotator.

Specified by:
close in interface java.io.Closeable
Overrides:
close in class AnnotatorComm
Throws:
java.io.IOException - failure to close

signal

protected void signal(ResponseMessage rspmsg)
Signal that a response message has been read and needs tending. This is called by ResponseReader. Override this method to provide device specific response message functionality.

Overrides:
signal in class AnnotatorComm
Parameters:
rspmsg - new response message

getTriggerMode

public TriggerMode getTriggerMode()
                           throws java.io.IOException
Get the event trigger mode.

Returns:
event trigger mode
Throws:
java.io.IOException - failure to get mode

setTriggerMode

public void setTriggerMode(TriggerMode triggerMode)
                    throws java.io.IOException
Set the event trigger mode.

Parameters:
triggerMode - event trigger mode
Throws:
java.io.IOException - failure to set mode

getTimeStampDestination

public TimestampDestination getTimeStampDestination()
                                             throws java.io.IOException
Get the timestamp storage destination.

Returns:
storage destination
Throws:
java.io.IOException - failure to get destination

setTimeStampDestination

public void setTimeStampDestination(TimestampDestination destination)
                             throws java.io.IOException
Set the timestamp storage destination. Selecting a new destination does not clear the previous destination's timestamps.

Parameters:
destination - storage destination
Throws:
java.io.IOException - failure to set destination

getTimestampCount

public int getTimestampCount()
                      throws java.io.IOException
Get the number of timestamps stored in the currently selected destination.

Returns:
number of timestamps
Throws:
java.io.IOException - failure to get number of timestamps

getTimestamps

public TriggerTimestamp[] getTimestamps(int first,
                                        int last)
                                 throws java.io.IOException
Get the requested timestamps from the current storage destination. There is a maximum number of transferable time tags at one time of ten.

Parameters:
first - index of the first timestamp to get
last - index of the last timestamp to get
Returns:
requested trigger timestamps
Throws:
java.io.IOException - failure to retrieve timestamps

clearTimeTags

public void clearTimeTags()
                   throws java.io.IOException
Clear all timestamps stored in the current storage destination.

Throws:
java.io.IOException - failure to clear timestamps

getRtcCalibration

public int getRtcCalibration()
                      throws java.io.IOException
Get the RTC calibration value. This value adjusts the oscillator driving the RTC.

Returns:
calibration value
Throws:
java.io.IOException - failure to get valibration value

setRtcCalibration

public void setRtcCalibration(int cal)
                       throws java.io.IOException
Set the RTC calibration value. This value adjusts the oscillator driving the RTC. This command is not affect by the Save Options command. See Save RTC Calibration command instead.

Parameters:
cal - calibration value
Throws:
java.io.IOException - failure to get calibration value

saveRtcCalibration

public void saveRtcCalibration()
                        throws java.io.IOException
Save the RTC calibration value to flash. This value will be reloaded on the Annotator Jr's next power up.

Throws:
java.io.IOException - failure to save calibration value

setRtcCalibrationMode

public void setRtcCalibrationMode(boolean isEnabled)
                           throws java.io.IOException
Enter and exit RTC calibration mode. This command is not affect by the Save Options command.

Parameters:
isEnabled - calibration enable flag
Throws:
java.io.IOException - failure to set mode

scanForAnnotatorJrs

public static FTD2XXDeviceInfo[] scanForAnnotatorJrs()
                                              throws java.io.IOException
Scan FTD2XX devices for the Ionetrics VID and Annotator Jr PID.

Returns:
Annotator Jrs
Throws:
java.io.IOException - thrown on scan failure


Copyright © 2006 Ionetrics Corp. All Rights Reserved.