Class TelemetryModel

java.lang.Object
javax.swing.table.AbstractTableModel
org.ka2ddo.yaac.gui.TelemetryModel
All Implemented Interfaces:
Serializable, TableModel, TrackerListener, FilterChangeListener

public class TelemetryModel extends AbstractTableModel implements TrackerListener, FilterChangeListener
This class extracts the background data for reporting current telemetry data from telemetering stations. Each report consists of 2 rows with 14 columns. The first row contains the station-specific column titles (from the PARMS message). The second row contains the station callsign, the 5 scaled analog values, and the 8 boolean bits.
Author:
Andrew Pavlin, KA2DDO
See Also:
  • Constructor Details

    • TelemetryModel

      public TelemetryModel()
  • Method Details

    • isShowEveryonesTelemetry

      public boolean isShowEveryonesTelemetry()
      Report whether all telemetry or just filtered telemetry should be shown.
      Returns:
      boolean true if all telemetering stations should be displayed, false if only filter-passing stations should be shown
    • setShowEveryonesTelemetry

      public void setShowEveryonesTelemetry(boolean showEveryonesTelemetry)
      Specify whether all telemetry or just filtered telemetry should be shown.
      Parameters:
      showEveryonesTelemetry - boolean true if all telemetering stations should be displayed, false if only filter-passing stations should be shown
    • getTelemetryStationCount

      public int getTelemetryStationCount()
      Get the number of monitored stations currently sending telemetry data.
      Returns:
      station count
    • getColumnName

      public String getColumnName(int column)
      Returns the localized name for the column.
      Specified by:
      getColumnName in interface TableModel
      Overrides:
      getColumnName in class AbstractTableModel
      Parameters:
      column - the column being queried
      Returns:
      a string containing the name of column
    • getColumnCount

      public int getColumnCount()
      Returns the number of columns in the model.
      Specified by:
      getColumnCount in interface TableModel
      Returns:
      the number of columns in the model
      See Also:
    • getRowCount

      public int getRowCount()
      Returns the number of rows in the model. A JTable uses this method to determine how many rows it should display. This method should be quick, as it is called frequently during rendering.
      Specified by:
      getRowCount in interface TableModel
      Returns:
      the number of rows in the model
      See Also:
    • getValueAt

      public Object getValueAt(int rowIndex, int columnIndex)
      Returns the value for the cell at columnIndex and rowIndex.
      Specified by:
      getValueAt in interface TableModel
      Parameters:
      rowIndex - the row whose value is to be queried
      columnIndex - the column whose value is to be queried
      Returns:
      the value Object at the specified cell
    • messageAdded

      public void messageAdded(StationState ss, int index, AX25Message msg)
      Called when a Message is added to the history for a station in the tracker.
      Specified by:
      messageAdded in interface TrackerListener
      Parameters:
      ss - StationState containing the station's information
      index - zero-based index of the message added to the StationState object
      msg - APRS Message object being added to the tracker; note that non-APRS packets
    • messageDeleted

      public void messageDeleted(StationState ss, int index, AX25Message msg)
      Called when a AX25Message is deleted from the history for a station in the tracker.
      Specified by:
      messageDeleted in interface TrackerListener
      Parameters:
      ss - StationState containing the station's information; the AX25Message will already be removed from the StationState object
      index - zero-based index of the message removed from the StationState object
      msg - 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
    • stationAdded

      public void stationAdded(StationState ss, int index)
      Called when a new station is initially added to the tracker.
      Specified by:
      stationAdded in interface TrackerListener
      Parameters:
      ss - StationState containing the station's information; the initial AX25Message will not yet be stored within the StationState object
      index - zero-based integer sequence number for this station in the StationTracker
    • stationUpdated

      public void stationUpdated(StationState ss)
      Called when an existing station is updated with new information in the tracker.
      Specified by:
      stationUpdated in interface TrackerListener
      Parameters:
      ss - StationState containing the station's information; the new AX25Message will not yet be stored within the StationState object
    • stationDeleted

      public void stationDeleted(StationState ss, int index)
      Called when an existing station is deleted from the tracker.
      Specified by:
      stationDeleted in interface TrackerListener
      Parameters:
      ss - StationState containing the station's information
      index - zero-based integer sequence number for this station in the StationTracker
    • removeTableModelListener

      public void removeTableModelListener(TableModelListener l)
      Removes a listener from the list that's notified each time a change to the data model occurs.
      Specified by:
      removeTableModelListener in interface TableModel
      Overrides:
      removeTableModelListener in class AbstractTableModel
      Parameters:
      l - the TableModelListener
    • filterSettingsChanged

      public void filterSettingsChanged(Filter changedFilter, boolean changedByUser)
      Called when the specified Filter's matching criteria have been changed.
      Specified by:
      filterSettingsChanged in interface FilterChangeListener
      Parameters:
      changedFilter - Filter that has changed
      changedByUser - boolean true if change was manually made by user, false if