jAER project on SourceForge

net.sf.jaer.hardwareinterface.usb.cypressfx2
Class CypressFX2

java.lang.Object
  extended by net.sf.jaer.hardwareinterface.usb.cypressfx2.CypressFX2
All Implemented Interfaces:
de.thesycon.usbio.PnPNotifyInterface, de.thesycon.usbio.UsbIoErrorCodes, AEMonitorInterface, HardwareInterface, ReaderBufferControl, USBInterface
Direct Known Subclasses:
CypressFX2Biasgen, CypressFX2MonitorSequencer

public class CypressFX2
extends java.lang.Object
implements de.thesycon.usbio.UsbIoErrorCodes, de.thesycon.usbio.PnPNotifyInterface, AEMonitorInterface, ReaderBufferControl

Devices that use the CypressFX2 and the USBIO driver, e.g. the DVS retinas, the USBAERmini2. This class should not normally be constructed but rather a subclass that overrides the AEReader should be used.

In this class, you can also set the size of the host buffer with setAEBufferSize(int), giving you more time between calls to process the events.

On the device, a timer sends all available events approximately every 10ms -- you don't need to wait for a fixed size buffer to be captured to be available to the host. But if events come quickly enough, new events can be available much faster than this.

You can also request at any time an early transfer of events with requestEarlyTransfer(). This will send a vendor request to the device to immediately transfer available events, but they won't be available to the host for a little while, depending on USBIOInterface and driver latency.

See the main() method for an example of use.

Fires PropertyChangeEvent on the following

Author:
tobi delbruck/raphael berner

Nested Class Summary
 class CypressFX2.AEPacketRawPool
          Object that holds pool of AEPacketRaw that handles data interchange between capture and other (rendering) threads.
 class CypressFX2.AEReader
          AE reader class.
protected  class CypressFX2.AsyncStatusThread
           
 
Field Summary
static int AE_BUFFER_SIZE
          default size of AE buffer for user processes.
protected  int aeBufferSize
          this is the size of the AEPacketRaw that are part of AEPacketRawPool that double buffer the translated events between rendering and capture threads
protected  CypressFX2.AEPacketRawPool aePacketRawPool
          The pool of raw AE packets, used for data transfer
protected  CypressFX2.AEReader aeReader
          the event reader - a buffer pool thread from USBIO subclassing
protected  boolean arrayResetEnabled
           
protected  CypressFX2.AsyncStatusThread asyncStatusThread
          the thread that reads device status messages on EP1
protected  de.thesycon.usbio.UsbIoBuf BufDesc
          a USBIO buffer used for calls
protected  AEChip chip
           
protected  de.thesycon.usbio.structs.USB_DEVICE_DESCRIPTOR deviceDescriptor
          the USBIO device descriptor
static short DID_STEREOBOARD
           
 int EEPROM_SIZE
          the size in bytes of the EEPROM atttached to the CypressFX2LP
protected  int eventCounter
          The count of events acquired but not yet passed to user via acquireAvailableEventsFromDriver
static java.lang.String FIRMWARE_FILENAME_COCHLEAAMS_BIX
           
static java.lang.String FIRMWARE_FILENAME_DVS128_IIC
           
static java.lang.String FIRMWARE_FILENAME_MAPPER_IIC
           
static java.lang.String FIRMWARE_FILENAME_MONITOR_SEQUENCER
          filename of FX2 binary executable, generated by uVision project and associated script that runs hex2bix
static java.lang.String FIRMWARE_FILENAME_MONITOR_SEQUENCER_HEX
          filename of FX2 binary executable, generated by uVision project and associated script that runs hex2bix
static java.lang.String FIRMWARE_FILENAME_MONITOR_SEQUENCER_IIC
          filename of FX2 binary executable, generated by uVision project and associated script that runs hex2bix
static java.lang.String FIRMWARE_FILENAME_MONITOR_SEQUENCER_JTAG_IIC
           
static java.lang.String FIRMWARE_FILENAME_STEREO_IIC
           
static java.lang.String FIRMWARE_FILENAME_TCVS320_BIX
           
static java.lang.String FIRMWARE_FILENAME_TCVS320_HEX
           
static java.lang.String FIRMWARE_FILENAME_TMPDIFF128_BIX
          filename of FX2 binary executable, generated by uVision project and associated script that runs hex2bix
static java.lang.String FIRMWARE_FILENAME_TMPDIFF128_HEX
          filename of FX2 binary executable, generated by uVision project and associated script that runs hex2bix
protected  int gDevList
          the devlist handle for USBIO
static java.lang.String GUID
          driver guid (Globally unique ID, for this USB driver instance
protected  de.thesycon.usbio.UsbIo gUsbIo
          the UsbIo interface to the device.
protected  boolean inEndpointEnabled
           
protected  int interfaceNumber
          the device number, out of all potential compatible devices that could be opened
protected  boolean isOpened
          device open status
protected  AEPacketRaw lastEventsAcquired
          the last events from acquireAvailableEventsFromDriver(), This packet is reused.
protected  java.util.logging.Logger log
           
 int MAX_CONTROL_XFER_SIZE
          size of control transfer data packets.
 java.beans.PropertyChangeEvent NEW_EVENTS_PROPERTY_CHANGE
          event supplied to listeners when new events are collected.
static long NO_AE_REOPEN_TIMEOUT
          timeout in ms to reopen driver (reloading firmware) if no events are received for this time.
protected  int numberOfStringDescriptors
          The number of string desriptors - all devices have at least two (Vendor and Product strings) but some may have in addition a third serial number string.
static short PID_BLANK
          A blank Cypress FX2 has VID/PID of 0x04b4/0x8613.
static short PID_COCHLEAAMS
          For CochleaAMS devices
static short PID_DVS128_REV0
           
static short PID_TCVS320_RETINA
           
static short PID_TMPDIFF128_RETINA
           
static short PID_USB2AERmapper
           
static short PID_USBAERmini2
           
static short PID_USBAERmini2_without_firmware
           
protected static java.util.prefs.Preferences prefs
          Used to store preferences, e.g.
protected  de.thesycon.usbio.structs.USB_STRING_DESCRIPTOR stringDescriptor1
          the first USB string descriptor (Vendor name) (if available)
protected  de.thesycon.usbio.structs.USB_STRING_DESCRIPTOR stringDescriptor2
          the second USB string descriptor (Product name) (if available)
protected  de.thesycon.usbio.structs.USB_STRING_DESCRIPTOR stringDescriptor3
          the third USB string descriptor (Serial number) (if available)
 short TICK_US
          Time in us of each timestamp count here on host, could be different on board.
 byte VENDOR_REQUEST_DO_ARRAY_RESET
           
static byte VENDOR_REQUEST_EARLY_TRANFER
           
static byte VENDOR_REQUEST_FIRMWARE
           
 byte VENDOR_REQUEST_FLASH_BIASES
           
 byte VENDOR_REQUEST_POWERDOWN
           
 byte VENDOR_REQUEST_RESET_TIMESTAMPS
           
static byte VENDOR_REQUEST_SEND_BIAS_BYTES
           
 byte VENDOR_REQUEST_SET_ARRAY_RESET
           
 byte VENDOR_REQUEST_SET_LED
           
static byte VENDOR_REQUEST_START_TRANSFER
           
static byte VENDOR_REQUEST_STOP_TRANSFER
           
static short VID
          All the devices here have vendor ID VID which has been allocated to jAER by Thesycon
static short VID_BLANK
          A blank Cypress FX2 has VID/PID of 0x04b4/0x8613.
static byte VR_DOWNLOAD_FIRMWARE
           
 byte VR_EEPROM
           
 byte VR_RAM
           
static byte VR_SET_DEVICE_NAME
           
 
Fields inherited from interface de.thesycon.usbio.UsbIoErrorCodes
USBIO_ERR_ADDITIONAL_EVENT_SIGNALLED, USBIO_ERR_ALREADY_BOUND, USBIO_ERR_ALREADY_CONFIGURED, USBIO_ERR_BABBLE_DETECTED, USBIO_ERR_BAD_START_FRAME, USBIO_ERR_BTSTUFF, USBIO_ERR_BUFFER_OVERRUN, USBIO_ERR_BUFFER_UNDERRUN, USBIO_ERR_BULK_RESTRICTION, USBIO_ERR_CANCELED, USBIO_ERR_CONTROL_NOT_SUPPORTED, USBIO_ERR_CONTROL_RESTRICTION, USBIO_ERR_CRC, USBIO_ERR_DATA_BUFFER_ERROR, USBIO_ERR_DATA_OVERRUN, USBIO_ERR_DATA_TOGGLE_MISMATCH, USBIO_ERR_DATA_UNDERRUN, USBIO_ERR_DEMO_EXPIRED, USBIO_ERR_DEV_NOT_RESPONDING, USBIO_ERR_DEVICE_GONE, USBIO_ERR_DEVICE_NOT_FOUND, USBIO_ERR_DEVICE_NOT_OPEN, USBIO_ERR_DEVICE_NOT_PRESENT, USBIO_ERR_ENDPOINT_HALTED, USBIO_ERR_EP0_RESTRICTION, USBIO_ERR_ERROR_BUSY, USBIO_ERR_ERROR_SHORT_TRANSFER, USBIO_ERR_FAILED, USBIO_ERR_FIFO, USBIO_ERR_FRAME_CONTROL_NOT_OWNED, USBIO_ERR_FRAME_CONTROL_OWNED, USBIO_ERR_INSUFFICIENT_RESOURCES, USBIO_ERR_INTERFACE_NOT_FOUND, USBIO_ERR_INTERNAL_HC_ERROR, USBIO_ERR_INTERRUPT_RESTRICTION, USBIO_ERR_INVALID_CONFIGURATION_DESCRIPTOR, USBIO_ERR_INVALID_DEVICE_STATE, USBIO_ERR_INVALID_DIRECTION, USBIO_ERR_INVALID_FUNCTION_PARAM, USBIO_ERR_INVALID_INBUFFER, USBIO_ERR_INVALID_IOCTL, USBIO_ERR_INVALID_ISO_PACKET, USBIO_ERR_INVALID_OUTBUFFER, USBIO_ERR_INVALID_PARAM, USBIO_ERR_INVALID_PARAMETER, USBIO_ERR_INVALID_PIPE_FLAGS, USBIO_ERR_INVALID_PIPE_HANDLE, USBIO_ERR_INVALID_POWER_STATE, USBIO_ERR_INVALID_RECIPIENT, USBIO_ERR_INVALID_TYPE, USBIO_ERR_INVALID_URB_FUNCTION, USBIO_ERR_ISO_NA_LATE_USBPORT, USBIO_ERR_ISO_NOT_ACCESSED_BY_HW, USBIO_ERR_ISO_NOT_ACCESSED_LATE, USBIO_ERR_ISO_RESTRICTION, USBIO_ERR_ISO_TD_ERROR, USBIO_ERR_ISOCH_REQUEST_FAILED, USBIO_ERR_LOAD_SETUP_API_FAILED, USBIO_ERR_NO_BANDWIDTH, USBIO_ERR_NO_MEMORY, USBIO_ERR_NO_SUCH_DEVICE_INSTANCE, USBIO_ERR_NOT_ACCESSED, USBIO_ERR_NOT_BOUND, USBIO_ERR_NOT_CONFIGURED, USBIO_ERR_NOT_SUPPORTED, USBIO_ERR_OPEN_PIPES, USBIO_ERR_OUT_OF_ADDRESS_SPACE, USBIO_ERR_OUT_OF_MEMORY, USBIO_ERR_PENDING_REQUESTS, USBIO_ERR_PID_CHECK_FAILURE, USBIO_ERR_PIPE_NOT_FOUND, USBIO_ERR_PIPE_RESTRICTION, USBIO_ERR_PIPE_SIZE_RESTRICTION, USBIO_ERR_POOL_EMPTY, USBIO_ERR_POWER_DOWN, USBIO_ERR_REQUEST_FAILED, USBIO_ERR_RESERVED1, USBIO_ERR_RESERVED2, USBIO_ERR_SET_CONFIG_FAILED, USBIO_ERR_SET_CONFIGURATION_FAILED, USBIO_ERR_STALL_PID, USBIO_ERR_STATUS_NOT_MAPPED, USBIO_ERR_SUCCESS, USBIO_ERR_TIMEOUT, USBIO_ERR_TOO_MUCH_ISO_PACKETS, USBIO_ERR_UNEXPECTED_PID, USBIO_ERR_USBD_BUFFER_TOO_SMALL, USBIO_ERR_USBD_INTERFACE_NOT_FOUND, USBIO_ERR_USBD_TIMEOUT, USBIO_ERR_VERSION_MISMATCH, USBIO_ERR_VID_RESTRICTION, USBIO_ERR_XACT_ERROR
 
Fields inherited from interface net.sf.jaer.hardwareinterface.usb.USBInterface
PID_THESYCON_END, PID_THESYCON_START, VID_THESYCON
 
Constructor Summary
protected CypressFX2(int devNumber)
          This constructor is protected because these instances should be constructed by the CypressFX2Factory.
 
Method Summary
 AEPacketRaw acquireAvailableEventsFromDriver()
          Gets available events from driver.
 void acquireDevice()
          acquire a device for exclusive use, other processes can't open the device anymore used for example for continuous sequencing in matlab
 void addAEListener(AEListener listener)
          adds a listener for new events captured from the device.
protected  void allocateAEBuffers()
          Allocates internal memory for transferring data from reader to consumer, e.g.
 void close()
          Closes the device.
 void cyclePort()
          Cycles the port using USBIO cyclePort.
protected  void download8051RAM(int address, byte[] FWBuffer)
          Downloads to RAM on FX2 using built-in vendor request to CPUCS.
 void downloadFirmwareBinary(java.lang.String firmwareFilename)
          downloads firmware to FX2 RAM.
 void downloadFirmwareHex(java.lang.String hexFileResourcePath)
          downloads firmware to the FX2 RAM from a hex file.
protected  void eraseEEPROM()
          erases the VID/PID/DID and device identifier strings
 int getAEBufferSize()
          Returns the size of the host buffer.
 CypressFX2.AEReader getAeReader()
           
 AEChip getChip()
          Sets the AEChip that this interface is acquiring events for
static java.lang.String getDefaultFirmwareBixFileForBlankDevice()
           
 short getDID()
           
 int getEstimatedEventRate()
          Returns estimate of present event rate on this interface
 AEPacketRaw getEvents()
          returns last events from acquireAvailableEventsFromDriver()
 int getFifoSize()
           
protected  java.lang.String getFirmwareFilenameBinaryFromVIDPID()
          Deprecated. not used anymore - user chooses firmware file via AEViewer/CypressFX2 menu item
protected  java.lang.String getFirmwareFilenameHexFromVIDPID()
           
 int getMaxCapacity()
          the max capacity of this USB2 bus interface is 24MB/sec/4 bytes/event
 int getNumberOfStringDescriptors()
          returns number of string descriptors
 int getNumBuffers()
           
 int getNumEventsAcquired()
          Returns the number of events acquired by the last call to acquireAvailableEventsFromDriver()
 short getPID()
           
 java.lang.String[] getStringDescriptors()
          return the string USB descriptors for the device
 java.beans.PropertyChangeSupport getSupport()
           
 int getTimestampTickUs()
           
 java.lang.String getTypeName()
          get text name of interface, e.g.
 short getVID()
           
 int[] getVIDPID()
          return the USB VID/PID of the interface
protected  boolean hasStringIdentifier()
          checks if device has a string identifier that is a non-empty string
 boolean isEventAcquisitionEnabled()
           
 boolean isInEndpointEnabled()
           
 boolean isOpen()
          reports if interface is open().
 byte[] loadBinaryFirmwareFile(java.lang.String firmwareFilename)
          Loads a binary firmware file into memory.
 byte[] loadBinaryFirmwareFileSystemFile(java.lang.String firmwareFilename)
          Loads a binary firmware file into memory from a file system path (as opposed to resource path).
 void onAdd()
           
 void onRemove()
           
 void open()
          Constructs a new USB connection and opens it.
protected  void openUsbIo_minimal()
          Opens the device just enough to read the device descriptor but does not start the reader or writer thread.
protected  void openUsbIo()
          This method does the hard work of opening the device, downloading the firmware, making sure everything is OK.
 boolean overrunOccurred()
          Is true if an overrun occured in the driver (> AE_BUFFER_SIZE events) during the period before the last time acquireAvailableEventsFromDriver() was called.
protected  byte[] readEEPROM(int addr, int length)
          Read the EEPROM contents.
 void releaseDevice()
          release the device from exclusive use
 void removeAEListener(AEListener listener)
          remove a PropertyChangeListener for new events
 void requestEarlyTransfer()
          sends vendor request to trigger an immediate commit of whatever is in the endpoint fifo immediately.
 void resetPixelArray()
          Reset the entire pixel array.
 void resetTimestamps()
          reset the timestamps to zero.
 void resetUSB()
          Resets the USB device using USBIO resetDevice
 void sendVendorRequest(byte request)
          sends a vender request without data, value and index are set to zero.
 void sendVendorRequest(byte request, short value, short index)
          sends a vender request without any data packet but with request, value and index.
 void sendVendorRequest(byte request, short value, short index, byte[] bytes)
          Sends a vendor request with a given byte[].
 void sendVendorRequest(byte request, short value, short index, de.thesycon.usbio.structs.USBIO_DATA_BUFFER dataBuffer)
          sends a vender request with data.
protected  void set8051Reset(boolean value)
          sends vendor request to CPUCS register to set 8051 in CPU reset (or not)
 void setAEBufferSize(int size)
          set the size of the raw event packet buffer.
 void setAeReader(CypressFX2.AEReader aeReader)
           
 void setAEReaderFifoSize(int size)
          sets the buffer size for the aereader thread.
 void setAEReaderNumBuffers(int num)
          sets the number of buffers for the aereader thread.
 void setChip(AEChip chip)
          Sets the AEChip that this interface is acquiring events for
static void setDefaultFirmwareBixFileForBlankDevice(java.lang.String aDefaultFirmwareBixFileForBlankDevice)
           
 void setEventAcquisitionEnabled(boolean enable)
          start or stops the event acquisition.
 void setFifoSize(int fifoSize)
           
 void setInEndpointEnabled(boolean inEndpointEnabled)
          sends a vendor request to enable or disable in transfers of AEs
 void setLed(boolean value)
          set the board LED state.
 void setNumBuffers(int numBuffers)
           
 void setSerialNumber(java.lang.String name)
          Writes the serial number string to the device EEPROM
 java.lang.String showFirmwareFilenameDialog()
          Shows a dialog to let user choose a firmware file for download to the device
 void startAEReader()
          starts reader buffer pool thread and enables in endpoints for AEs.
 void stopAEReader()
           
 java.lang.String toString()
          Returns string description of device including the USB vendor/project IDs.
protected  void unconfigureDevice()
          unconfigure device in case it was still configured from a prior terminated process
 void writeC2Load(java.lang.String firmwareFilename, short VID, short PID, short DID)
          writes the Cypress "C2" load to the EEPROM that makes the Cypress have full EEPROM firmware, including VID, PID, DID.
 void writeCPLDfirmware(java.lang.String svfFile)
          Writes the CPLD configuration from an SVF file.
 void writeEEPROM(int addr, byte[] bytes)
          This is a BLOCKING write call to write the Cypress EEPROM.
 void writeHexFileToEEPROM(java.lang.String hexFileResourcePath, short VID, short PID, short DID)
          writes the Cypress "C2" load to the EEPROM that makes the Cypress have EEPROM firmware, including VID, PID, DID.
 void writeVIDPIDDID(short VID, short PID, short DID)
          writes the Cypress "C0" load to the EEPROM that makes the Cypress FX2 have a Vender, Product, and Device ID on powerup.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

prefs

protected static java.util.prefs.Preferences prefs
Used to store preferences, e.g. the default firmware download file for blank devices


log

protected java.util.logging.Logger log

chip

protected AEChip chip

FIRMWARE_FILENAME_TMPDIFF128_BIX

public static final java.lang.String FIRMWARE_FILENAME_TMPDIFF128_BIX
filename of FX2 binary executable, generated by uVision project and associated script that runs hex2bix

See Also:
Constant Field Values

FIRMWARE_FILENAME_TMPDIFF128_HEX

public static final java.lang.String FIRMWARE_FILENAME_TMPDIFF128_HEX
filename of FX2 binary executable, generated by uVision project and associated script that runs hex2bix

See Also:
Constant Field Values

FIRMWARE_FILENAME_MONITOR_SEQUENCER

public static final java.lang.String FIRMWARE_FILENAME_MONITOR_SEQUENCER
filename of FX2 binary executable, generated by uVision project and associated script that runs hex2bix

See Also:
Constant Field Values

FIRMWARE_FILENAME_MONITOR_SEQUENCER_HEX

public static final java.lang.String FIRMWARE_FILENAME_MONITOR_SEQUENCER_HEX
filename of FX2 binary executable, generated by uVision project and associated script that runs hex2bix

See Also:
Constant Field Values

FIRMWARE_FILENAME_MONITOR_SEQUENCER_IIC

public static final java.lang.String FIRMWARE_FILENAME_MONITOR_SEQUENCER_IIC
filename of FX2 binary executable, generated by uVision project and associated script that runs hex2bix

See Also:
Constant Field Values

FIRMWARE_FILENAME_MONITOR_SEQUENCER_JTAG_IIC

public static final java.lang.String FIRMWARE_FILENAME_MONITOR_SEQUENCER_JTAG_IIC
See Also:
Constant Field Values

FIRMWARE_FILENAME_MAPPER_IIC

public static final java.lang.String FIRMWARE_FILENAME_MAPPER_IIC
See Also:
Constant Field Values

FIRMWARE_FILENAME_STEREO_IIC

public static final java.lang.String FIRMWARE_FILENAME_STEREO_IIC
See Also:
Constant Field Values

FIRMWARE_FILENAME_TCVS320_HEX

public static final java.lang.String FIRMWARE_FILENAME_TCVS320_HEX
See Also:
Constant Field Values

FIRMWARE_FILENAME_TCVS320_BIX

public static final java.lang.String FIRMWARE_FILENAME_TCVS320_BIX
See Also:
Constant Field Values

FIRMWARE_FILENAME_DVS128_IIC

public static final java.lang.String FIRMWARE_FILENAME_DVS128_IIC
See Also:
Constant Field Values

FIRMWARE_FILENAME_COCHLEAAMS_BIX

public static final java.lang.String FIRMWARE_FILENAME_COCHLEAAMS_BIX
See Also:
Constant Field Values

GUID

public static final java.lang.String GUID
driver guid (Globally unique ID, for this USB driver instance

See Also:
Constant Field Values

VID_BLANK

public static final short VID_BLANK
A blank Cypress FX2 has VID/PID of 0x04b4/0x8613. This VID/PID pair is used to indicate a blank device that needs programming.

See Also:
Constant Field Values

PID_BLANK

public static final short PID_BLANK
A blank Cypress FX2 has VID/PID of 0x04b4/0x8613. This VID/PID pair is used to indicate a blank device that needs programming.

See Also:
Constant Field Values

VID

public static final short VID
All the devices here have vendor ID VID which has been allocated to jAER by Thesycon

See Also:
Constant Field Values

PID_DVS128_REV0

public static final short PID_DVS128_REV0
See Also:
Constant Field Values

PID_COCHLEAAMS

public static final short PID_COCHLEAAMS
For CochleaAMS devices

See Also:
Constant Field Values

PID_TMPDIFF128_RETINA

public static final short PID_TMPDIFF128_RETINA
See Also:
Constant Field Values

PID_USBAERmini2

public static final short PID_USBAERmini2
See Also:
Constant Field Values

PID_USBAERmini2_without_firmware

public static final short PID_USBAERmini2_without_firmware
See Also:
Constant Field Values

PID_USB2AERmapper

public static final short PID_USB2AERmapper
See Also:
Constant Field Values

DID_STEREOBOARD

public static final short DID_STEREOBOARD
See Also:
Constant Field Values

PID_TCVS320_RETINA

public static final short PID_TCVS320_RETINA
See Also:
Constant Field Values

NEW_EVENTS_PROPERTY_CHANGE

public final java.beans.PropertyChangeEvent NEW_EVENTS_PROPERTY_CHANGE
event supplied to listeners when new events are collected. this is final because it is just a marker for the listeners that new events are available


VENDOR_REQUEST_START_TRANSFER

public static final byte VENDOR_REQUEST_START_TRANSFER
See Also:
Constant Field Values

VENDOR_REQUEST_STOP_TRANSFER

public static final byte VENDOR_REQUEST_STOP_TRANSFER
See Also:
Constant Field Values

VENDOR_REQUEST_EARLY_TRANFER

public static final byte VENDOR_REQUEST_EARLY_TRANFER
See Also:
Constant Field Values

VENDOR_REQUEST_SEND_BIAS_BYTES

public static final byte VENDOR_REQUEST_SEND_BIAS_BYTES
See Also:
Constant Field Values

VENDOR_REQUEST_POWERDOWN

public final byte VENDOR_REQUEST_POWERDOWN
See Also:
Constant Field Values

VENDOR_REQUEST_FLASH_BIASES

public final byte VENDOR_REQUEST_FLASH_BIASES
See Also:
Constant Field Values

VENDOR_REQUEST_RESET_TIMESTAMPS

public final byte VENDOR_REQUEST_RESET_TIMESTAMPS
See Also:
Constant Field Values

VENDOR_REQUEST_SET_ARRAY_RESET

public final byte VENDOR_REQUEST_SET_ARRAY_RESET
See Also:
Constant Field Values

VENDOR_REQUEST_DO_ARRAY_RESET

public final byte VENDOR_REQUEST_DO_ARRAY_RESET
See Also:
Constant Field Values

VENDOR_REQUEST_SET_LED

public final byte VENDOR_REQUEST_SET_LED
See Also:
Constant Field Values

VR_DOWNLOAD_FIRMWARE

public static final byte VR_DOWNLOAD_FIRMWARE
See Also:
Constant Field Values

VR_SET_DEVICE_NAME

public static final byte VR_SET_DEVICE_NAME
See Also:
Constant Field Values

VR_EEPROM

public final byte VR_EEPROM
See Also:
Constant Field Values

VR_RAM

public final byte VR_RAM
See Also:
Constant Field Values

VENDOR_REQUEST_FIRMWARE

public static final byte VENDOR_REQUEST_FIRMWARE
See Also:
Constant Field Values

NO_AE_REOPEN_TIMEOUT

public static long NO_AE_REOPEN_TIMEOUT
timeout in ms to reopen driver (reloading firmware) if no events are received for this time. This timeout will restart AE transmission if another process (e.g. Biasgen) reloads the firmware. This timer is checked on every attempt to acquire events.


TICK_US

public final short TICK_US
Time in us of each timestamp count here on host, could be different on board.

See Also:
Constant Field Values

AE_BUFFER_SIZE

public static final int AE_BUFFER_SIZE
default size of AE buffer for user processes. This is the buffer that is written by the hardware capture thread that holds events that have not yet been transferred via acquireAvailableEventsFromDriver() to another thread

See Also:
acquireAvailableEventsFromDriver(), CypressFX2.AEReader, setAEBufferSize(int), Constant Field Values

aeBufferSize

protected int aeBufferSize
this is the size of the AEPacketRaw that are part of AEPacketRawPool that double buffer the translated events between rendering and capture threads


aeReader

protected CypressFX2.AEReader aeReader
the event reader - a buffer pool thread from USBIO subclassing


asyncStatusThread

protected CypressFX2.AsyncStatusThread asyncStatusThread
the thread that reads device status messages on EP1


BufDesc

protected de.thesycon.usbio.UsbIoBuf BufDesc
a USBIO buffer used for calls


aePacketRawPool

protected CypressFX2.AEPacketRawPool aePacketRawPool
The pool of raw AE packets, used for data transfer


eventCounter

protected int eventCounter
The count of events acquired but not yet passed to user via acquireAvailableEventsFromDriver


lastEventsAcquired

protected AEPacketRaw lastEventsAcquired
the last events from acquireAvailableEventsFromDriver(), This packet is reused.


inEndpointEnabled

protected boolean inEndpointEnabled

isOpened

protected boolean isOpened
device open status


interfaceNumber

protected int interfaceNumber
the device number, out of all potential compatible devices that could be opened


EEPROM_SIZE

public int EEPROM_SIZE
the size in bytes of the EEPROM atttached to the CypressFX2LP


MAX_CONTROL_XFER_SIZE

public final int MAX_CONTROL_XFER_SIZE
size of control transfer data packets. Actually vendor request allows for larger data buffer, but windows limits largest xfer to 4096. Here we limit largest to size of buffer for control xfers.

See Also:
Constant Field Values

arrayResetEnabled

protected boolean arrayResetEnabled

stringDescriptor1

protected de.thesycon.usbio.structs.USB_STRING_DESCRIPTOR stringDescriptor1
the first USB string descriptor (Vendor name) (if available)


stringDescriptor2

protected de.thesycon.usbio.structs.USB_STRING_DESCRIPTOR stringDescriptor2
the second USB string descriptor (Product name) (if available)


stringDescriptor3

protected de.thesycon.usbio.structs.USB_STRING_DESCRIPTOR stringDescriptor3
the third USB string descriptor (Serial number) (if available)


numberOfStringDescriptors

protected int numberOfStringDescriptors
The number of string desriptors - all devices have at least two (Vendor and Product strings) but some may have in addition a third serial number string. Default value is 2. Initialized to zero until device descriptors have been obtained.


deviceDescriptor

protected de.thesycon.usbio.structs.USB_DEVICE_DESCRIPTOR deviceDescriptor
the USBIO device descriptor


gUsbIo

protected de.thesycon.usbio.UsbIo gUsbIo
the UsbIo interface to the device. This is assigned on construction by the factory which uses it to open the device. here is used for all USBIO access to the device


gDevList

protected int gDevList
the devlist handle for USBIO

Constructor Detail

CypressFX2

protected CypressFX2(int devNumber)
This constructor is protected because these instances should be constructed by the CypressFX2Factory. Creates a new instance of USBAEMonitor. Note that it is possible to construct several instances and use each of them to open and read from the same device.

Parameters:
devNumber - the desired device number, in range returned by CypressFX2Factory.getNumInterfacesAvailable
Method Detail

getDefaultFirmwareBixFileForBlankDevice

public static java.lang.String getDefaultFirmwareBixFileForBlankDevice()

setDefaultFirmwareBixFileForBlankDevice

public static void setDefaultFirmwareBixFileForBlankDevice(java.lang.String aDefaultFirmwareBixFileForBlankDevice)

acquireDevice

public void acquireDevice()
                   throws HardwareInterfaceException
acquire a device for exclusive use, other processes can't open the device anymore used for example for continuous sequencing in matlab

Throws:
HardwareInterfaceException

releaseDevice

public void releaseDevice()
                   throws HardwareInterfaceException
release the device from exclusive use

Throws:
HardwareInterfaceException

getSupport

public java.beans.PropertyChangeSupport getSupport()

toString

public java.lang.String toString()
Returns string description of device including the USB vendor/project IDs. If the device has not been opened then it is minimally opened to populate the deviceDescriptor and then closed.

Overrides:
toString in class java.lang.Object
Returns:
the string description of the device.

setSerialNumber

public void setSerialNumber(java.lang.String name)
                     throws HardwareInterfaceException
Writes the serial number string to the device EEPROM

Parameters:
name - the string. This string has very limited length, e.g. 4 bytes.
Throws:
HardwareInterfaceException

writeEEPROM

public void writeEEPROM(int addr,
                        byte[] bytes)
                 throws HardwareInterfaceException
This is a BLOCKING write call to write the Cypress EEPROM. Max number of bytes is defined by EEPROM_SIZE. Thread-safe.

Parameters:
addr - the starting address
bytes - the bytes to write
Throws:
HardwareInterfaceException

eraseEEPROM

protected void eraseEEPROM()
                    throws HardwareInterfaceException
erases the VID/PID/DID and device identifier strings

Throws:
HardwareInterfaceException

readEEPROM

protected byte[] readEEPROM(int addr,
                            int length)
                     throws HardwareInterfaceException
Read the EEPROM contents.

Parameters:
addr - the starting address
length - the number of bytes to read
Throws:
HardwareInterfaceException

writeVIDPIDDID

public void writeVIDPIDDID(short VID,
                           short PID,
                           short DID)
                    throws HardwareInterfaceException
writes the Cypress "C0" load to the EEPROM that makes the Cypress FX2 have a Vender, Product, and Device ID on powerup.

Parameters:
VID - vendor ID
PID - product ID
DID - the 'device' ID, can be used to individualize devices. This is not the same as the serial number, which by convention is the third string ID.
Throws:
HardwareInterfaceException

writeC2Load

public void writeC2Load(java.lang.String firmwareFilename,
                        short VID,
                        short PID,
                        short DID)
                 throws HardwareInterfaceException
writes the Cypress "C2" load to the EEPROM that makes the Cypress have full EEPROM firmware, including VID, PID, DID. On reset the Cypress will load its RAM from the EEPROM.

Parameters:
firmwareFilename - a File containing the binary format .iic file firmware as output from hex2bix. This is a flat firmware format that starts at address 0. It does not include the VID/PID written for the C2 load.
VID - vendor ID
PID - product ID
DID - the 'device' ID, can be used to individualize devices
Throws:
HardwareInterfaceException

writeHexFileToEEPROM

public void writeHexFileToEEPROM(java.lang.String hexFileResourcePath,
                                 short VID,
                                 short PID,
                                 short DID)
                          throws HardwareInterfaceException
writes the Cypress "C2" load to the EEPROM that makes the Cypress have EEPROM firmware, including VID, PID, DID.

Parameters:
VID -
PID -
DID - the 'device' ID, can be used to individualize devices
hexFileResourcePath - a full path pointing to a resource containing the firmware as output from compiler in Intel hex format. This resource is a file that is somewhere in the classpath, i.e. it is a file that is included in the project jar. For example: "/net/sf/jaer/hardwareinterface/usb/cypressfx2/USBAER_FX2LP_Retina.hex"
Throws:
HardwareInterfaceException
See Also:
FIRMWARE_FILENAME_TMPDIFF128_HEX, FIRMWARE_FILENAME_MONITOR_SEQUENCER_HEX

downloadFirmwareHex

public void downloadFirmwareHex(java.lang.String hexFileResourcePath)
                         throws HardwareInterfaceException
downloads firmware to the FX2 RAM from a hex file.

Parameters:
hexFileResourcePath - a full path pointing to a resource containing the firmware as output from compiler in Intel hex format. This resource is a file that is somewhere in the classpath, i.e. it is a file that is included in the project jar. For example: "/net/sf/jaer/hardwareinterface/usb/cypressfx2/USBAER_FX2LP_Retina.hex"
Throws:
HardwareInterfaceException
See Also:
FIRMWARE_FILENAME_TMPDIFF128_HEX, FIRMWARE_FILENAME_MONITOR_SEQUENCER_HEX

addAEListener

public void addAEListener(AEListener listener)
adds a listener for new events captured from the device. Actually gets called whenever someone looks for new events and there are some using acquireAvailableEventsFromDriver, not when data is actually captured by AEReader. Thus it will be limited to the users sampling rate, e.g. the game loop rendering rate.

Specified by:
addAEListener in interface AEMonitorInterface
Parameters:
listener - the listener. It is called with a PropertyChangeEvent when new events are received by a call to acquireAvailableEventsFromDriver(). These events may be accessed by calling getEvents().

removeAEListener

public void removeAEListener(AEListener listener)
Description copied from interface: AEMonitorInterface
remove a PropertyChangeListener for new events

Specified by:
removeAEListener in interface AEMonitorInterface
Parameters:
listener - to remove

startAEReader

public void startAEReader()
                   throws HardwareInterfaceException
starts reader buffer pool thread and enables in endpoints for AEs. Subclasses *MUST* override this method to start their own customized reader with their own translateEvents method.

Throws:
HardwareInterfaceException

acquireAvailableEventsFromDriver

public AEPacketRaw acquireAvailableEventsFromDriver()
                                             throws HardwareInterfaceException
Gets available events from driver. HardwareInterfaceException is thrown if there is an error. overrunOccurred() will be reset after this call.

This method also starts event acquisition if it is not running already. Not thread safe but does use the thread-safe swap() method of AEPacketRawPool to swap data with the acquisition thread.

Specified by:
acquireAvailableEventsFromDriver in interface AEMonitorInterface
Returns:
number of events acquired. If this is zero there is no point in getting the events, because there are none.
Throws:
HardwareInterfaceException
See Also:
.

getMaxCapacity

public int getMaxCapacity()
the max capacity of this USB2 bus interface is 24MB/sec/4 bytes/event

Specified by:
getMaxCapacity in interface AEMonitorInterface
Returns:
max capacity in events/sec

getEstimatedEventRate

public int getEstimatedEventRate()
Description copied from interface: AEMonitorInterface
Returns estimate of present event rate on this interface

Specified by:
getEstimatedEventRate in interface AEMonitorInterface
Returns:
event rate in events/sec as computed from last acquisition.

getNumEventsAcquired

public int getNumEventsAcquired()
Returns the number of events acquired by the last call to acquireAvailableEventsFromDriver()

Specified by:
getNumEventsAcquired in interface AEMonitorInterface
Returns:
number of events acquired

resetTimestamps

public void resetTimestamps()
reset the timestamps to zero. This has two effects. First it sends a vendor request down the control endpoint to tell the device to reset its own internal timestamp counters. Second, it tells the AEReader object to reset its timestamps, meaning to reset its unwrap counter.

Specified by:
resetTimestamps in interface AEMonitorInterface

resetPixelArray

public void resetPixelArray()
Reset the entire pixel array. Some interfaces may not support this functionality; they may not implement this vendor request. No exceptions are thrown but a warning mesasge is printed.


setLed

public void setLed(boolean value)
set the board LED state. Useful for debugging. Not available for CypressFX2MonitorSequencer

Parameters:
value - true to turn it on, false to turn it off.

overrunOccurred

public boolean overrunOccurred()
Is true if an overrun occured in the driver (> AE_BUFFER_SIZE events) during the period before the last time acquireAvailableEventsFromDriver() was called. This flag is cleared by acquireAvailableEventsFromDriver(), so you need to check it before you acquire the events.

If there is an overrun, the events grabbed are the most ancient; events after the overrun are discarded. The timestamps continue on but will probably be lagged behind what they should be.

Specified by:
overrunOccurred in interface AEMonitorInterface
Returns:
true if there was an overrun.

close

public void close()
Closes the device. Never throws an exception.

Specified by:
close in interface HardwareInterface

stopAEReader

public void stopAEReader()

requestEarlyTransfer

public void requestEarlyTransfer()
                          throws HardwareInterfaceException
sends vendor request to trigger an immediate commit of whatever is in the endpoint fifo immediately. next call to <@link #acquireAvailableEventsFromDriver} will get these events if you wait a bit.

Throws:
HardwareInterfaceException

isInEndpointEnabled

public boolean isInEndpointEnabled()
Returns:
true if inEndpoint was enabled. However, some other connection (e.g. biasgen) could have disabled the in transfers.

setInEndpointEnabled

public void setInEndpointEnabled(boolean inEndpointEnabled)
                          throws HardwareInterfaceException
sends a vendor request to enable or disable in transfers of AEs

Parameters:
inEndpointEnabled - true to send vendor request to enable, false to send request to disable
Throws:
HardwareInterfaceException

setAEReaderFifoSize

public void setAEReaderFifoSize(int size)
sets the buffer size for the aereader thread. optimal size depends on event rate, for high event rates, at least 4096 bytes should be chosen, using caviarviewer and low event rates need smaller buffer size to produce suitable frame rates


setAEReaderNumBuffers

public void setAEReaderNumBuffers(int num)
sets the number of buffers for the aereader thread.


allocateAEBuffers

protected void allocateAEBuffers()
Allocates internal memory for transferring data from reader to consumer, e.g. rendering.


getAEBufferSize

public int getAEBufferSize()
Description copied from interface: AEMonitorInterface
Returns the size of the host buffer.

Specified by:
getAEBufferSize in interface AEMonitorInterface
Returns:
the size of the double buffer raw packet for AEs

setAEBufferSize

public void setAEBufferSize(int size)
set the size of the raw event packet buffer. Default is AE_BUFFER_SIZE. You can set this larger if you have overruns because your host processing (e.g. rendering) is taking too long.

This call discards collected events.

Specified by:
setAEBufferSize in interface AEMonitorInterface
Parameters:
size - of buffer in events

onAdd

public void onAdd()
Specified by:
onAdd in interface de.thesycon.usbio.PnPNotifyInterface

onRemove

public void onRemove()
Specified by:
onRemove in interface de.thesycon.usbio.PnPNotifyInterface

setEventAcquisitionEnabled

public void setEventAcquisitionEnabled(boolean enable)
                                throws HardwareInterfaceException
start or stops the event acquisition. sends apropriate vendor request to device and starts or stops the AEReader

Specified by:
setEventAcquisitionEnabled in interface AEMonitorInterface
Parameters:
enable - boolean to enable or disable event acquisition
Throws:
HardwareInterfaceException

isEventAcquisitionEnabled

public boolean isEventAcquisitionEnabled()
Specified by:
isEventAcquisitionEnabled in interface AEMonitorInterface
Returns:
true if event acquisition is enabled

getTypeName

public java.lang.String getTypeName()
Description copied from interface: HardwareInterface
get text name of interface, e.g. "CypressFX2" or "SiLabsC8051F320"

Specified by:
getTypeName in interface HardwareInterface

getNumberOfStringDescriptors

public int getNumberOfStringDescriptors()
returns number of string descriptors

Returns:
number of string descriptors: 2 for TmpDiff128, 3 for MonitorSequencer

hasStringIdentifier

protected boolean hasStringIdentifier()
checks if device has a string identifier that is a non-empty string

Returns:
false if not, true if there is one

open

public void open()
          throws HardwareInterfaceException
Constructs a new USB connection and opens it. Does NOT start event acquisition.

Specified by:
open in interface HardwareInterface
Throws:
HardwareInterfaceException - if there is an error opening device
See Also:
setEventAcquisitionEnabled(boolean), openUsbIo_minimal()

openUsbIo

protected void openUsbIo()
                  throws HardwareInterfaceException
This method does the hard work of opening the device, downloading the firmware, making sure everything is OK.

This method is synchronized to prevent multiple threads from trying to open at the same time, e.g. a GUI thread and the main thread.

Opening the device after it has already been opened has no effect.

Throws:
HardwareInterfaceException - if there is a problem. Diagnostics are printed to stderr.
See Also:
close()

openUsbIo_minimal

protected void openUsbIo_minimal()
                          throws HardwareInterfaceException
Opens the device just enough to read the device descriptor but does not start the reader or writer thread. If the device does not have a string descriptor it is assumed that firmware must be downloaded to device RAM and this is done automatically. The device is not configured by this method. Vendor requests and probably other functionality will not be available.. The device is left open this method returns.

Throws:
HardwareInterfaceException
See Also:
open()

unconfigureDevice

protected void unconfigureDevice()
                          throws HardwareInterfaceException
unconfigure device in case it was still configured from a prior terminated process

Throws:
HardwareInterfaceException

getStringDescriptors

public java.lang.String[] getStringDescriptors()
return the string USB descriptors for the device

Specified by:
getStringDescriptors in interface USBInterface
Returns:
String[] of length 2 or 3 of USB descriptor strings.

getVIDPID

public int[] getVIDPID()
return the USB VID/PID of the interface

Specified by:
getVIDPID in interface USBInterface
Returns:
int[] of length 2 containing the Vendor ID (VID) and Product ID (PID) of the device. First element is VID, second element is PID.

getVID

public short getVID()
Specified by:
getVID in interface USBInterface
Returns:
PID (vendor ID)

getPID

public short getPID()
Specified by:
getPID in interface USBInterface
Returns:
PID (product ID)

getDID

public short getDID()
Specified by:
getDID in interface USBInterface
Returns:
bcdDevice (the binary coded decimel device version

isOpen

public boolean isOpen()
reports if interface is open().

Specified by:
isOpen in interface HardwareInterface
Returns:
true if already open

loadBinaryFirmwareFile

public byte[] loadBinaryFirmwareFile(java.lang.String firmwareFilename)
                              throws java.io.IOException
Loads a binary firmware file into memory. The filename is used to search the resource path (i.e. the jar archives on the classpath). If the file is not found in the resources (jars or classes on classpath) then the file system is checked.

Parameters:
firmwareFilename - the resource path
Throws:
java.io.IOException

loadBinaryFirmwareFileSystemFile

public byte[] loadBinaryFirmwareFileSystemFile(java.lang.String firmwareFilename)
                                        throws java.io.IOException
Loads a binary firmware file into memory from a file system path (as opposed to resource path).

Parameters:
firmwareFilename - the file path
Throws:
java.io.IOException

downloadFirmwareBinary

public void downloadFirmwareBinary(java.lang.String firmwareFilename)
                            throws HardwareInterfaceException
downloads firmware to FX2 RAM. adapted from John Arthur's example, which comes from Cypress example. Firmware file is a binary file produced by uVision2 (Keil) from source code for firmware.

Firmware that is actually downloaded depends on discovered PID of device. If the PID is discovered to be a bare CypressFX2, then a dialog is shown that user can use to program the VID/PID of the device.

In addition, there is a problem if firmware is downloaded more than once to an FX2LP device between hard resets. Therefore if this method detects that the device has string identitifers, it assumes the firmware has already been downloaded. Firmware file is loaded as a resource from the jar archive.

Throws:
HardwareInterfaceException

getFirmwareFilenameBinaryFromVIDPID

protected java.lang.String getFirmwareFilenameBinaryFromVIDPID()
Deprecated. not used anymore - user chooses firmware file via AEViewer/CypressFX2 menu item

Returns the firmware filenmae corresponding to a VID/PID pair. This filename is a full path to a resource on the classpath which is in the project jar jAER.jar.


showFirmwareFilenameDialog

public java.lang.String showFirmwareFilenameDialog()
Shows a dialog to let user choose a firmware file for download to the device

Returns:
full path to chosen file

getFirmwareFilenameHexFromVIDPID

protected java.lang.String getFirmwareFilenameHexFromVIDPID()

download8051RAM

protected void download8051RAM(int address,
                               byte[] FWBuffer)
                        throws HardwareInterfaceException
Downloads to RAM on FX2 using built-in vendor request to CPUCS. Remember to set8051Reset() before and after calling this method.

Parameters:
address - the starting address in the 8051 RAM
FWBuffer - the data
Throws:
HardwareInterfaceException
See Also:
set8051Reset(boolean)

set8051Reset

protected void set8051Reset(boolean value)
                     throws HardwareInterfaceException
sends vendor request to CPUCS register to set 8051 in CPU reset (or not)

Parameters:
value - true to reset, false to run
Throws:
HardwareInterfaceException
See Also:
download8051RAM(int, byte[])

getTimestampTickUs

public final int getTimestampTickUs()
Specified by:
getTimestampTickUs in interface AEMonitorInterface
Returns:
timestamp tick in us NOTE: DOES NOT RETURN THE TICK OF THE USBAERmini2 board

getEvents

public AEPacketRaw getEvents()
returns last events from acquireAvailableEventsFromDriver()

Specified by:
getEvents in interface AEMonitorInterface
Returns:
the event packet

sendVendorRequest

public void sendVendorRequest(byte request)
                       throws HardwareInterfaceException
sends a vender request without data, value and index are set to zero. This is a blocking method.

Parameters:
request - the vendor request byte, identifies the request on the device
Throws:
HardwareInterfaceException

sendVendorRequest

public void sendVendorRequest(byte request,
                              short value,
                              short index)
                       throws HardwareInterfaceException
sends a vender request without any data packet but with request, value and index. This is a blocking method.

Parameters:
request - the vendor request byte, identifies the request on the device
value - the value of the request (bValue USB field)
index - the "index" of the request (bIndex USB field)
Throws:
HardwareInterfaceException

sendVendorRequest

public void sendVendorRequest(byte request,
                              short value,
                              short index,
                              byte[] bytes)
                       throws HardwareInterfaceException
Sends a vendor request with a given byte[]. This is a blocking method.

Parameters:
request - the vendor request byte, identifies the request on the device
value - the value of the request (bValue USB field)
index - the "index" of the request (bIndex USB field)
bytes - the data which is to be transmitted to the device
Throws:
HardwareInterfaceException

sendVendorRequest

public void sendVendorRequest(byte request,
                              short value,
                              short index,
                              de.thesycon.usbio.structs.USBIO_DATA_BUFFER dataBuffer)
                       throws HardwareInterfaceException
sends a vender request with data. This is a blocking method.

Parameters:
request - the vendor request byte, identifies the request on the device
value - the value of the request (bValue USB field)
index - the "index" of the request (bIndex USB field)
dataBuffer - the data which is to be transmitted to the device
Throws:
HardwareInterfaceException

writeCPLDfirmware

public void writeCPLDfirmware(java.lang.String svfFile)
                       throws HardwareInterfaceException
Writes the CPLD configuration from an SVF file. Thread-safe.

Parameters:
svfFile -
Throws:
HardwareInterfaceException

getAeReader

public CypressFX2.AEReader getAeReader()

setAeReader

public void setAeReader(CypressFX2.AEReader aeReader)

getFifoSize

public int getFifoSize()
Specified by:
getFifoSize in interface ReaderBufferControl

setFifoSize

public void setFifoSize(int fifoSize)
Specified by:
setFifoSize in interface ReaderBufferControl

getNumBuffers

public int getNumBuffers()
Specified by:
getNumBuffers in interface ReaderBufferControl

setNumBuffers

public void setNumBuffers(int numBuffers)
Specified by:
setNumBuffers in interface ReaderBufferControl

setChip

public void setChip(AEChip chip)
Description copied from interface: AEMonitorInterface
Sets the AEChip that this interface is acquiring events for

Specified by:
setChip in interface AEMonitorInterface
Parameters:
chip - the chip

getChip

public AEChip getChip()
Description copied from interface: AEMonitorInterface
Sets the AEChip that this interface is acquiring events for

Specified by:
getChip in interface AEMonitorInterface
Returns:
the chip

resetUSB

public void resetUSB()
Resets the USB device using USBIO resetDevice


cyclePort

public void cyclePort()
               throws HardwareInterfaceException
Cycles the port using USBIO cyclePort. Does nothing if device has not been instantiated.

Throws:
HardwareInterfaceException

jAER project on SourceForge