jAER project on SourceForge

net.sf.jaer.aemapper
Class AbstractAEMapper

java.lang.Object
  extended by net.sf.jaer.aemapper.AbstractAEMapper
All Implemented Interfaces:
AEMapper

public abstract class AbstractAEMapper
extends java.lang.Object
implements AEMapper

An abstract AEMapper that only needs implementation of getMapping method.

Author:
tobi

Constructor Summary
AbstractAEMapper()
           
 
Method Summary
abstract  int[] getMapping(int src)
          get the array of destination addresses for a source address
 boolean isMappingEnabled()
           
 boolean isMappingPassThrough()
           
 AEPacketRaw mapPacket(AEPacketRaw input)
          Iterates over events in input packet to supply output packet
 void setMappingEnabled(boolean yes)
          Enables mapping.
 void setMappingPassThrough(boolean yes)
          Sets identity mapping - all events just pass straight through.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractAEMapper

public AbstractAEMapper()
Method Detail

getMapping

public abstract int[] getMapping(int src)
get the array of destination addresses for a source address

Parameters:
src - the source address
Returns:
array of destination addresses

setMappingPassThrough

public void setMappingPassThrough(boolean yes)
Sets identity mapping - all events just pass straight through.

Specified by:
setMappingPassThrough in interface AEMapper
Parameters:
yes - true to set identity mapping, false to activate normal mapper function.

isMappingPassThrough

public boolean isMappingPassThrough()
Specified by:
isMappingPassThrough in interface AEMapper

setMappingEnabled

public void setMappingEnabled(boolean yes)
Enables mapping.

Specified by:
setMappingEnabled in interface AEMapper
Parameters:
yes - true to enable mapping. False means that events will not be mapped from input to output.

isMappingEnabled

public boolean isMappingEnabled()
Specified by:
isMappingEnabled in interface AEMapper

mapPacket

public AEPacketRaw mapPacket(AEPacketRaw input)
Iterates over events in input packet to supply output packet

Specified by:
mapPacket in interface AEMapper
Parameters:
input - the packet of raw input events
Returns:
a packet of mapped output events

jAER project on SourceForge