|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgps.connection.GPSrxtx
public final class GPSrxtx
This class implements the low level driver of the GPS device.
The serial link reader is defined as a State. The State defines the
protocol.
The getResponse()
function should be called regularly to retrieve
and interpret the GPS device's response.
Field Summary | |
---|---|
static int |
ERR_CHECKSUM
|
static int |
ERR_INCOMPLETE
|
static int |
ERR_NOERROR
|
static int |
ERR_TOO_LONG
|
Constructor Summary | |
---|---|
GPSrxtx()
|
|
GPSrxtx(GPSPort port)
|
Method Summary | |
---|---|
void |
closePort()
|
java.lang.String |
getFreeTextPort()
|
GPSPort |
getGpsPort()
|
int |
getPort()
|
byte |
getReadBufferByte()
|
char |
getReadBufferChar()
|
java.lang.Object |
getResponse()
|
int |
getSpeed()
|
java.lang.Object |
getState()
Returns the current state which is part of the context. |
static boolean |
hasDefaultPortInstance()
|
boolean |
isConnected()
|
boolean |
isDebugConn()
|
boolean |
isReadBufferEmpty()
|
void |
newState(DecoderStateInterface newState)
Enters a state that can be provided for externally. |
void |
newState(int newState)
Called by state or other means to change state. |
void |
openPort()
|
void |
setBaudRate(int speed)
|
void |
setBluetoothAndOpen()
|
void |
setDebugConn(boolean gps_debug,
java.lang.String s)
|
static void |
setDefaultGpsPortInstance(GPSPort portInstance)
|
void |
setDefaults(int port,
int speed)
Set the defaults for the device according to the given parameters. |
int |
setFreeTextPortAndOpen(java.lang.String s)
|
int |
setPortAndOpen(int port)
Set and open a normal port (giving the port number) |
void |
setUSBAndOpen()
|
void |
virtualReceive(java.lang.String rvd)
|
void |
write(byte[] bytes)
|
void |
write(java.lang.String text)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ERR_NOERROR
public static final int ERR_CHECKSUM
public static final int ERR_INCOMPLETE
public static final int ERR_TOO_LONG
Constructor Detail |
---|
public GPSrxtx()
public GPSrxtx(GPSPort port)
Method Detail |
---|
public final void newState(int newState)
public final void newState(DecoderStateInterface newState)
newState
- public final java.lang.Object getState()
public static final void setDefaultGpsPortInstance(GPSPort portInstance)
public static final boolean hasDefaultPortInstance()
public final GPSPort getGpsPort()
public final void setDefaults(int port, int speed)
port
- speed
- public final void setBluetoothAndOpen()
public final void setUSBAndOpen()
public final void closePort()
public final void openPort()
public final int setPortAndOpen(int port)
port
- Port number of the port to open
public final int setFreeTextPortAndOpen(java.lang.String s)
public final java.lang.String getFreeTextPort()
public final int getPort()
public final int getSpeed()
public final void setBaudRate(int speed)
public final boolean isConnected()
public final void write(java.lang.String text)
public final void write(byte[] bytes)
public final void virtualReceive(java.lang.String rvd)
public final java.lang.Object getResponse()
public final void setDebugConn(boolean gps_debug, java.lang.String s)
public final boolean isDebugConn()
public final boolean isReadBufferEmpty()
public final char getReadBufferChar()
public final byte getReadBufferByte()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |