|
jAER project on SourceForge | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jaer.aemonitor.AEPacket
net.sf.jaer.aemonitor.AEPacketRaw
public class AEPacketRaw
A structure containing a packer of AEs: addresses, timestamps.
The AE packet efficiently packages a set of events: rather than
using an object per event, it packs a lot of events into an object that references
arrays of primitives. These arrays can be newly allocated or statically
allocated to the capacity of the maximum buffer that is transferred from a device.
Callers must use AEPacket.getNumEvents()
to find out the capacity of the packet in the case
that the arrays contain less events than their capacity, which is usually the case when the packet is reused
in a device acquisition.
These AEPacketRaw are used only for device events (raw events). For processed events, see the net.sf.jaer.event package.
Field Summary | |
---|---|
int[] |
addresses
The raw AER addresses |
int |
lastCaptureIndex
the index of the start of the last packet captured from a device, used for processing data on acquisition. |
int |
lastCaptureLength
the number of events last captured. |
boolean |
overrunOccuredFlag
Signals that an overrun occured on this packet |
Fields inherited from class net.sf.jaer.aemonitor.AEPacket |
---|
capacity, events, numEvents, timestamps |
Constructor Summary | |
---|---|
AEPacketRaw()
Creates a new instance of AEPacketRaw with 0 capacity |
|
AEPacketRaw(int size)
Creates a new instance of AEPacketRaw with an initial capacity |
|
AEPacketRaw(int[] addresses,
int[] timestamps)
Creates a new instance of AEPacketRaw from addresses and timestamps |
Method Summary | |
---|---|
void |
addEvent(EventRaw e)
|
protected void |
allocateArrays(int size)
|
void |
clear()
sets number of events to zero |
void |
ensureCapacity(int c)
ensure the capacity given. |
int[] |
getAddresses()
|
int |
getCapacity()
|
EventRaw |
getEvent(int k)
uses local EventRaw to return packaged event. |
AEPacketRaw |
getPrunedCopy()
Allocates a new AEPacketRaw and copies the events from this packet into the new one, returning it. |
void |
setAddresses(int[] addresses)
|
Methods inherited from class net.sf.jaer.aemonitor.AEPacket |
---|
addEvent, getDt, getFirstTimestamp, getLastTimestamp, getNumEvents, getTimestamp, getTimestamps, setNumEvents, setTimestamps, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int lastCaptureIndex
public int lastCaptureLength
public int[] addresses
public boolean overrunOccuredFlag
Constructor Detail |
---|
public AEPacketRaw()
public AEPacketRaw(int[] addresses, int[] timestamps)
addresses
- timestamps
- public AEPacketRaw(int size)
size
- capacity in eventsMethod Detail |
---|
protected void allocateArrays(int size)
public int[] getAddresses()
public void setAddresses(int[] addresses)
public EventRaw getEvent(int k)
public int getCapacity()
getCapacity
in class AEPacket
public void ensureCapacity(int c)
ensureCapacity
in class AEPacket
c
- the desired capacitypublic void addEvent(EventRaw e)
e
- an Event to add to the ones already present. Capacity is enlarged if necessary.public void clear()
clear
in class AEPacket
public AEPacketRaw getPrunedCopy()
|
jAER project on SourceForge | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |