function ttlist = fsan_loops(ttlist);
%% ===========================================================================
%fsan_loops - Sets up the experiment description structure for
% a certain FSAN duplex experiment.
%
% Parameter:    ttlist	        Structure describing the traffic and topology
% Returns:      ttlist		Structure describing the traffic and topology
%
% Example(s):
%   gui.ttlist = fsan_loops([]);
%   tt=getList(gui.ttlist,'FSAN Vendor scenario ETSI'); Sets up tt to test
%   the FSAN Vendor scenario ETSI.
%
%   gui.ttlist = fsan_loops(gui.ttlist); Add to an existing ttlist
%
% Algorithmic details:
%
% Reference:
%    FSAN Noise model notebook, (J. Cook. c25.nb)
%% ===========================================================================

%% ===========================================================================
% Copyright (C) 1998,99 by Telia Research AB, Lulea, Sweden; All rights reserved. 
% Project       : FSAN duplex model
% Author(s)     : Tomas Nordstrom (Tomas.Nordstrom@FTW.at)
%               : Daniel Bengtsson (Daniel.J.Bengtsson@Telia.se)
%
% CVS:       $Id: fsan_loops.m,v 1.2 2000/03/10 13:45:59 tono Exp $
%% ===========================================================================
% Change History
%      1998-10-19 (ToNo) Created
%      1998-11-13 (ToNo) Splitted setup into three parts param,tfplan,tt
%      1998-11-26 (ToNo) Entered cable length in the cable description field
%      1999-01-07 (DaB)  Added more scenarios
%      1999-01-09 (DaB)  Changed DTAG05 to DTAG04
%      1999-02-05 (DaB)  Changed cable type to ETSI and removed operator names
%      1999-02-26 (ToNo) Changed scenarios into a list of scenarios
%      1999-10-25 (ToNo) Reorganized things into etsi,ansi,itu,fsan definitions
%% ===========================================================================

%% ===========================================================================
% Scenario definitions: Topology and traffic pattern
%
% Topology consists of structs as: 
% (implicit node_number) { length cable_type 'node_name' 'link_name' }
%
% Traffic consists of structs as: 
% { from_node to_node 'tfplan_name' number_of_gui.modems }
%
% The duplex method given as a parameter to the experiment will replace 'VDSL' below

tt.name= 'FSAN Vendor scenario ETSI';             % ===== FSAN Vendor scenario ETSI
tt.topology=[
    {0  '' 'CO' ''}; 
    {300  'ETSI' 'NT1' '300m ->'}; 
    {300  'ETSI' 'NT2' '300m ->'};
    {300  'ETSI' 'NT3' '300m ->'};
    {300  'ETSI' 'NT4' '300m ->'};
    {300  'ETSI' 'NT5' '300m ->'};
    ];
tt.traffic=[
    {1 2 'VDSL' 5}; 
    {1 3 'VDSL' 5};
    {1 4 'VDSL' 5}; 
    {1 5 'VDSL' 5};
    {1 6 'VDSL' 5}; 
    ];
ttlist=insertList(ttlist,tt);

tt.name= 'FSAN Vendor scenario ANSI';             % ===== FSAN Vendor scenario ANSI
tt.topology=[
    {0  '' 'CO' ''}; 
    {300  'ANSI' 'NT1' '300m ->'}; 
    {300  'ANSI' 'NT2' '300m ->'};
    {300  'ANSI' 'NT3' '300m ->'};
    {300  'ANSI' 'NT4' '300m ->'};
    {300  'ANSI' 'NT5' '300m ->'};
    ];
tt.traffic=[
    {1 2 'VDSL' 5}; 
    {1 3 'VDSL' 5};
    {1 4 'VDSL' 5}; 
    {1 5 'VDSL' 5};
    {1 6 'VDSL' 5}; 
    ];
ttlist=insertList(ttlist,tt);

tt.name= 'FSAN PBO scenario';             % ===== FSAN PBO scenario
tt.topology=[
    {0  '' 'CO' ''}; 
    {150  'ETSI' 'NT1' '150m ->'}; 
    {150  'ETSI' 'NT2' '150m ->'};
    {150  'ETSI' 'NT3' '150m ->'};
    {150  'ETSI' 'NT4' '150m ->'};
    {150  'ETSI' 'NT5' '150m ->'};
    {150  'ETSI' 'NT6' '150m ->'}; 
    {150  'ETSI' 'NT7' '150m ->'};
    {150  'ETSI' 'NT8' '150m ->'};
    {150  'ETSI' 'NT9' '150m ->'};
    {150  'ETSI' 'NT10' '150m ->'};
    ];
tt.traffic=[
    {1 2 'VDSL' 2}; 
    {1 3 'VDSL' 2};
    {1 4 'VDSL' 2}; 
    {1 5 'VDSL' 2};
    {1 6 'VDSL' 2};
    {1 7 'VDSL' 2}; 
    {1 8 'VDSL' 2};
    {1 9 'VDSL' 2}; 
    {1 10 'VDSL' 2};
    {1 11 'VDSL' 2};
    ];
ttlist=insertList(ttlist,tt);


tt.name= 'FSAN scenario FTTEx #1';             
tt.topology=[
    {0  '' 'CO (e)' ''}; 
    {100  'ETSI' 'Node (c)' '100m ->'}; 
    {400  'ETSI' 'NT (x)' '400m ->'}; 
    ];
tt.traffic=[
    {1 3 'VDSL' 6}; 
    {1 2 'VDSL' 5};
    {1 3 'ADSL' 6}; 
    {1 2 'ADSL' 4};
    {1 3 'HDSL-2' 2}; 
    {1 2 'HDSL-2' 2};
    {1 3 'ISDN-4B3T' 12}; 
    {1 2 'ISDN-4B3T' 8};
    {1 3 'ISDN-PRI' 1}; 
    {1 2 'ISDN-PRI' 1};
    ];
ttlist=insertList(ttlist,tt);

tt.name= 'FSAN scenario FTTCab #1';            
tt.topology=[
    {0  '' 'CO (e)' ''}; 
    {1200  'ETSI' 'Cab (c)' '1200m ->'}; 
    {200  'ETSI' 'Node (x)' '200m ->'}; 
    {300  'ETSI' 'NT (r)' '300m ->'}; 
    ];
tt.traffic=[
    {2 4 'VDSL' 6}; 
    {2 3 'VDSL' 5};
    {1 4 'ADSL' 6}; 
    {1 3 'ADSL' 4};
    {1 4 'HDSL-2' 2}; 
    {1 3 'HDSL-2' 2};
    {1 4 'ISDN-4B3T' 12}; 
    {1 3 'ISDN-4B3T' 8};
    {1 4 'ISDN-PRI' 1}; 
    {1 3 'ISDN-PRI' 1};
    ];
ttlist=insertList(ttlist,tt);

tt.name= 'FSAN scenario FTTEx #2';            
tt.topology=[
    {0  '' 'CO (e)' ''}; 
    {500  'ETSI' 'Node (c)' '500m ->'}; 
    {500  'ETSI' 'NT (x)' '500m ->'}; 
    ];
tt.traffic=[
    {1 3 'VDSL' 3}; 
    {1 2 'VDSL' 2};
    {1 3 'ADSL' 5}; 
    {1 3 'HDSL-2' 6};
    {1 3 'HDSL-1' 1}; 
    {1 3 'ISDN-2B1Q' 15}; 
    ];
ttlist=insertList(ttlist,tt);

tt.name= 'FSAN scenario FTTCab #2';            
tt.topology=[
    {0  '' 'CO (e)' ''}; 
    {1000  'ETSI' 'Cab (c)' '1000m ->'}; 
    {500  'ETSI' 'Node (x)' '500m ->'}; 
    {500  'ETSI' 'NT (r)' '500m ->'}; 
    ];
tt.traffic=[
    {2 4 'VDSL' 6}; 
    {2 3 'VDSL' 5};
    {1 4 'ADSL' 3}; 
    {1 3 'ADSL' 2};
    {1 3 'HDSL-1' 1}; 
    {1 4 'HDSL-2' 2}; 
    {1 3 'HDSL-2' 4};
    {1 4 'ISDN-2B1Q' 5}; 
    {1 3 'ISDN-2B1Q' 10};
    ];
ttlist=insertList(ttlist,tt);

tt.name= 'FSAN scenario FTTEx #3';             
tt.topology=[
    {0  '' 'CO (e)' ''}; 
    {500  'ETSI' 'Cab (c)' '500m ->'}; 
    {580  'ETSI' 'Node (x)' '580m ->'}; 
    {400  'ETSI' 'NT (r)' '400m ->'}; 
    ];
tt.traffic=[
    {1 2 'VDSL' 5};
    {1 4 'ADSL' 4}; 
    {1 3 'ADSL' 3}; 
    {1 2 'ADSL' 3}; 
    {1 2 'HDSL-2' 2};
    {1 2 'HDSL-3' 3};
    {1 2 'ISDN-2B1Q' 6}; 
    {1 3 'ISDN-2B1Q' 7}; 
    {1 4 'ISDN-2B1Q' 7}; 
    ];
ttlist=insertList(ttlist,tt);

tt.name= 'FSAN scenario FTTCab #3';             
tt.topology=[
    {0  '' 'CO (e)' ''}; 
    {3900  'ETSI' 'Cab (c)' '3900m ->'}; 
    {580  'ETSI' 'Node (x)' '580m ->'}; 
    {400  'ETSI' 'NT (r)' '400m ->'}; 
    ];
tt.traffic=[
    {2 4 'VDSL' 4};
    {2 3 'VDSL' 2};
    {1 4 'ADSL' 4}; 
    {1 3 'ADSL' 3}; 
    {1 2 'ADSL' 3}; 
    {1 2 'HDSL-2' 2};
    {1 2 'HDSL-3' 3};
    {1 2 'ISDN-2B1Q' 6}; 
    {1 3 'ISDN-2B1Q' 7}; 
    {1 4 'ISDN-2B1Q' 7}; 
    ];
ttlist=insertList(ttlist,tt);

tt.name= 'FSAN scenario FTTEx #4';             
tt.topology=[
    {0  '' 'CO' ''}; 
    {500  'ETSI' 'Cab' '500m ->'}; 
    {300  'ETSI' 'Node' '300m ->'}; 
    {700  'ETSI' 'NT' '700m ->'}; 
    ];
tt.traffic=[
    {2 4 'VDSL' 3};
    {2 3 'VDSL' 2};
    {2 4 'ADSL' 4}; 
    {2 4 'HDSL-2' 2};
    {2 3 'HDSL-2' 3};
    {2 4 'ISDN-2B1Q' 7}; 
    {2 3 'ISDN-2B1Q' 8}; 
    ];
ttlist=insertList(ttlist,tt);

tt.name= 'FSAN scenario FTTCab #4';             
tt.topology=[
    {0  '' 'Cab (c)' ''}; 
    {300  'ETSI' 'Node (x)' '300m ->'}; 
    {700  'ETSI' 'NT (r)' '700m ->'}; 
    ];
tt.traffic=[
    {1 3 'VDSL' 8};
    {1 2 'VDSL' 12};
    {1 3 'ADSL' 5}; 
    {1 3 'HDSL-2' 4};
    {1 2 'HDSL-2' 6};
    {1 3 'ISDN-2B1Q' 7}; 
    {1 2 'ISDN-2B1Q' 8}; 
    ];
ttlist=insertList(ttlist,tt);

tt.name= 'FSAN scenario FTTEx #5';       
tt.topology=[
    {0  '' 'CO (e)' ''}; 
    {500  'ETSI'  'Cab (c)' '500m ->'}; 
    {500  'ETSI'  'NT (x)' '500m ->'}; 
    {500  'ETSI'  'NT (r)' '500m ->'}; 
    ];
tt.traffic=[
    {1 2 'VDSL' 2};
    {1 3 'VDSL' 2};
    {1 4 'VDSL' 1};
    {1 4 'ADSL' 5}; 
    {1 4 'ISDN-2B1Q' 5};
    {1 3 'ISDN-2B1Q' 10};
    {1 4 'HDSL-2' 2};
    {1 3 'HDSL-2' 4};
    {1 3 'HDSL-1' 1};   
    ]; 
ttlist=insertList(ttlist,tt);

tt.name= 'FSAN scenario FTTCab #5';       
tt.topology=[
    {0  '' 'CO (e)' ''}; 
    {1200  'DTAG04'  'Cab (c)' '1200m ->'}; 
    {200  'DTAG04'  'NT (x)' '200m ->'}; 
    {300  'DTAG04'  'NT (r)' '300m ->'}; 
    ];
tt.traffic=[
    {2 4 'VDSL' 6};
    {2 3 'VDSL' 5};
    {1 4 'ADSL' 6};
    {1 3 'ADSL' 4}; 
    {1 4 'ISDN-2B1Q' 12};
    {1 3 'ISDN-2B1Q' 8};
    {1 4 'HDSL-2' 2};
    {1 3 'HDSL-2' 2};  
    ]; 
ttlist=insertList(ttlist,tt);

tt.name= 'FSAN scenario FTTCab #6';             
tt.topology=[
    {0  '' 'CO (e)' ''}; 
    {3000  'ETSI' 'Cab (c)' '3000m ->'}; 
    {500  'ETSI' 'Node (x)' '500m ->'}; 
    {500  'ETSI' 'NT (r)' '500m ->'}; 
    ];
tt.traffic=[
    {2 4 'VDSL' 11};
    {2 3 'VDSL' 10};
    {1 4 'ADSL' 3}; 
    {1 3 'ADSL' 2}; 
    {1 3 'HDSL-2' 8};
    {1 4 'HDSL-2' 8};
    {1 3 'ISDN-2B1Q' 3}; 
    {1 4 'ISDN-2B1Q' 2}; 
    ];
ttlist=insertList(ttlist,tt);