Package org.ka2ddo.yaac.io
Class ObjectReportSender
java.lang.Object
org.ka2ddo.yaac.io.SendableMessageWrapper
org.ka2ddo.yaac.io.ObjectReportSender
- All Implemented Interfaces:
Serializable
,SetBeaconRatesIfc
,AX25FrameSource
,TrackerListener
This class extends SendableMessageWrapper to cancel transmission when the
ObjectReport is overridden by another source (i.e., taken over).
- Author:
- Andrew Pavlin, KA2DDO
- See Also:
-
Field Summary
Fields inherited from class org.ka2ddo.yaac.io.SendableMessageWrapper
BULLETIN_SEQUENCE_CHARS
Fields inherited from interface org.ka2ddo.ax25.AX25FrameSource
NO_FRAMES
-
Constructor Summary
ConstructorDescriptionWrap an ObjectReport for locally initiated transmission as many times as the object definition says (3 times for transient objects, forever for permanent objects),ObjectReportSender
(ObjectReport msg, int maxTransmits) Wrap an ObjectReport for locally initiated transmission the specified number of times, -
Method Summary
Modifier and TypeMethodDescriptionprotected void
cleanup()
Do any cleanup work involved in removing this wrapped message from the transmission queue.void
messageAdded
(StationState ss, int index, AX25Message msg) Called when a Message is added to the history for a station in the tracker.void
messageDeleted
(StationState ss, int index, AX25Message msg) Called when a AX25Message is deleted from the history for a station in the tracker.static ObjectReportSender
readFromPreferences
(Preferences prefs, String objectName) Recreate an ObjectReport and its encapsulating ObjectReportSender from the preferences cache.void
removeFromPreferences
(Preferences prefs) Delete this ObjectReportSender and its contained ObjectReport from the preferences cache.void
stationAdded
(StationState ss, int index) Called when a new station is initially added to the tracker.void
stationDeleted
(StationState ss, int index) Called when an existing station is deleted from the tracker.void
Called when an existing station is updated with new information in the tracker.void
writeToPreferences
(Preferences prefs) Store this ObjectReportSender and its contained ObjectReport in the preferences cache.Methods inherited from class org.ka2ddo.yaac.io.SendableMessageWrapper
buildAX25FrameForMessage, cancelPermanently, cancelTransmission, computeRandomizedTransmitTime, findDuplicateWrapperOf, findWrapperOf, getConnector, getDecayRatio, getDigipeatPaths, getFrames, getId, getInitialSendRate, getLastTransmitTime, getMaxTransmits, getMsg, getNextMessage, getNumTransmissions, getNumTransmitsBeforeDecay, getObjectsInGroup, getOutstandingMessages, getQruGroupCounts, getRemainingTransmits, getSlowSendRate, isAcked, isActive, isRejected, isUseGpsForPosition, queueForTransmission, removeObsoleteMessage, removeObsoleteMessage, requeue, resetTransmitCount, setAcked, setConnector, setDecayRatio, setDigipeatPaths, setInitialSendRate, setMaxTransmits, setNextMessage, setRejected, setSendableMessageListener, setSlowSendRate, toString
-
Constructor Details
-
ObjectReportSender
Wrap an ObjectReport for locally initiated transmission as many times as the object definition says (3 times for transient objects, forever for permanent objects),- Parameters:
msg
- ObjectReport to transmit
-
ObjectReportSender
Wrap an ObjectReport for locally initiated transmission the specified number of times,- Parameters:
msg
- ObjectReport to transmitmaxTransmits
- number of times the ObjectReport should be transmitted
-
-
Method Details
-
stationAdded
Called when a new station is initially added to the tracker.- Specified by:
stationAdded
in interfaceTrackerListener
- Parameters:
ss
- StationState containing the station's information; the initial AX25Message will not yet be stored within the StationState objectindex
- zero-based integer sequence number for this station in the StationTracker
-
stationUpdated
Called when an existing station is updated with new information in the tracker.- Specified by:
stationUpdated
in interfaceTrackerListener
- Parameters:
ss
- StationState containing the station's information; the new AX25Message will not yet be stored within the StationState object
-
stationDeleted
Called when an existing station is deleted from the tracker.- Specified by:
stationDeleted
in interfaceTrackerListener
- Parameters:
ss
- StationState containing the station's informationindex
- zero-based integer sequence number for this station in the StationTracker
-
messageAdded
Called when a Message is added to the history for a station in the tracker.- Specified by:
messageAdded
in interfaceTrackerListener
- Parameters:
ss
- StationState containing the station's informationindex
- zero-based index of the message added to the StationState objectmsg
- APRS Message object being added to the tracker; note that non-APRS packets that can still be decoded (such as OpenTRAC) will also be passed here; AX25Frames that cannot be decoded will pass null here
-
messageDeleted
Called when a AX25Message is deleted from the history for a station in the tracker.- Specified by:
messageDeleted
in interfaceTrackerListener
- Parameters:
ss
- StationState containing the station's information; the AX25Message will already be removed from the StationState objectindex
- zero-based index of the message removed from the StationState objectmsg
- APRS Message object being removed from the tracker; note that non-APRS packets that can still be decoded (such as OpenTRAC) will also be passed here; AX25Frames that cannot be decoded will pass null here
-
writeToPreferences
Store this ObjectReportSender and its contained ObjectReport in the preferences cache.- Parameters:
prefs
- Preferences node to contain the object record
-
cleanup
protected void cleanup()Do any cleanup work involved in removing this wrapped message from the transmission queue.- Overrides:
cleanup
in classSendableMessageWrapper
-
removeFromPreferences
Delete this ObjectReportSender and its contained ObjectReport from the preferences cache.- Parameters:
prefs
- Preferences node containing the object record
-
readFromPreferences
Recreate an ObjectReport and its encapsulating ObjectReportSender from the preferences cache.- Parameters:
prefs
- the Preferences node containing the object informationobjectName
- String name of cached Object/Item- Returns:
- ObjectReportSender containing the restored Object
-