Package lejos.robotics.filter
Class PublishedSource
- java.lang.Object
-
- lejos.robotics.filter.PublishedSource
-
public class PublishedSource extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected java.io.DataInputStreamdisprotected java.text.DateFormatformatterprotected floatfrequencyprotected java.lang.Stringhostprotected java.lang.StringipAddressprotected static intMAX_AGEprotected static intMAX_PACKET_SIZEprotected static intMAX_SAMPLE_MESSAGE_SIZEprotected java.lang.Stringnameprotected intportprotected static intPUBLISH_PORTprotected float[]sampleprotected intsampleSizeprotected java.net.Socketsocketprotected static intSOCKET_TIMEOUTprotected longtimeStamp
-
Constructor Summary
Constructors Constructor Description PublishedSource(java.lang.String ipAddress, byte[] message)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()SubscribedProviderconnect()floatgetFrequency()java.lang.StringgetHost()java.lang.StringgetIpAddress()java.lang.StringgetKey()java.lang.StringgetName()intgetPort()static java.util.Collection<PublishedSource>getSources()java.lang.StringgetTime()longgetTimeStamp()intsampleSize()
-
-
-
Field Detail
-
MAX_PACKET_SIZE
protected static final int MAX_PACKET_SIZE
- See Also:
- Constant Field Values
-
PUBLISH_PORT
protected static final int PUBLISH_PORT
- See Also:
- Constant Field Values
-
SOCKET_TIMEOUT
protected static final int SOCKET_TIMEOUT
- See Also:
- Constant Field Values
-
MAX_AGE
protected static final int MAX_AGE
- See Also:
- Constant Field Values
-
MAX_SAMPLE_MESSAGE_SIZE
protected static final int MAX_SAMPLE_MESSAGE_SIZE
- See Also:
- Constant Field Values
-
name
protected java.lang.String name
-
sampleSize
protected int sampleSize
-
sample
protected float[] sample
-
frequency
protected float frequency
-
host
protected java.lang.String host
-
port
protected int port
-
timeStamp
protected long timeStamp
-
formatter
protected java.text.DateFormat formatter
-
ipAddress
protected java.lang.String ipAddress
-
socket
protected java.net.Socket socket
-
dis
protected java.io.DataInputStream dis
-
-
Method Detail
-
connect
public SubscribedProvider connect() throws java.io.IOException
- Throws:
java.io.IOException
-
sampleSize
public int sampleSize()
-
getName
public java.lang.String getName()
-
getFrequency
public float getFrequency()
-
getHost
public java.lang.String getHost()
-
getTime
public java.lang.String getTime()
-
getKey
public java.lang.String getKey()
-
getIpAddress
public java.lang.String getIpAddress()
-
getPort
public int getPort()
-
getTimeStamp
public long getTimeStamp()
-
close
public void close() throws java.io.IOException- Throws:
java.io.IOException
-
getSources
public static java.util.Collection<PublishedSource> getSources()
-
-