Class ServerBeacon
java.lang.Object
ServerBeacon
- public class ServerBeacon
- extends java.lang.Object
ServerBeacon is a stand-alone class that acts as a broadcasting station
for use in an ultrasound/802.11 indoor positioning system. It is meant
to run on a stationary computer with speakers and 802.11 broadcast
capabilities. This class instantiates a Broadcaster thread with its
host computer's room information. The Broadcaster thread periodically
sends out concurrent 802.11 room information-bearing broadcasts and
ultrasound pulses. By listening for these broadcasts, mobile clients
should be able to identify their room location within a building.
The room information that is wirelessly broadcasted is read from a
configuration file in the same directory as this class. This file,
called 'beacon.conf' should have a "MESSAGE=" identifier that defines
a unique room-identifying string. For example, the following
beacon.conf could be used on a computer in a 5th-floor office of
building "CompSci": MESSAGE=CompSci Room 534. The format of the
message string should match the format required by whatever
location-dependent application is running on the mobile clients.
Method Summary |
static int |
getNextChar(java.io.FileReader theFile)
Simple method for reading the next character from a file
encapsulates the catching of an IOException. |
static int |
getStdIn()
Simple method for reading the next character from the command
line. |
static void |
main(java.lang.String[] args)
Can be given two parameters which are the MIN and MAX times to wait between
transmissions. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONFIG_FILE
public static final java.lang.String CONFIG_FILE
- See Also:
- Constant Field Values
EOF
public static final char EOF
- See Also:
- Constant Field Values
ServerBeacon
public ServerBeacon()
getNextChar
public static int getNextChar(java.io.FileReader theFile)
- Simple method for reading the next character from a file
encapsulates the catching of an IOException.
- Parameters:
theFile
- the FileReader object from which to read
- Returns:
- the next character (as an int) in the file
getStdIn
public static int getStdIn()
- Simple method for reading the next character from the command
line. It is meant to encapsulate the catching of an IOException.
- Returns:
- the next character from standard input
main
public static void main(java.lang.String[] args)
- Can be given two parameters which are the MIN and MAX times to wait between
transmissions.