|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ka2ddo.yaac.core.SnifferDataModel
public final class SnifferDataModel
This class maintains a list of all messages heard by the application.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.ka2ddo.yaac.util.ClearableTableModel |
---|
ClearableTableModel.ClearType |
Field Summary | |
---|---|
static Connector |
LOGFILE_PLAYBACK_CONNECTOR
Bogus Connector instance used to identify historical packets loaded from a log file. |
Constructor Summary | |
---|---|
SnifferDataModel()
Create the singleton SnifferDataModel that collects incoming packet traffic for tabular display. |
Method Summary | |
---|---|
void |
addSnifferDataListener(SnifferDataListener l)
Register a SnifferDataListener. |
void |
aprsMessageReceived(Message msg)
Delivers the next packet received by YAAC that is an APRS message. |
void |
consumeAX25Frame(AX25Frame frame,
Connector connector)
|
int |
deleteAllRows(ClearableTableModel.ClearType clearType)
Delete all rows from this table. |
void |
exportMessages(java.io.OutputStream o,
PacketExportMode exportMode,
boolean saveAll)
Export packets passing the current filters in the SnifferDataModel to a file in the specified file format. |
PacketExportMode |
getLoggerFormat()
Get the current format for AX.25 message logging. |
AX25Frame |
getMessage(int rowIndex)
Get the Nth packet stored in the SnifferDataModel. |
int |
getRowCount()
Get the number of packets currently stored in the SnifferDataModel. |
void |
importMessages(java.io.InputStream in,
PacketExportMode exportMode,
int scaleFactor,
StatusListener statusListener,
long fileSize,
Filter filter)
Import a file of AX.25 frames in any of three formats into YAAC. |
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 |
removeSnifferDataListener(SnifferDataListener l)
Unregister a SnifferDataListener. |
void |
run()
Do not call. |
void |
setLoggerFormat(PacketExportMode pem)
Set the format for AX.25 message logging. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Connector LOGFILE_PLAYBACK_CONNECTOR
Constructor Detail |
---|
public SnifferDataModel()
Method Detail |
---|
public int getRowCount()
public void addSnifferDataListener(SnifferDataListener l)
l
- SnifferDataListener to registerpublic void removeSnifferDataListener(SnifferDataListener l)
l
- SnifferDataListener to unregisterpublic void consumeAX25Frame(AX25Frame frame, Connector connector)
consumeAX25Frame
in interface AX25FrameListener
public 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 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 run()
run
in interface java.lang.Runnable
public void importMessages(java.io.InputStream in, PacketExportMode exportMode, int scaleFactor, StatusListener statusListener, long fileSize, Filter filter) throws java.io.IOException
in
- InputStream to read the file data fromexportMode
- expected format of the data streamscaleFactor
- the speed-up factor for simulated playback, or zero for as-fast-as-possiblestatusListener
- StatusListener to receive file reading progress reports, or null if not desiredfileSize
- total length of file being read infilter
- Filter to use to discard unwanted messages, or null to keep all messages
java.io.IOException
- if file reading fails for an unexpected reasonpublic void exportMessages(java.io.OutputStream o, PacketExportMode exportMode, boolean saveAll) throws java.io.IOException
o
- OutputStream to write the file data toexportMode
- PacketExportMode specifying the format of the saved packet datasaveAll
- boolean true if filters should be ignored and all currently held packets should be saved
java.io.IOException
- if packets could not be written to the stream for any reasonpublic AX25Frame getMessage(int rowIndex)
rowIndex
- zero-based index of the AX25Frame to return
java.lang.IndexOutOfBoundsException
- if rowIndex is not in range of the available framespublic PacketExportMode getLoggerFormat()
public void setLoggerFormat(PacketExportMode pem)
pem
- PacketExportMode to usepublic int deleteAllRows(ClearableTableModel.ClearType clearType)
deleteAllRows
in interface ClearableTableModel
clearType
- type of rows to delete
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |