|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ka2ddo.yaac.io.BeaconData
public class BeaconData
This class contains all the data associated with a beacon message.
Nested Class Summary | |
---|---|
static class |
BeaconData.BeaconType
Enum defining the APRS message formats that YAAC can use for position beacons. |
static class |
BeaconData.PositionType
Enum specifying the specific APRS Position Report message type code used for BeaconType.POSITION and BeaconType.COMPRESSED beacon messages in APRS. |
Field Summary | |
---|---|
XmitEncoding |
ctcss
|
java.lang.String[] |
digipeaters
|
byte |
directionality
|
static java.lang.String[] |
DIRECTIVITY
|
boolean |
enabled
|
float |
fixedAltitudeM
|
java.lang.String |
freeText
|
byte |
gain
|
byte |
height
|
double |
latitude
|
double |
longitude
|
double |
monitorFreq
|
static java.lang.String |
MYCALL
|
static java.lang.String |
NOCALL
|
short |
offset
|
BeaconData.PositionType |
positionType
|
byte |
power
|
boolean |
reportAltitude
|
boolean |
reportSpeed
|
boolean |
showDFS
|
boolean |
showPHG
|
short |
status
|
char |
symbolCode
|
char |
symTableId
|
BeaconData.BeaconType |
type
|
boolean |
useGpsForPosition
|
boolean |
useWeather
|
Constructor Summary | |
---|---|
BeaconData()
|
Method Summary | |
---|---|
void |
addBeaconChangeListener(BeaconChangeListener l)
Register to be informed when the beacon parameters are changed. |
void |
cancelTransmission()
Cancel all upcoming transmissions of the beacon. |
java.lang.Object |
clone()
Creates and returns a copy of this object. |
void |
copyInto(BeaconData bd,
java.util.prefs.Preferences root)
Copy the contents of this BeaconData object into the specified one, and tell the other one that it was changed if any changes occur. |
AX25Message |
dup()
Creates and returns a copy of this Message. |
byte[] |
getBody(boolean countTransmission,
byte protocolId,
AX25Frame frame)
Get an instance of this message, suitable for transmitting. |
Connector |
getConnector()
Specify the PortConnector this message should be transmitted through. |
AX25Frame |
getFrame(boolean incrementXmtCount,
BeaconData.BeaconType overrideType,
byte protocolId)
|
AX25Frame[] |
getFrames(boolean incrementXmtCount,
byte protocolId,
java.lang.String senderCallsign)
Get one or more AX25Frames of the data to transmit. |
int |
getNumTransmitsBeforeDecay()
Get the number of cycles for a complete iteration over the proportional pathing digipeat path set. |
void |
gpsDataUpdated(GPSDistributor distributor,
GpsFix currentFix,
boolean isLocal,
java.lang.String source)
Do not call. |
boolean |
isEnabled()
Test if message should still be transmitted. |
void |
queueForTransmission()
Queue the beacon for transmission after the next transmission interval. |
void |
queueNow()
Queue the beacon for immediate transmission. |
static BeaconData |
readFromPreferences(java.util.prefs.Preferences root,
java.lang.String beaconName)
Load the beacon settings from Java Preferences. |
void |
removeBeaconChangeListener(BeaconChangeListener l)
Unregister from being informed when the beacon parameters are changed. |
void |
resetTransmitCount()
|
void |
satDataUpdated(GPSDistributor distributor,
SatelliteCatalog satCatalog,
boolean isLocal,
java.lang.String source)
Do not call. |
java.lang.String |
toString()
|
void |
writeToPreferences(java.util.prefs.Preferences root)
Store the current beacon settings in Java Preferences. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String MYCALL
public static final java.lang.String NOCALL
public BeaconData.BeaconType type
public BeaconData.PositionType positionType
public boolean enabled
public boolean useGpsForPosition
public double latitude
public double longitude
public boolean reportSpeed
public boolean reportAltitude
public float fixedAltitudeM
public char symTableId
public char symbolCode
public double monitorFreq
public short offset
public XmitEncoding ctcss
public short status
public boolean showPHG
public boolean showDFS
public byte power
public byte height
public byte gain
public byte directionality
public java.lang.String freeText
public boolean useWeather
public java.lang.String[] digipeaters
public static final java.lang.String[] DIRECTIVITY
Constructor Detail |
---|
public BeaconData()
Method Detail |
---|
public byte[] getBody(boolean countTransmission, byte protocolId, AX25Frame frame)
getBody
in interface SendableMessage
countTransmission
- number of times the message has been transmitted.protocolId
- AX.25 protocol ID to generate the message in, or 0 for default protocol; currently,
only NOLVL3 (APRS) and OPENTRAC are supported.frame
- AX25Frame into which the message will be placed; the decoded message (as opposed to the byte
array encoding) should be stored into the field frame.parsedAX25Msg
AX25Frame.parsedAX25Msg
public AX25Frame[] getFrames(boolean incrementXmtCount, byte protocolId, java.lang.String senderCallsign)
getFrames
in interface AX25FrameSource
incrementXmtCount
- indicate whether the transmit counter (used to cycle through
proportional pathing) should be incrementedprotocolId
- indicate the protocol to generate this frame for (not relevant for
digipeated frames); zero to indicate current protocolsenderCallsign
- String of local callsign sending this message (may be ignored if digipeating
a message from another station)
public AX25Frame getFrame(boolean incrementXmtCount, BeaconData.BeaconType overrideType, byte protocolId)
public int getNumTransmitsBeforeDecay()
getNumTransmitsBeforeDecay
in interface AX25FrameSource
public void resetTransmitCount()
public Connector getConnector()
getConnector
in interface AX25FrameSource
Connector.CAP_XMT_PACKET_DATA
public void gpsDataUpdated(GPSDistributor distributor, GpsFix currentFix, boolean isLocal, java.lang.String source)
gpsDataUpdated
in interface GpsDataListener
distributor
- instance of the GPSDistributorcurrentFix
- current position data reported by the local GPSisLocal
- boolean true if this is GPS data for the local station, false if for a remote GPS receiversource
- String name assigned to remote GPS receiver, or null if for the local receiverpublic void satDataUpdated(GPSDistributor distributor, SatelliteCatalog satCatalog, boolean isLocal, java.lang.String source)
satDataUpdated
in interface GpsDataListener
distributor
- instance of the GPSDistributorsatCatalog
- updated SatelliteCatalog instanceisLocal
- boolean true if this is GPS data for the local station, false if for a remote GPS receiversource
- String name assigned to remote GPS receiver, or null if for the local receiverpublic void addBeaconChangeListener(BeaconChangeListener l)
l
- BeaconChangeListener to registerpublic void removeBeaconChangeListener(BeaconChangeListener l)
l
- BeaconChangeListener to unregisterpublic void writeToPreferences(java.util.prefs.Preferences root) throws java.util.prefs.BackingStoreException
root
- the Preferences node that is the base for YAAC configuration data
java.util.prefs.BackingStoreException
- if Preferences could not be updatedpublic static BeaconData readFromPreferences(java.util.prefs.Preferences root, java.lang.String beaconName) throws java.util.prefs.BackingStoreException
root
- the Preferences node that is the base for YAAC configuration databeaconName
- the String name of the beacon instance to load
java.util.prefs.BackingStoreException
- if the beacon Preferences could not be readpublic void queueNow()
public void queueForTransmission()
public void cancelTransmission()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isEnabled()
isEnabled
in interface SendableMessage
public java.lang.Object clone()
clone
in class java.lang.Object
public void copyInto(BeaconData bd, java.util.prefs.Preferences root)
bd
- target BeaconData to copy intoroot
- base Preferences object into which updated BeaconData should be saved (or null to not save)public AX25Message dup()
dup
in interface SendableMessage
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |