public class GPSdEndpoint extends Object
| Constructor and Description |
|---|
GPSdEndpoint(String server,
int port,
AbstractResultParser resultParser)
Instantiate this class to connect to a GPSd server
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(IObjectListener listener) |
void |
kickDevice(String path)
Attempt to kick a failed device back into life on gpsd server.
|
PollObject |
poll()
Poll GPSd for Message
|
void |
removeListener(IObjectListener listener) |
void |
start()
start the endpoint
|
void |
stop()
Stops the endpoint.
|
VersionObject |
version()
Poll GPSd version
|
WatchObject |
watch(boolean enable,
boolean dumpData)
send WATCH command
|
WatchObject |
watch(boolean enable,
boolean dumpData,
String device)
send WATCH command
|
public GPSdEndpoint(String server, int port, AbstractResultParser resultParser) throws UnknownHostException, IOException
server - the server name or IPport - the server portresultParser - UnknownHostExceptionIOExceptionpublic void start()
public void stop()
public WatchObject watch(boolean enable, boolean dumpData) throws IOException, org.json.JSONException
enable - enable/disable watch modedumpData - enable/disable dumping of dataWatchObjectIOException - on IO error in socketorg.json.JSONExceptionpublic WatchObject watch(boolean enable, boolean dumpData, String device) throws IOException, org.json.JSONException
enable - enable/disable watch modedumpData - enable/disable dumping of datadevice - If present, enable watching only of the specified device rather than all devicesWatchObjectIOException - on IO error in socketorg.json.JSONExceptionpublic PollObject poll() throws IOException
PollObjectIOException - on IO error in socketpublic VersionObject version() throws IOException
VersionObjectIOException - on IO error in socketpublic void addListener(IObjectListener listener)
listener - the listener to addpublic void removeListener(IObjectListener listener)
listener - the listener to removepublic void kickDevice(String path) throws IOException, org.json.JSONException
path - Path of device known to gpsdIOExceptionorg.json.JSONExceptionCopyright © 2011–2015 Taimos GmbH. All rights reserved.