public class APRS
extends java.lang.Object
user CW3375 pass -1 vers ow4j060304then sends the data like this:
CW3375>APRS,TCPIP*:@241820z4851.55N/12235.65W_052/002g008t051P...r...p...h..b.....ow4j060304and closes the connection.
The formatter will not send any data unless at least temperature is available.
Refer to this internal default resource file for property keys and default values used to configure this formatter. Station ID, password, latitude and longitude are typically the only values you will need to change.
Modifier and Type | Class and Description |
---|---|
private class |
APRS.DataExchangeListener
Data exchange listener captures and processes sensor data.
|
private class |
APRS.FormatTask
Format weather data to APRS CWOP.
|
Modifier and Type | Field and Description |
---|---|
private static java.text.DecimalFormat |
AIR_PRESSURE
Barometer decimal format.
|
private ISensorData |
anemometer
Individually referenced sensor.
|
private static java.lang.String |
APP_NAME
Short app name.
|
private static java.lang.String |
APP_VERSION
APRS-recognized application name.
|
private ISensorData |
barometer
Individually referenced sensor.
|
private IDataExchange |
dataExchange
Data exchange for receiving data.
|
private static java.text.DateFormat |
DATE
Formatter for date-time string.
|
private java.lang.String[] |
errorResponses
APRS error responses.
|
private java.lang.String[] |
hostAddresses
APRS host addresses.
|
private static java.text.DecimalFormat |
HUMIDITY
Humidity decimal format.
|
private ISensorData |
hygrometer
Individually referenced sensor.
|
private long |
interval
Posting interval.
|
private java.lang.String |
latitude
Station latitude.
|
private IDataExchangeListener |
listener
Listener for receiving data added events.
|
private static java.util.logging.Logger |
LOGGER
Logger.
|
private java.lang.String |
longitude
Station longitude.
|
private java.lang.String |
name
Task name.
|
private java.lang.String |
password
APRS password.
|
private ISensorData |
precipitationRate
Individually referenced sensor.
|
private ISensorData |
precipitationTotal
Individually referenced sensor.
|
private static java.text.DecimalFormat |
RAINFALL
Rainfall decimal format.
|
private java.util.Map<java.lang.String,ISensorData> |
sensorData
Map of data sources.
|
private java.lang.String |
stationId
APRS weather station ID.
|
private static java.text.DecimalFormat |
TEMPERATURE
Temperature decimal format.
|
private ISensorData |
thermometer
Individually referenced sensor.
|
private static java.text.DecimalFormat |
WIND_DIRECTION
Wind direction decimal format.
|
private static java.text.DecimalFormat |
WIND_SPEED
Wind speed decimal format.
|
private ISensorData |
windVane
Individually referenced sensor.
|
Constructor and Description |
---|
APRS(java.lang.String name,
java.util.Properties config,
IDataExchange dataExchange,
IServiceControl serviceControl)
Creates a new instance of APRS
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
toString()
Returns a text representation of this object.
|
private static final java.text.DateFormat DATE
private static final java.text.DecimalFormat TEMPERATURE
private static final java.text.DecimalFormat HUMIDITY
private static final java.text.DecimalFormat AIR_PRESSURE
private static final java.text.DecimalFormat RAINFALL
private static final java.text.DecimalFormat WIND_DIRECTION
private static final java.text.DecimalFormat WIND_SPEED
private static final java.lang.String APP_VERSION
private static final java.lang.String APP_NAME
private static final java.util.logging.Logger LOGGER
private final java.util.Map<java.lang.String,ISensorData> sensorData
private ISensorData thermometer
private ISensorData anemometer
private ISensorData windVane
private ISensorData hygrometer
private ISensorData barometer
private ISensorData precipitationRate
private ISensorData precipitationTotal
private java.lang.String name
private java.lang.String stationId
private java.lang.String password
private java.lang.String[] hostAddresses
private java.lang.String[] errorResponses
private java.lang.String latitude
private java.lang.String longitude
private IDataExchange dataExchange
private final IDataExchangeListener listener
private long interval
public APRS(java.lang.String name, java.util.Properties config, IDataExchange dataExchange, IServiceControl serviceControl)
name
- of this formatter task.config
- properties from the wxservice.properties file.dataExchange
- formatters implement an
IDataExchangeListener
as an inner class and add an
instance to IDataExchange
.serviceControl
- IServiceControl
to initialize the
service.