public class StatusData extends java.lang.Object implements AX25FrameSource, java.lang.Cloneable, SendableMessage, SetBeaconRatesIfc
Modifier and Type | Field and Description |
---|---|
int |
decayRatio
Decay ratio when slowing down the beacon; should be 2 or 3.
|
java.lang.String[] |
digipeaters
Specify the digipeater path or paths (if proportional pathing is being used) for
transmitting this status message over RF.
|
boolean |
enabled
Flag indicating whether this status information should be transmitted.
|
boolean |
enableMeteorMode
Enable meteor-scatter mode, where the status packet is transmitted repeatedly at maximum speed until
the timeslot is over.
|
java.lang.String |
format
The textual body content of the status message.
|
int |
initialRateSecs
Initial transmit interval for this beacon in seconds.
|
boolean |
prefixMaidenhead
Specify whether the local status's current position should be prefixed to the status text
in Maidenhead format.
|
boolean |
prefixTime
Specify whether the current time should be prefixed to the status text.
|
int |
slowRateSecs
Slow stable transmit rate for non-changing station, in seconds.
|
char |
symbolCode
The APRS symbol code for this station's symbol.
|
char |
symTableId
The APRS symbol table ID for this station's symbol; this may be an overlay character.
|
NO_FRAMES
Constructor and Description |
---|
StatusData() |
Modifier and Type | Method and Description |
---|---|
void |
cancelTransmission()
Cancel future periodic transmissions of this StatusData.
|
java.lang.Object |
clone()
Creates and returns a copy of this object.
|
void |
copyInto(StatusData sd,
java.util.prefs.Preferences root)
Copy the contents of this StatusData object into the specified one, and tell the other one that
it was changed if any changes occur.
|
void |
disableForTransmit()
Specify that message should no longer be transmitted.
|
AX25Message |
dup()
Creates and returns a copy of this StatusData as a Message.
|
byte[] |
getBody(boolean countTransmission,
ProtocolFamily protocolId,
AX25Frame frame)
Get an instance of this message, suitable for transmitting.
|
Connector |
getConnector()
Specify the Connector this message should be transmitted through.
|
int |
getDecayRatio()
Get the scaling factor by which the message repeat interval is enlarged
(until the default slow send rate is reached).
|
AX25Frame[] |
getFrames(boolean incrementXmtCount,
ProtocolFamily protocolId,
java.lang.String senderCallsign)
Get one or more AX25Frames of the data to transmit.
|
int |
getInitialSendRate()
Get the time interval between retransmissions when a message is newly
introduced into the system.
|
int |
getNumTransmitsBeforeDecay()
Get the number of cycles for a complete iteration over the proportional pathing digipeat path set.
|
int |
getSlowSendRate()
The slowest rate a message should be sent.
|
boolean |
isEnabled()
Test if message should still be transmitted.
|
boolean |
isUseGpsForPosition()
Indicate whether status data source can dynamically change its position (latitude/longitude),
such as for a mobile station with a GPS.
|
void |
queueForTransmission()
Queue the next transmission of this StatusData.
|
void |
queueNow()
Force this StatusData to be transmitted immediately.
|
static StatusData |
readFromPreferences(java.util.prefs.Preferences root,
java.lang.String beaconName)
Create a StatusData for the specified name from the information saved in the Java Preferences tree.
|
void |
resetTransmitCount()
Reset the counters used to calculate the transmission interval so that status will initially
be transmitted frequently at the fast rate.
|
void |
setDecayRatio(int decayRatio)
Set the scaling factor by which the message repeat interval is enlarged
(until the default slow send rate is reached).
|
void |
setInitialSendRate(int initialSendRate)
Set the time interval between retransmissions when a message is newly
introduced into the system.
|
void |
setSlowSendRate(int slowSendRate)
Set the slowest rate a message should be sent.
|
void |
writeToPreferences(java.util.prefs.Preferences root)
Store the contents of this record in a Java Preferences node.
|
public java.lang.String format
Macros
object.public boolean enabled
public boolean prefixMaidenhead
public char symTableId
public char symbolCode
public boolean prefixTime
public java.lang.String[] digipeaters
public int initialRateSecs
public int decayRatio
public int slowRateSecs
public boolean enableMeteorMode
public AX25Message dup()
dup
in interface SendableMessage
public AX25Frame[] getFrames(boolean incrementXmtCount, ProtocolFamily 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)senderCallsign
- String of local callsign sending this message (may be ignored if digipeating
a message from another station)public int getNumTransmitsBeforeDecay()
getNumTransmitsBeforeDecay
in interface AX25FrameSource
public Connector getConnector()
getConnector
in interface AX25FrameSource
Connector.CAP_XMT_PACKET_DATA
public boolean isUseGpsForPosition()
isUseGpsForPosition
in interface SetBeaconRatesIfc
public byte[] getBody(boolean countTransmission, ProtocolFamily protocolId, AX25Frame frame)
getBody
in interface SendableMessage
countTransmission
- number of times the message has been transmitted.protocolId
- ProtocolFamily to generate the message inframe
- 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.parsedAX25MsgAX25Frame.parsedAX25Msg
public boolean isEnabled()
isEnabled
in interface SendableMessage
public void disableForTransmit()
disableForTransmit
in interface SendableMessage
public void writeToPreferences(java.util.prefs.Preferences root) throws java.util.prefs.BackingStoreException
root
- Preferences node of the base of the application's Preferences treejava.util.prefs.BackingStoreException
- if data could not be saved to Preferences backing storagepublic static StatusData readFromPreferences(java.util.prefs.Preferences root, java.lang.String beaconName) throws java.util.prefs.BackingStoreException
root
- Preferences node of the base of the application's Preferences treebeaconName
- String name of specific StatusDate variantjava.util.prefs.BackingStoreException
- if Preferences data could not be read for some reasonpublic void queueNow()
public void queueForTransmission()
public void cancelTransmission()
public void resetTransmitCount()
public int getDecayRatio()
getDecayRatio
in interface SetBeaconRatesIfc
public void setDecayRatio(int decayRatio)
setDecayRatio
in interface SetBeaconRatesIfc
decayRatio
- int decay ratio (should be 2 or 3)public int getInitialSendRate()
getInitialSendRate
in interface SetBeaconRatesIfc
public void setInitialSendRate(int initialSendRate)
setInitialSendRate
in interface SetBeaconRatesIfc
initialSendRate
- send interval in secondspublic int getSlowSendRate()
getSlowSendRate
in interface SetBeaconRatesIfc
public void setSlowSendRate(int slowSendRate)
setSlowSendRate
in interface SetBeaconRatesIfc
slowSendRate
- transmission interval in secondspublic java.lang.Object clone()
clone
in class java.lang.Object
public void copyInto(StatusData sd, java.util.prefs.Preferences root)
sd
- target StatusData to copy intoroot
- base Preferences object into which updated StatusData should be saved (or null to not save)