%% =========================================================================== % Copyright (C) 1998,99 by Telia Research AB, Lulea, Sweden; All rights reserved. % % Description : Main simulation program with graphical user interface. % % File : uiMain.m % Project : FSAN duplex model % Author(s) : Tomas Nordstrom (Tomas.B.Nordstrom@Telia.se) % : % % CVS: $Id: uiMain.m,v 1.23 1999/03/31 13:15:30 tono Exp $ %% =========================================================================== %% =========================================================================== % Change History % 1998-11-12 (ToNo) Created % 1998-11-13 (ToNo) Modified to the split of experiment setup % 1998-12-08 (DaB) Updated % 1998-12-21 (ToNo) Added test for matlab bug on reading numbers. % 1998-12-21 (ToNo) Removed frequency axis stuff (is now in evalExperiment) % 1998-12-22 (ToNo) Added more comments % 1999-01-04 (ToNo) Adjusted window size to manage small screens better. % 1998-01-14 (ToNo) Updated error message % 1998-02-26 (ToNo) Made tt scenarios into a list % 1999-03-25 (ToNo) Restructured the source (moved into subdir xdslcomm) %% =========================================================================== global ex; global setupfig; global res; addpath xdslcomm; %% =========================================================================== % Test if we have problem reading numbers in international OS versions if 3 == 3.14, error(['Matlab thinks 3 is equal to 3.14, ' ... 'please use an US (or posix C) version of the system. ' ... 'Or add LC_NUMERIC=us into $MATLAB/bin/.matlab5rc.sh' ]); end %% =========================================================================== % Define and show the Main setup window % Set default font and size set(0,'DefaultAxesFontName','times') set(0,'DefaultTextFontName','times') if strcmp(computer,'PCWIN'), baseFontSize=9; else baseFontSize=11; end; set(0,'DefaultAxesFontSize',baseFontSize+1) set(0,'DefaultTextFontSize',baseFontSize) set(0,'Units','pixels'); % Get screen size screensize=get(0,'ScreenSize'); swidth=screensize(3); sheight=screensize(4); bdwidth=7; % Define window layout on screen fwidth=swidth/2-bdwidth*5; % Make space for two windows side by side fwidth=max(fwidth,550); fwidth=min(fwidth,swidth); fheight=max(fwidth,650); fheight=min(fheight,sheight); bottom=sheight-fheight-100; setupfig=figure(1); % Define the main setup window clf; set(gcf,'Pointer','arrow'); set(setupfig,'NumberTitle','off','Name','FSAN Duplex Simulation Setup', ... 'Position', [bdwidth bottom fwidth fheight],'Tag','SetupFig'); set(setupfig,'PaperPositionMode','auto'); %% =========================================================================== % Some simulation default values scenario='FSAN scenario FTTEx #1'; % Scenario to run vdslDuplex = 'VDSL-FDD'; % Duplex method for VDSL % Set up default experiment structures ex.param = setupParam(vdslDuplex); % Parameters ex.ttlist = setupTTstructure; % Traffic & Topology ex.tt = getList(ex.ttlist,scenario); ex.tfplist = setupTFplan; % Time & Freq. plans if ex.param.fastrecalc, tmp=[]; else tmp=[ex.param.minfrequency:ex.param.granularity:ex.param.maxfrequency]; end; ex.param.f = union(getMinFreqaxis,tmp); ex.param.PBOmaxlen=getMaxVDSLlength(ex.tt.topology,ex.tt.traffic); %% =========================================================================== % If available, include some user definitions fid=fopen('userDefinitions.m','r'); if fid ~= -1, fclose(fid); userDefinitions; end; %% =========================================================================== % Show setup and run from there uiSetup;