📄 visualize2.tex
字号:
\documentclass[a4paper,11pt,titlepage]{article}\usepackage[english]{babel}\usepackage[T1]{fontenc}\usepackage[dvips]{graphicx}\title{Semester Project Report : \\ \Huge \textbf{Extension of the Graphical User Interface for the LCM Software Radio}}\author{Porchet~Vincent \\ 3th year Computing Science Section Student\\ Mobile Communication Labotory \\ \textbf{Supervisor} : Linus~Gasser \textbf{Teacher} : Bixio~Rimoldi}\begin{document}\maketitle\tableofcontents\listoffigures\pagebreak\section{Introduction}In this chapter, we have a look at the LCM Software Radio and the goal of this project.\subsection{LCM Software Radio}A good and short definition for the software radio project is given in the reportof Ferreiro and Braure \cite{rep} : \begin{quote}The \emph{{}``Laboratoire de communication Mobile (LCM) SoftwareRadio''} Test-bed is a project with the objective of designing andimplementing a real-time software platform to validate advanced mobilecommunication signal processing algorithm. \end{quote}It's an important and large project working in two modes : \begin{enumerate}\item in real-time mode, with real ``on the air'' communications \item in simulation mode, with a simulated channel\end{enumerate}Seen from the GUI, the LCM Software Radio does basically two things\cite{rep} : \begin{enumerate}\item Load the software radio core components. The information related tothese elements is stored in the folder \texttt{cdb/} (\texttt{classdatabase}) of the \texttt{sradio/} root directory. \item Load as many \emph{instantiated} classes (subsystem) from \texttt{cdb}as we want into the radio system. The subsystem is composed by a listof \textbf{S}ignal \textbf{P}rocessing \textbf{C}lasses (\textbf{SPC}).We name SPC elements \textbf{modules} in the report. The informationrelated to the subsystem is stored in the folder \texttt{sdb/} (\texttt{subsystemdatabase}) \end{enumerate}The whole information we need is contained in the \texttt{sdb} directory.I name the SPC elements \textbf{modules} like my predecessors and write \textbf{sr} for \textbf{software radio} in the report.\subsection{The Project}\subsubsection{The GUI at the Beginning}The GUI parses and exracts the data generated from the \emph{LCM SR},builds the GUI information with : modules, interconnections modulesinformatio and shows them.\\It uses a data structure of the \emph{LCM SR} which is described in the report fromFerreiro and Braure \cite{rep} and which I briefly recalle here : \begin{itemize}\item For each module in the SR, the \texttt{sdb/} directory contains a sub-directory. In each of these sub-directories, we have files thatcontain some information with respect to this module (i.e. \texttt{name} contains the name ofthe module or \texttt{stats} contains the statistics related withthe module). \item We have the following C++ classes : \begin{description}\item [Module~:]Is an instance of an SPC and contains all informationrelated with this particular instance. \item [IOLink~:]Represents input/output links that connect modulestogether. \item [Block~:]This class represents a block of data thatis load into memory and plotted. \item [Port~:]Subclass of block that initializes an I/O port \item [Stats~:]Second subclass of block, implementing statistics data. \item [ModuleGenerator~:]The object that browses through the filesystem and creates the modules to appended it to the mapper's module list. \item [Mapper~:]The mapper's task is to take care of displaying the moduleson the GUI and has the responsibility to draw them with their links.\item [Controller~:]The controller is the entity that control the refreshand which redraws the data. \item [Interface~:]The graphical interface's main part. \item [CanvasView~:]The class that handles the mouse events. \item [Show~:]Is used to display some statistics data or the output of amodule. \end{description}\end{itemize}%\begin{figure}[htbp]\begin{center}\includegraphics[ width=13cm]{oldGraphical.eps}\caption{Simplified UML class diagram showing the classesrelated to the graphical part (from \cite{rep}) at the beginning}\label{old1}\end{center}\end{figure}%\begin{figure}[htbp]\begin{center}\includegraphics[ width=13cm]{oldControl.eps}\caption{Simplified UML class diagram showing the classesrelated to the SR data (from \cite{rep}) at the beginning}\label{old2}\end{center}\end{figure}The figures \ref{old1} and \ref{old2} show how the modules are linked andrelated to the SR data and graphical part.\\ With this structure, the GUI draws and connects the module, shows informationabout the modules and plot data (with the GUI).\subsubsection{The Goal}The tasks was to implement the following features : \begin{itemize}\item Add a tab-bar to show more that one SR instance at the same time(in simulation mode). \item Change the configuration of the SR using the GUI (in real-time and simulation). \item Export graphics (done by show) in \texttt{.ps} (\texttt{postscript})and \texttt{.m} (\texttt{matlab}) format. \item Create (and export) new plot with two statistics from one or two modules (selected with the GUI). \item Draw a timed graphic using one selected statistics . \end{itemize}The implementation is done with the \emph{Qt toolkit}\section{The Tab-Bar's Creation}It was the first part, easy to implement, but I discovereed the Qt library and the existing GUI.\\\subsection{The Idea}With the simulation mode of the SR, we can have multiple radios on thesame machine. With the tab-bar we can show multiple views in the same windowand thus increase the user-friendlyieness.\\ The tab-bar is useful only when the user wants to test more than oneSR at the same time. I choose to implement four possibilities : \begin{enumerate}\item the user gives a \texttt{sdb} path (no tab-bar, only one path) \item the GUI finds a real-time SR (no tab-bar) \item the GUI finds in \texttt{/tmp/} directory at least one \texttt{proc.\#}directory (tab-bar with a tab for each \texttt{proc.\#} directory) \item the user doesn't give a \texttt{sdb} path and the GUI doesn't find anything(no tab and no SR) \end{enumerate}\subsection{Classes and Control Flow}To implement these possibilities, I modified the class \texttt{Interface}and created a class \texttt{RadioView}. \texttt{Interface} inheritsalways from \texttt{QMainWindow} but doesn't contain a \texttt{CanvasView}and does't create a \texttt{Controller}. Depending on the four possibilities discussed in 2.1, the \texttt{Interface} creates: \begin{enumerate}\item a \texttt{RadioView}\item a \texttt{RadioView}\item a \texttt{tab-bar} that is an instance of \texttt{QTabWidget} and has a tab that contains a \texttt{RadioView}for each configuration \item a \texttt{label} that is an instance of \texttt{QLabel}\end{enumerate}The \texttt{RadioView} creates the \texttt{Controller} andcontains the \texttt{CanvasView}. \texttt{RadioView} inherits from\texttt{QWidget}.\\ The \texttt{Interface} keeps the control on the \texttt{tab} and givesthe update control to the \texttt{Controller} (as before) but throughthe \texttt{tab-bar} and the \texttt{RadioView}. Each \texttt{radioView}is created independently of the other with its own \texttt{Contoller},but only the visible \texttt{tab} is updated.\\ The figure \ref{graphicaltab} and \ref{controltab} show how theadditional classes are inserted and their relations with the graphicalpart and SR data.%\begin{figure}[htbp]\begin{center}\includegraphics[ width=13cm]{newGraphical.eps}\caption{Simplified UML classes diagram showing the classrelated to the graphical part after the implementation of the tab-bar}\label{graphicaltab}\end{center}\end{figure}%\begin{figure}[htbp]\begin{center} \includegraphics[scale=1.75]{newControl.eps}\caption{Simplified UML classes diagram showing the classrelated to the SR data after the implementation of the tab-bar (theadditional part only)}\label{controltab}\end{center}\end{figure}\section{Changing the Configuration}The configuration of the SR modules can be changed. In this partwe show how to do that with the GUI. \\\subsection{The Idea}The task is to read the actual configuration from the file-system. Then we have to create a window with all the parameters of the module and initialize them with the actual values. Any change has to be written back to the SR.\subsection{Classes and Control Flow}I create two new classes to do this job: \texttt{ConfWind} and \texttt{Config}. I modified the \texttt{ModuleGenerator}: when the \texttt{ModuleGenerator} creates a module, it creates (with \texttt{getConfigFile}) a \texttt{config} list (each \texttt{config}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -