jAER project on SourceForge

net.sf.jaer.aemonitor
Interface AEMonitorInterface

All Superinterfaces:
HardwareInterface, USBInterface
All Known Subinterfaces:
AEMonitorSequencerInterface
All Known Implementing Classes:
CochleaAMS1bHardwareInterface, CypressFX2, CypressFX2AEX, CypressFX2Biasgen, CypressFX2DVS128HardwareInterface, CypressFX2Mapper, CypressFX2MonitorSequencer, CypressFX2RetinaLinux, CypressFX2StereoBoard, CypressFX2TmpdiffRetinaHardwareInterface, DVS320HardwareInterface, SiLabsC8051F320, StereoBiasgenHardwareInterface, StereoHardwareInterface

public interface AEMonitorInterface
extends USBInterface

Defines interface for an AE monitor.

Author:
tobi

Field Summary
 
Fields inherited from interface net.sf.jaer.hardwareinterface.usb.USBInterface
PID_THESYCON_END, PID_THESYCON_START, VID_THESYCON
 
Method Summary
 AEPacketRaw acquireAvailableEventsFromDriver()
          Gets available events from driver.
 void addAEListener(AEListener listener)
          add a PropertyChangeListener for new events
 int getAEBufferSize()
          Returns the size of the host buffer.
 AEChip getChip()
          Sets the AEChip that this interface is acquiring events for
 int getEstimatedEventRate()
          Returns estimate of present event rate on this interface
 AEPacketRaw getEvents()
          returns the last events acquired by acquireAvailableEventsFromDriver()
 int getMaxCapacity()
          Returns max capacity of this interface in events/sec
 int getNumEventsAcquired()
          Returns the number of events acquired by the last call to acquireAvailableEventsFromDriver()
 int getTimestampTickUs()
           
 boolean isEventAcquisitionEnabled()
           
 boolean overrunOccurred()
          Is true if an overrun occured in the driver the last time acquireAvailableEventsFromDriver() was called.
 void removeAEListener(AEListener listener)
          remove a PropertyChangeListener for new events
 void resetTimestamps()
          resets the timestamps to start at zero
 void setAEBufferSize(int AEBufferSize)
          Sets the size in events of the host buffer.
 void setChip(AEChip chip)
          Sets the AEChip that this interface is acquiring events for
 void setEventAcquisitionEnabled(boolean enable)
          Enables event acquisition, e.g.
 
Methods inherited from interface net.sf.jaer.hardwareinterface.usb.USBInterface
getDID, getPID, getStringDescriptors, getVID, getVIDPID
 
Methods inherited from interface net.sf.jaer.hardwareinterface.HardwareInterface
close, getTypeName, isOpen, open
 

Method Detail

acquireAvailableEventsFromDriver

AEPacketRaw acquireAvailableEventsFromDriver()
                                             throws HardwareInterfaceException
Gets available events from driver. This call returns a reference to an AEPacket that holds the events. HardwareInterfaceException is thrown if there is an error.

Returns:
packet. A empty packet is returned if there are no events.
Throws:
HardwareInterfaceException - .

getNumEventsAcquired

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

Returns:
number of events acquired

getEvents

AEPacketRaw getEvents()
returns the last events acquired by acquireAvailableEventsFromDriver()

Returns:
the packet of raw events

resetTimestamps

void resetTimestamps()
resets the timestamps to start at zero


overrunOccurred

boolean overrunOccurred()
Is true if an overrun occured in the driver the last time acquireAvailableEventsFromDriver() was called. This flag is cleared by the next acquireAvailableEventsFromDriver(). 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.

Returns:
true if there was an overrun.

getAEBufferSize

int getAEBufferSize()
Returns the size of the host buffer.

Returns:
the size of the buffer in events

setAEBufferSize

void setAEBufferSize(int AEBufferSize)
Sets the size in events of the host 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.

Parameters:
AEBufferSize - size of buffer in events

setEventAcquisitionEnabled

void setEventAcquisitionEnabled(boolean enable)
                                throws HardwareInterfaceException
Enables event acquisition, e.g. sends vendor commands to enable transfers, starts buffer pool threads. This method can be called, e.g. from acquireAvailableEventsFromDriver method to ensure driver is acquiring events.

Parameters:
enable - true to start, false to stop
Throws:
HardwareInterfaceException

isEventAcquisitionEnabled

boolean isEventAcquisitionEnabled()
Returns:
true if event acquisition is enabled

addAEListener

void addAEListener(AEListener listener)
add a PropertyChangeListener for new events

Parameters:
listener - will be called after each acquireAvailableEventsFromDriver() call

removeAEListener

void removeAEListener(AEListener listener)
remove a PropertyChangeListener for new events

Parameters:
listener - to remove

getMaxCapacity

int getMaxCapacity()
Returns max capacity of this interface in events/sec

Returns:
max capacity in events/sec

getEstimatedEventRate

int getEstimatedEventRate()
Returns estimate of present event rate on this interface

Returns:
estimated event rate in events/sec

getTimestampTickUs

int getTimestampTickUs()
Returns:
timestamp tick in us for this interface

setChip

void setChip(AEChip chip)
Sets the AEChip that this interface is acquiring events for

Parameters:
chip - the chip

getChip

AEChip getChip()
Sets the AEChip that this interface is acquiring events for

Returns:
the chip

jAER project on SourceForge