Next: 4.2 Data Decomposition
Up: 4 SAM Detailed Design
Previous: 4 SAM Detailed Design
  Contents
Subsections
Controller
- Description:
- The class which is initially loaded when the program runs,
and which creates an instance of the main GUI window.
- Responsibilities:
- This class is responsible for
- Creating an instance of the main GUI window class, MainWindow.
- Showing this window.
- SRS References:
- 3.2
MainWindow
- Description:
- Responsible for displaying the main window GUI and
handling any events from the main window GUI.
- Responsibilities:
- This class is responsible for
- Drawing the main window of SAM when asked to by the caller.
- Delegating sections of the screen to be stream/field/analysis/output
selectors.
- Maintaining a list of available analysis and output types that can
be performed.
- When the user selects the ``Open'' menu item, creating a
Model object (which contains the stream and data type
information) from the filename selected by the user.
- When the user selects the ``Create Log'' menu item, passing control
to a Logger class to handle the logging.
- Once the user has selected a data type/output type/stream
combination/analysis type for analysis, directing the Model module
to extract the data needed.
- Once Model has extracted the data, directing the Analysis
module to perform the chosen analysis.
- Once analysis has been performed, directing the Output
module to output the data as chosen.
- Opening the help file when the user selects the ``Help'' menu
item.
- Creating an AboutDialog class when the user selects the
``About'' menu item.
- Creating the online help in a browser when the user selects the
``Online Help'' menu item.
- Selecting/deselecting all streams when the user selects the
``Select All Streams''/``Deselect All Streams'' menu items respectively.
- Exiting the program when the user selects the ``Exit'' menu item.
- Displaying stream names as either IP addresses or domain names,
depending on whether the ``Resolve Domain Names'' menu item is not checked
or checked, respectively.
- Updating the progress bar
- SRS References:
- 3.2.1.1, 3.2.1.2, 3.2.1.3, 3.2.1.5, 3.2.1.6, 3.2.1.8,
3.2.1.9, 3.2.1.10, 5.2.1,
5.2.3, 4.3.4.5
AboutDialog
- Description:
- Displays an ``About'' dialog box.
- Responsibilities:
- This class is responsible for
- Creating a dialog box containing information about SAM.
- Displaying this dialog box when instructed.
- Hiding the dialog box when the user clicks on ``Close'' (or
equivalent).
- SRS References:
- 5.2.3
Selector
- Description:
- A generic class that creates a list selector, given a
specified container of a window, using a given list of items.
- Responsibilities:
- This class is responsible for
- Displaying to the user the given list of items in the specified
container in the calling window.
- Allowing the user to select and deselect items from the
list.
- Returning a list of the currently selected items to the caller.
- Clearing the items in the list so none are currently selected.
- Selecting all the items in the list (as a shortcut to selecting
each item manually, one by one).
- Enabling and disabling the list of items so they can or cannot be
selected by the user (ie, greying them out).
- Enabling and disabling specific list items so they can or cannot be
selected by the user (ie, greying them out).
- Changing the data displayed on screen, ensuring that any
previously selected items are still selected when the view on screen
gets changed.
- SRS References:
- 3.2.1.2, 3.2.1.3, 3.2.1.5, 3.2.1.6, 5.2.1, 5.2.3
AnalysisPluginsClass
- Description:
- Maintains a list of analysis plugins, and runs the plugin
when required.
- Responsibilities:
- This class is responsible for
- Loading all plugins found in the analysis directory
when loaded (which will include Plot Data, Mean, Variance, Spectral
Analysis, Autocorrelation, CDF and PDF at least).
- Providing a method for analysis plugins to call to register
themselves.
- Providing a list of all registered analysis plugins.
- Running an analysis plugin when requested.
- SRS References:
- 3.2.1.3, 3.2.1.8, 4.3.3.2
OutputPluginsClass
- Description:
- Maintains a list of output plugins, and runs the plugin
when required.
- Responsibilities:
- This class is responsible for
- Loading all output plugins found in the output
directory when loaded (which will include Graphing to screen and file,
and Table to screen, and Table to file at least)
- Providing a method for output plugins to call to register
themselves.
- Providing a list of all registered output plugins.
- Running an output plugin when requested.
- SRS References:
- 3.2.1.6, 3.2.1.8, 4.3.3.2
FileSelection
- Description:
- Displays a file selection dialog box to the user and
handles events associated with the file selection dialog box.
- Responsibilities:
- This class is responsible for
- Creating a standard GTK+ file opening dialog box.
- Displaying it to the user, making sure it is modal (that is, no
windows behind it may be selected while it is running).
- Returning the filename selected by the user to the calling class
- Hiding itself when directed.
- SRS References:
- 3.2.1.1
ErrorHandler
- Description:
- Displays error messages to the user.
- Responsibilities:
- This class is responsible for
- Given an error message, creating and running an error message
dialog box.
- Given a warning message, creating and running a warning message
dialog box.
- Not allowing the user to interact with the rest of SAM until he/she
acknowledges the error or warning.
- SRS References:
- 3.2.1.1, 4.4
CustomError
- Description:
- Allows classes to raise customised exceptions, other than
the built-in ones.
- Responsibilities:
- This class is responsible for
- Creating an exception, given an error message describing the
exception.
- Allowing an optional argument, isWarning, that specifies whether or
not the exception should be treated as a warning.
- Returning the value of the optional argument.
- Returning the error or warning message associated with the exception.
- SRS References:
- 4.4
Model
- Description:
- Provides an overall interface to read a loaded log file
and extract the relevant information from it, thus abstracting the input
details away from Controller.
- Responsibilities:
- This class is responsible for
- Listing the streams contained within a file.
- Listing the fields (data) contained within a file.
- Checking headers and fields of NETLOG files, and where necessary
parsing the accompanying STREAMSLOG file of a NETLOG file.
- Parsing NETLOG files of user selected fields and streams to a Table.
- SRS References:
- 3.2.1.1, 3.2.1.2, 3.2.1.5, 3.2.1.8
NetLogInput
- Description:
- Parses NETLOG files.
- Responsibilities:
- This class is responsible for
- Checking the header of a file for the fields contained in
that file, raising appropriate errors if the file given is not a
NETLOG file or is not in correct format.
- Parsing a NETLOG file to a table of user specified streams and
fields.
- SRS References:
- 3.2.1.1, 3.2.1.2, 3.2.1.5, 3.2.1.8
StreamsLogInput
- Description:
- Parses STREAMSLOG files.
- Responsibilities:
- This class is responsible for
- Checking the header of the file to ensure it is a valid STREAMSLOG
file.
- Parsing the STREAMSLOG file to a list of Stream objects.
- Adding in the aggregate stream item to the list of Streams returned.
- SRS References:
- 3.2.1.1, 3.2.1.5
Plot
- Description:
- An identity analysis plugin, which simply returns the
same table back.
- Responsibilities:
- This class is responsible for
- Returning the table given to it untouched.
- Registering with the AnalysisPlugins module, with a name
of ``No Analysis''.
- SRS References:
- 3.2.1.3a
Fourier
- Description:
- Provides an analysis plugin which takes a table of data
and returns the Fourier transform of the data, using a Fast Fourier
Transform.
- Responsibilities:
- This class is responsible for
- Ensuring the data for each field in the table is equally spaced in
time by calling LinearInterpolation.
- Transforming the data for each field in the table into the Fourier
transform of the data.
- Registering with the AnalysisPlugins module, with a name of
``Spectral Analysis''.
- SRS References:
- 3.2.1.3d
PDF
- Description:
- Provides an analysis plugin which returns the Probability
Distribution Function (PDF) for a table of data.
- Responsibilities:
- This class is responsible for
- Creating a PdfOptions class which gets the number of bins to
be used in performing PDF analysis.
- Transforming the data for each field in the table into a new field
in the table being produced which contains the PDF of the original
field.
- Registering with the AnalysisPlugins module, with a name of
``PDF''.
- SRS References:
- 3.2.1.3g, 3.2.1.4
PdfOptions
- Description:
- Gets the number of bins to be used in PDF analysis
from the user, giving default values initially.
- Responsibilities:
- This class is responsible for
- Creating a GUI dialog box and running it, waiting for user input.
- Allowing the user to enter the number of bins wanted for PDF
analysis, default to 10 bins.
- Returning the information to the caller.
- SRS References:
- 3.2.1.4
CDF
- Description:
- Provides an analysis plugin which returns the Cumulative
Distribution Function (CDF) for a table of data.
- Responsibilities:
- This class is responsible for
- Creating a CdfOptions class which gets the number of bins to
be used in performing CDF analysis.
- Transforming the data for each field in the table into a new field
in the table being produced which contains the CDF of the original
field.
- Registering with the AnalysisPlugins module, with a name of
``CDF''.
- SRS References:
- 3.2.1.3f, 3.2.1.4
CdfOptions
- Description:
- Gets the number of bins to be used in CDF analysis from
the user, giving default values initially.
- Responsibilities:
- This class is responsible for
- Creating a GUI dialog box and running it, waiting for user input.
- Allowing the user to enter the number of bins wanted for CDF
analysis, default to 10 bins.
- Returning the information to the caller.
- SRS References:
- 3.2.1.4
LinearInterpolation
- Description:
- Provides an analysis plugin which returns the
linear interpolation of a table of data, to be used by AutoCorrelation
and Fourier.
- Responsibilities:
- This class is responsible for
- If the time intervals of the data given are not equal, linearly
interpolating the data so that the data values are equally spaced in time.
- If the time intervals of the data given are equally spaced in time,
returning the same table of data.
- Registering with the AnalysisPlugins module, with a name of
``LinearInterpolation''.
- SRS References:
- 3.2.1.3d, 3.2.1.3e
AutoCorrelation
- Description:
- Provides an analysis plugin which returns the
AutoCorrelation of a table of data.
- Responsibilities:
- This class is responsible for
- Ensuring the data for each field in the table is equally spaced in
time by calling LinearInterpolation.
- Transforming the data for each field in the table given into a new
table which holds the AutoCorrelation coefficients of the original fields.
- Registering with the AnalysisPlugins module, with a name of
``AutoCorrelation''.
- SRS References:
- 3.2.1.3e
Mean
- Description:
- Provides an analysis plugin which returns the mean of a
table of data.
- Responsibilities:
- This class is responsible for
- Transforming the data for each field in the table given into a new
field in the table being produced which contains the mean of the original
field.
- Registering with the AnalysisPlugins module, with a name of
``Mean''.
- SRS References:
- 3.2.1.3b
Variance
- Description:
- Provides an analysis plugin which returns the variance of a
table of data.
- Responsibilities:
- This class is responsible for
- Transforming the data for each field in the table given into a new
field in the table being produced which contains the variance of the
original field.
- Registering with the AnalysisPlugins module, with a name of
``Variance''.
- SRS References:
- 3.2.1.3c
ScreenTable
- Description:
- An output plugin which displays a table to the user as a
table using a GUI window.
- Responsibilities:
- This class is responsible for
- Displaying a table to the user in a separate GUI
window.
- Registering with the OutputPlugins module with the name
``Table to screen''.
- Allowing the user to set any options for the table.
- SRS References:
- 3.2.1.6c, 5.2.2
OutputToFile
- Description:
- An output plugin which writes a table to a file.
- Responsibilities:
- This class is responsible for
- Writing a file containing all the values in the table produced
by the Analysis module.
- Registering with the OutputPlugins module with the
name ``Text File''.
- Creating a GUI which allows the user to set any options,
including filename and delimiter.
- SRS References:
- 3.2.1.6d, 3.2.1.7
GraphGui
- Description:
- An output plugin which either displays a graph on the
screen, saves it to a file, or outputs the gnuplot commands used to draw the
graph along with any necessary data.
- Responsibilities:
- This class is responsible for
- Creating a graph of the values in the table produced by the
Analysis module.
- Creating a GUI which allows the user to set any options
relating to the graph - title, axes labels, line styles, any extra
gnuplot commands, and whether to graph to screen
or to a file or to output a gnuplot file along with the relevant data
files.
- SRS References:
- 3.2.1.6a, 3.2.1.6b, 3.2.1.7, 3.2.2.2, 5.2.2
Logger
- Description:
- Provides user interface and control for the Logger
Module.
- Responsibilities:
- This class is responsible for
- Receiving user settings for packet capturing.
- Displaying current packet capturing settings.
- Beginning logging at the user's request.
- Allowing the user to select a filename to dump the log to.
- Allowing the user to select the fields they wish to log.
- Allowing the user to select a network interface to collect
packets from.
- Allowing the user to select or deselect all fields, with one
click
- Allowing the user to specify the interval at which data is
dumped as either:
- Number of Packets
After a certain number of packets have been collected since the
last dump, data may be logged.
- Elapsed Time
After a certain amount of time has passed since the last dump,
data may be logged. Allowed time intervals are 100 ms, and any
multiple of 100 ms up to 1 hour.
- SRS References:
- 3.2.1.9a, 3.2.1.9b, 3.2.1.9c, 3.2.1.9d, 3.2.1.9e,
5.2.3
MonitorLogging
- Description:
- Updates the status window while logging occurs.
- Responsibilities:
- This class is responsible for
- Updating the number of packets which have been logged. This will
be updated once every second.
- Creating a new thread to perform its tasks in.
- SRS References:
- 3.2.1.9e
Next: 4.2 Data Decomposition
Up: 4 SAM Detailed Design
Previous: 4 SAM Detailed Design
  Contents