RiverRat  - An MIT iCampus project http://web.mit.edu/riverrat/

Main Page | Software Documentation | Hardware Documentation | People | Contact | Wiki

Main Page | Class Hierarchy | Class List | File List | Class Members

riverrat.testing.NMEAFakeServer Class Reference

Finished prototype - A FakeServer that takes data from a text file with NMEA sentences. More...

Inheritance diagram for riverrat.testing.NMEAFakeServer:

riverrat.testing.FakeServer riverrat.BasicServer List of all members.

Public Member Functions

 NMEAFakeServer ()
 Default constructor.

 NMEAFakeServer (int newport)
 Constructor.

 NMEAFakeServer (String newhost, int newport)
 Constructor to get NMEA stream from network instead of file.

void setupState ()
 Setup state data, and print to the XML stream.

void endRace ()
void printBoat (float lat, float lon, long time)
void mainServer ()
 Main operation function.


Static Public Member Functions

void main (String args[])
 Test method.


Protected Attributes

BufferedReader breader
 BufferedReader to read data from.

boolean DELAY_INPUT = false
 Determines whether or not to delay input, for testing.

boolean FILE_DATA
 Determines whether or not to get data from local file rather than network.

String nmeahost = "localhost"
 Host to get NMEA data from.

int nmeaport = 9999
 Port to get NMEA data on.


Static Protected Attributes

String file = "track6.raw"
 File to read data from, overrides superclass.

final String hostname = "localhost"

Detailed Description

Finished prototype - A FakeServer that takes data from a text file with NMEA sentences.

Mostly complete, but needs an NMEA parser.

Definition at line 14 of file NMEAFakeServer.java.


Constructor & Destructor Documentation

riverrat.testing.NMEAFakeServer.NMEAFakeServer  ) 
 

Default constructor.

Calls super().

Definition at line 40 of file NMEAFakeServer.java.

References riverrat.testing.NMEAFakeServer.FILE_DATA.

Referenced by riverrat.testing.NMEAFakeServer.main().

riverrat.testing.NMEAFakeServer.NMEAFakeServer int  newport  ) 
 

Constructor.

Calls super(newport).

Definition at line 49 of file NMEAFakeServer.java.

References riverrat.testing.NMEAFakeServer.FILE_DATA.


Member Function Documentation

void riverrat.testing.NMEAFakeServer.main String  args[]  )  [static]
 

Test method.

Starts a new NMEAFakeServer, spawns a Thread with it, then just loops. Argument specifies (optional) filename.

Parameters:
args array of Strings with command-line arguments

Reimplemented from riverrat.testing.FakeServer.

Definition at line 251 of file NMEAFakeServer.java.

References riverrat.testing.NMEAFakeServer.NMEAFakeServer().

void riverrat.testing.NMEAFakeServer.mainServer  ) 
 

Main operation function.

Overrides super.mainServer()

Reimplemented from riverrat.testing.FakeServer.

Definition at line 126 of file NMEAFakeServer.java.

References riverrat.testing.NMEAFakeServer.breader, riverrat.testing.NMEAFakeServer.file, riverrat.testing.NMEAFakeServer.FILE_DATA, riverrat.testing.NMEAFakeServer.nmeahost, riverrat.testing.NMEAFakeServer.nmeaport, riverrat.testing.FakeServer.openFile(), and riverrat.testing.NMEAFakeServer.setupState().

void riverrat.testing.NMEAFakeServer.setupState  ) 
 

Setup state data, and print to the XML stream.

Definition at line 68 of file NMEAFakeServer.java.

References riverrat.BasicServer.endElement(), riverrat.BasicServer.startDocument(), and riverrat.BasicServer.startElement().

Referenced by riverrat.testing.NMEAFakeServer.mainServer().


Member Data Documentation

boolean riverrat.testing.NMEAFakeServer.FILE_DATA [protected]
 

Determines whether or not to get data from local file rather than network.

Definition at line 28 of file NMEAFakeServer.java.

Referenced by riverrat.testing.NMEAFakeServer.mainServer(), and riverrat.testing.NMEAFakeServer.NMEAFakeServer().


The documentation for this class was generated from the following file:  

Brought to you by the RiverRat team.