net.sf.jaer.eventio
Class AEMulticastOutput
java.lang.Object
net.sf.jaer.eventio.AEMulticastOutput
public class AEMulticastOutput
- extends java.lang.Object
Streams AE packets to network socket using DatagramPacket's that are multicast.
AEViewers can receive these packets to render them.
The implementation using a BlockingQueue to buffer the AEPacketRaw's that are offered.
- Author:
- tobi
Field Summary |
protected java.nio.channels.DatagramChannel |
channel
|
protected java.net.MulticastSocket |
socket
|
Constructor Summary |
AEMulticastOutput()
Creates a new instance of AESocketOutputStream |
Method Summary |
void |
close()
|
java.lang.String |
toString()
|
void |
writePacket(AEPacketRaw ae)
Writes the packet out as sequence of address/timestamp's, just as they came as input from the device. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
channel
protected java.nio.channels.DatagramChannel channel
socket
protected java.net.MulticastSocket socket
AEMulticastOutput
public AEMulticastOutput()
- Creates a new instance of AESocketOutputStream
writePacket
public void writePacket(AEPacketRaw ae)
throws java.io.IOException
- Writes the packet out as sequence of address/timestamp's, just as they came as input from the device. The notion of a packet is discarded
to simplify later reading an input stream from the output stream result. The AEPacketRaw is written in chunks of AESocketStream.SOCKET_BUFFER_SIZE bytes (which
must be a multiple of AESocketStream.EVENT_SIZE_BYTES). Each DatagramPacket has a sequence number as the first Integer value which is used on the reciever to
detect dropped packets.
If an empty packet is supplied as ae, then a packet is still written but it contains only a sequence number.
- Parameters:
ae
- a raw addresse-event packet
- Throws:
java.io.IOException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
close
public void close()