public class Digipeater extends java.lang.Object implements AX25FrameListener, AprsMessageListener, ParsedAX25MessageListener
Modifier and Type | Class and Description |
---|---|
static class |
Digipeater.BlacklistMask
Class specifying the specific level of blacklisting for a particular callsidn-SSID.
|
static class |
Digipeater.TXIGatedStationStatus
Status of stations trying to RF-transmit through this station from the Internet.
|
static interface |
Digipeater.TXIGatedStationStatusListener
Interface for listeners to be informed of changes to the list of Tx I-gated stations.
|
Modifier and Type | Field and Description |
---|---|
java.util.LinkedHashMap<java.lang.String,Digipeater.BlacklistMask> |
listOfBlacklistedStations
List of callsigns on the sender's blacklist (do not digipeat or I-gate).
|
java.util.ArrayList<Digipeater.TXIGatedStationStatus> |
listOfTXIGatedStations
List of stations currently being forwarded from the Internet to local RF networks by this station.
|
Modifier and Type | Method and Description |
---|---|
void |
addDuplicateCheckedAX25Listener(DuplicateCheckedAX25Listener l)
Register a listener to be informed of receipt of AX25Messages who wants to know if the frame is a duplicate.
|
int |
addToBlacklist(java.lang.String callsign)
Add a callsign to the blacklist.
|
void |
addTXIGatedStationStatusListener(Digipeater.TXIGatedStationStatusListener l)
Register a listener to be informed when a station is added, updated, or removed from the
list of stations that this station will Tx I-gate to.
|
void |
aprsMessageReceived(Message msg)
DO NOT CALL.
|
void |
consumeAX25Frame(AX25Frame frame,
Connector connector)
DO NOT CALL.
|
Digipeater.BlacklistMask |
getBlacklist(java.lang.String callsign)
Get the blacklist information for a callsign-SSID.
|
int |
getCountDigiFromIgateToRf()
Report the number of APRS messages forwarded by this station from APRS-IS to RF.
|
static Digipeater |
getInstance()
Get the singleton instance of the digipeater logic.
|
static long |
getMaxAgeForLocal()
Get the maximum age of RF-received messages that will be considered in deciding if a station is local.
|
static int |
getMaxHopsForLocal()
Get the maximum number of hops to be considered a "local" station.
|
static java.lang.String |
getSupplementalTxIGateFilterExpression()
Get the current supplemental Tx I-Gate filter expression.
|
boolean |
isAllowVirtualDigipeatsForHF()
Reports if HF packets without digipeat paths may be retransmitted through VHF RF ports.
|
boolean |
isBlacklisted(java.lang.String callsign)
Test if the specified callsign is on the blacklist.
|
boolean |
isBlacklisted(java.lang.String callsign,
int reasonMask)
Test if the specified callsign is on the blacklist for a specific reason.
|
boolean |
isDoRxIGate()
Reports if RF-to-IP packet gating is allowed.
|
boolean |
isDoTxIGate()
Reports if IP-to-RF packet gating is allowed.
|
void |
parsedAX25MessageReceived(byte pid,
AX25Message msg)
Delivers the next message received by YAAC that is some sort of parsed AX.25 higher-level message.
|
void |
rememberLocallyOriginatedMessage(AX25Frame frame)
Record in the short-term memory that the specified frame has been locally
originated by this station and should not be digipeated again.
|
void |
removeDuplicateCheckedAX25Listener(DuplicateCheckedAX25Listener l)
Unregister a listener who no longer wants to be informed of receipt of AX25Messages.
|
int |
removeFromBlacklist(java.lang.String callsign)
Remove a callsign from the blacklist.
|
void |
removeTXIGatedStationStatusListener(Digipeater.TXIGatedStationStatusListener l)
Unregister a listener who no longer want to be informed when a station is added, updated, or removed from the
list of stations that this station will Tx I-gate to.
|
void |
setAllowVirtualDigipeatsForHF(boolean allowVirtualDigipeatsForHF)
Specifies if HF packets without digipeat paths may be retransmitted through VHF RF ports.
|
void |
setDoRxIGate(boolean doRxIGate)
Specify if RF-to-IP packet gating is allowed.
|
void |
setDoTxIGate(boolean doTxIGate)
Specify if IP-to-RF packet gating is allowed.
|
static void |
setMaxAgeForLocal(long maxAgeForLocal)
Set the maximum age of RF-received messages that will be considered in deciding if a station is local.
|
static void |
setMaxHopsForLocal(int maxHopsForLocal)
Set the maximum number of hops to be considered a "local" station.
|
void |
setSupplementalTxIGateFilterExpression(java.lang.String suppFilterExpr)
Set the current supplemental Tx I-Gate filter expression.
|
int |
updateBlacklist(java.lang.String callsign)
Update the persisted blackist settings for a callsign.
|
public final java.util.ArrayList<Digipeater.TXIGatedStationStatus> listOfTXIGatedStations
public final java.util.LinkedHashMap<java.lang.String,Digipeater.BlacklistMask> listOfBlacklistedStations
public static Digipeater getInstance()
public boolean isDoRxIGate()
public void setDoRxIGate(boolean doRxIGate)
doRxIGate
- boolean true if RF-to-IP packet gating is allowedpublic boolean isDoTxIGate()
public void setDoTxIGate(boolean doTxIGate)
doTxIGate
- boolean true if IP-to-RF packet gating is allowedpublic boolean isAllowVirtualDigipeatsForHF()
public void setAllowVirtualDigipeatsForHF(boolean allowVirtualDigipeatsForHF)
allowVirtualDigipeatsForHF
- boolean true if HF-to-VHF virtual digipeat is allowedpublic static int getMaxHopsForLocal()
public static void setMaxHopsForLocal(int maxHopsForLocal)
maxHopsForLocal
- maximum hop count where 1 is direct (not digipeated), 2 is digipeated once, etc.public static long getMaxAgeForLocal()
public static void setMaxAgeForLocal(long maxAgeForLocal)
maxAgeForLocal
- maximum acceptable age in millisecondspublic static java.lang.String getSupplementalTxIGateFilterExpression()
public void setSupplementalTxIGateFilterExpression(java.lang.String suppFilterExpr) throws java.text.ParseException
suppFilterExpr
- String of filter expression, or null if not authorizing extra Tx I-Gate trafficjava.text.ParseException
- if filter expression has a syntax error or is otherwise undecodeablepublic int addToBlacklist(java.lang.String callsign)
callsign
- String of callsignpublic int updateBlacklist(java.lang.String callsign)
callsign
- String of callsignpublic Digipeater.BlacklistMask getBlacklist(java.lang.String callsign)
callsign
- String callsign-SSID of the station to check for blacklist infopublic int removeFromBlacklist(java.lang.String callsign)
callsign
- String of callsignpublic boolean isBlacklisted(java.lang.String callsign)
callsign
- String callsign to testpublic boolean isBlacklisted(java.lang.String callsign, int reasonMask)
callsign
- String callsign to testreasonMask
- int bitmask of reason why this station should not be processedDigipeater.BlacklistMask.MASK_BLOCK_DIGIPEAT
,
Digipeater.BlacklistMask.MASK_BLOCK_ICONNECT
,
Digipeater.BlacklistMask.MASK_BLOCK_QUERY
,
Digipeater.BlacklistMask.MASK_BLOCK_RXIGATE
,
Digipeater.BlacklistMask.MASK_BLOCK_TXIGATE
public void rememberLocallyOriginatedMessage(AX25Frame frame)
frame
- AX25Frame to be rememberedpublic void aprsMessageReceived(Message msg)
aprsMessageReceived
in interface AprsMessageListener
msg
- some subclass of Message containing the message contents; the message should have
an AX25Frame connected to itAX25Frame
,
AX25Message.ax25Frame
,
AX25Message.getAx25Frame()
public void consumeAX25Frame(AX25Frame frame, Connector connector)
consumeAX25Frame
in interface AX25FrameListener
frame
- AX25Frame to consider digipeatingconnector
- Connector that frame was received frompublic void parsedAX25MessageReceived(byte pid, AX25Message msg)
parsedAX25MessageReceived
in interface ParsedAX25MessageListener
pid
- AX.25 protocol IDmsg
- some subclass of Message containing the message contents; the message should have
an AX25Frame connected to itAX25Frame
,
AX25Message.ax25Frame
,
AX25Message.getAx25Frame()
public void addDuplicateCheckedAX25Listener(DuplicateCheckedAX25Listener l)
l
- DuplicateCheckedAX25Listenerpublic void removeDuplicateCheckedAX25Listener(DuplicateCheckedAX25Listener l)
l
- DuplicateCheckedAX25Listenerpublic int getCountDigiFromIgateToRf()
public void addTXIGatedStationStatusListener(Digipeater.TXIGatedStationStatusListener l)
l
- TXIGatedStationStatusListenerpublic void removeTXIGatedStationStatusListener(Digipeater.TXIGatedStationStatusListener l)
l
- TXIGatedStationStatusListener