com.ionetrics.lib.annotatorcomm.annotatori
Class AnnotatorI

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

public class AnnotatorI
extends AnnotatorComm

AnnotatorI Communication, Command, and Control over RS232


Field Summary
 
Fields inherited from class com.ionetrics.lib.annotatorcomm.AnnotatorComm
ETX, MAX_NAME_LEN, STX
 
Constructor Summary
AnnotatorI(javax.comm.SerialPort serialPort)
          Construct an AnnotatorI from an already open RS232 port.
AnnotatorI(java.lang.String $ComPort)
          Construct an AnnotatorI from a named RS232 port.
 
Method Summary
 void close()
          Close the RS232 port and associated I/O stream.
 FirmwareVersion getFpgaFirmwareVersion()
          Get the FPGA firmware version.
 PreampGainLevel getPreampGainLevel(Channel channel)
          Get the preamp gain level.
 PreampGainMode getPreampGainMode(Channel channel)
          Get the preamp gain mode.
 TimestampTriggerMode getTimestampTriggerMode()
          Get the timestamp trigger mode.
static javax.comm.SerialPort openSerialPort(java.lang.String $ComPort)
          Open a RS232 port appropriate for a libAnnotatorRS232Comm connection with the library name as the owner.
static javax.comm.SerialPort openSerialPort(java.lang.String $ComPort, java.lang.String $PortOwnerName)
          Open a SerialPort appropriate for a libAnnotatorRS232Comm connection.
 void resetFpga()
          Reset the FPGA.
 void resetFts()
          Reset the FTS controller.
 void resetScanCount()
          Reset the scan counter to zero.
 void setPreampGainLevel(Channel channel, PreampGainLevel level)
          Set the preamp gain level.
 void setPreampGainMode(Channel channel, PreampGainMode mode)
          Set the preamp gain mode.
 void setTimestampTriggerMode(TimestampTriggerMode mode)
          Set the timestamp 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
 

Constructor Detail

AnnotatorI

public AnnotatorI(java.lang.String $ComPort)
           throws java.io.IOException
Construct an AnnotatorI from a named RS232 port.

Parameters:
$ComPort - RS232 port name
Throws:
java.io.IOException - failure to open port

AnnotatorI

public AnnotatorI(javax.comm.SerialPort serialPort)
           throws java.io.IOException
Construct an AnnotatorI from an already open RS232 port.

Parameters:
serialPort - RS232 port
Throws:
java.io.IOException - RS232 failure
Method Detail

close

public void close()
           throws java.io.IOException
Close the RS232 port and associated I/O stream.

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

getFpgaFirmwareVersion

public FirmwareVersion getFpgaFirmwareVersion()
                                       throws java.io.IOException
Get the FPGA firmware version.

Returns:
FPGA firmware version
Throws:
java.io.IOException - failure to get the FPGA firmware version

resetFpga

public void resetFpga()
               throws java.io.IOException
Reset the FPGA.

Throws:
java.io.IOException - failure to reset the FPGA

resetFts

public void resetFts()
              throws java.io.IOException
Reset the FTS controller.

Throws:
java.io.IOException - failure to reset the FTS controller

resetScanCount

public void resetScanCount()
                    throws java.io.IOException
Reset the scan counter to zero.

Throws:
java.io.IOException - failure to reset scan counter

getPreampGainMode

public PreampGainMode getPreampGainMode(Channel channel)
                                 throws java.io.IOException
Get the preamp gain mode.

Parameters:
channel - detector channel
Returns:
gain mode
Throws:
java.io.IOException - failure to get the gain mode
See Also:
PreampGainMode, getPreampGainLevel(Channel)

setPreampGainMode

public void setPreampGainMode(Channel channel,
                              PreampGainMode mode)
                       throws java.io.IOException
Set the preamp gain mode.

Parameters:
channel - detector channel
mode - gain mode
Throws:
java.io.IOException - failure to set the gain mode
See Also:
PreampGainMode, setPreampGainLevel(Channel, PreampGainLevel)

getPreampGainLevel

public PreampGainLevel getPreampGainLevel(Channel channel)
                                   throws java.io.IOException
Get the preamp gain level.

Parameters:
channel - detector channel
Returns:
gain level
Throws:
java.io.IOException - failure to get gain level
See Also:
PreampGainLevel, getPreampGainMode(Channel)

setPreampGainLevel

public void setPreampGainLevel(Channel channel,
                               PreampGainLevel level)
                        throws java.io.IOException
Set the preamp gain level. This is only effective when in manual gain mode.

Parameters:
channel - detector channel
level - gain level
Throws:
java.io.IOException - failure to set gain level
See Also:
PreampGainLevel, setPreampGainMode(Channel, PreampGainMode)

getTimestampTriggerMode

public TimestampTriggerMode getTimestampTriggerMode()
                                             throws java.io.IOException
Get the timestamp trigger mode.

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

setTimestampTriggerMode

public void setTimestampTriggerMode(TimestampTriggerMode mode)
                             throws java.io.IOException
Set the timestamp trigger mode.

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

openSerialPort

public static javax.comm.SerialPort openSerialPort(java.lang.String $ComPort)
                                            throws java.io.IOException
Open a RS232 port appropriate for a libAnnotatorRS232Comm connection with the library name as the owner.

Parameters:
$ComPort - RS232 port name
Returns:
RS232 port
Throws:
java.io.IOException - failure to open

openSerialPort

public static javax.comm.SerialPort openSerialPort(java.lang.String $ComPort,
                                                   java.lang.String $PortOwnerName)
                                            throws java.io.IOException
Open a SerialPort appropriate for a libAnnotatorRS232Comm connection.

Parameters:
$ComPort - RS232 port name
$PortOwnerName - RS232 port owner's name
Returns:
RS232 port
Throws:
java.io.IOException - failure to open


Copyright © 2006 Ionetrics Corp. All Rights Reserved.