%% =========================================================================== % Copyright (C): % 2000-2009 by Forschungszentrum Telekommunikation Wien, Austria; % All rights reserved. % ETSI_SDSL_traffic2lctf : Adds linecodes and tfplans etc for all SDSL % services in the considered traffic scenario to % lclist, tfplist, and xDSLlist. % % Project : FTW's xDSLsimu % Author(s) : Tomas Nordstrom (Tomas.Nordstrom@FTW.at) % : Gernot Schmid (gernot.schmid@arcs.ac.at) % % CVS: $Id: ETSI_SDSL_traffic2lctf.m 752 2009-01-02 13:03:52Z tono $ %% =========================================================================== %% =========================================================================== % Change History % 2000-10-05 (GS) Created % 2000-11-08 (ToNo) Made this into a definition file (not a function) % 2001-10-18 (ToNo) Ported to Octave % 2003-11-03 (ToNo) Lists now use cell arrays for both Octave and Matlab % 2005-01-10 (ToNo) Made changes to reflect the new naming convention % 2005-01-13 (ToNo) Modified to be more flexible with lcnames % 2008-08-28 (ToNo) Introduced consistent naming (pam -> mod) % 2008-10-23 (ToNo) Now we expand aliases before scanning %% =========================================================================== global ex; newtt = setTT(ex.tt,ex.param.xDSLlist); traffic = newtt.traffic; % Find the bitrate of the considered SDSL service from its name in % the traffic struct and create a corresponding linecode and tfplan % and then add information to the various lists n=length(traffic); for i=1:n lcname=traffic{i}{3}; if ~isempty(findstr(lcname,'ETSI-SDSL')) nix=findstr(lcname,'-sym'); if ~isempty(nix) tmp_lc=getList(ex.lclist,lcname(1:nix+3)); tmp_lc.param.mod.brate.rate = 1e3*str2num(lcname(nix+5:length(lcname))); fsym=(tmp_lc.param.mod.brate.rate+tmp_lc.param.mod.brate.ohead)/... tmp_lc.param.mod.bpsym; tmp_lc.name=lcname; ex.lclist=insertList(ex.lclist,tmp_lc); tfplan=getList(ex.tfplist,lcname(1:nix+3)); tfplan.PSD.active.upstream = [1 2*fsym]; tfplan.PSD.active.downstream = [1 2*fsym]; tfplan.name=lcname; tfplan.lcname=lcname; ex.tfplist=insertList(ex.tfplist,tfplan); xDSL.name=lcname; xDSL.used=lcname; ex.param.xDSLlist=insertList(ex.param.xDSLlist,xDSL); end nix=findstr(lcname,'-asym'); if ~isempty(nix) tmp_lc=getList(ex.lclist,lcname(1:nix+4)); tmp_lc.param.mod.brate.rate = 1e3*str2num(lcname(nix+6:length(lcname))); fsym=(tmp_lc.param.mod.brate.rate+tmp_lc.param.mod.brate.ohead)/... tmp_lc.param.mod.bpsym; tmp_lc.name=lcname; ex.lclist=insertList(ex.lclist,tmp_lc); tfplan=getList(ex.tfplist,lcname(1:nix+4)); tfplan.PSD.active.upstream = [1 2*fsym]; tfplan.PSD.active.downstream = [1 2*fsym]; tfplan.name=lcname; tfplan.lcname=lcname; ex.tfplist=insertList(ex.tfplist,tfplan); xDSL.name=lcname; xDSL.used=lcname; ex.param.xDSLlist=insertList(ex.param.xDSLlist,xDSL); end end end