InitTcl.cc

00001 static char code[] = "\n\
00002 \n\
00003 \n\
00004 PacketHeaderManager set tab_(PacketHeader/MPhy)       1\n\
00005 PacketHeaderManager set tab_(PacketHeader/UMTSPHY)    1\n\
00006 PacketHeaderManager set tab_(PacketHeader/RLC)        1\n\
00007 PacketHeaderManager set tab_(PacketHeader/Flags)      1\n\
00008 PacketHeaderManager set tab_(PacketHeader/Mac)        1\n\
00009 PacketHeaderManager set tab_(PacketHeader/IP)         1\n\
00010 PacketHeaderManager set tab_(PacketHeader/TCP)        1\n\
00011 \n\
00012 \n\
00013 Module/UMTS/RLC instproc init {args} {\n\
00014 eval $self next $args\n\
00015 }\n\
00016 \n\
00017 \n\
00018 Class Module/UMTS/RLC/AM -superclass Module/UMTS/RLC\n\
00019 Class Module/UMTS/RLC/UM -superclass Module/UMTS/RLC\n\
00020 \n\
00021 \n\
00022 \n\
00023 Class Module/UMTS/MAC/BS -superclass Module/UMTS/MAC\n\
00024 Class Module/UMTS/MAC/ME -superclass Module/UMTS/MAC\n\
00025 \n\
00026 \n\
00027 Module/UMTS/RLC/AM instproc init {args} {\n\
00028 eval $self next $args    \n\
00029 $self setRlc [new UMTS/RLC/AM]\n\
00030 }\n\
00031 \n\
00032 \n\
00033 Module/UMTS/RLC/UM instproc init {args} {\n\
00034 eval $self next $args\n\
00035 $self setRlc [new UMTS/RLC/UM]\n\
00036 }\n\
00037 \n\
00038 Module/UMTS/RLC instproc connect2CoreNetRlc {bs_rlc} {\n\
00039 set bsid   [$bs_rlc getRlcId]\n\
00040 set meid   [$self   getRlcId]\n\
00041 set bsmac  [$bs_rlc set mymac_]\n\
00042 set memac  [$self set mymac_]\n\
00043 set bsphy  [$bs_rlc set myphy_]\n\
00044 set mephy  [$self set myphy_]\n\
00045 \n\
00046 $self    setDestRlcId  $bsid\n\
00047 $bs_rlc  setDestRlcId  $meid\n\
00048 $bs_rlc  setMeCodeId   [$self set myphy_code_id_]\n\
00049 \n\
00050 $self set destIpAddr_ [$bs_rlc set ipAddr_]\n\
00051 $bs_rlc set destIpAddr_ [$self set ipAddr_]\n\
00052 \n\
00053 $self  setMeCodeId   [$self set myphy_code_id_]\n\
00054 \n\
00055 $bsmac set dst_rlc_id_ $meid\n\
00056 $bsmac set me_code_id_ [$self set myphy_code_id_]\n\
00057 $memac set dst_rlc_id_ $bsid\n\
00058 \n\
00059 $bsmac set initslotoffset_ 1\n\
00060 $memac set initslotoffset_ 0.5\n\
00061 $bsmac start\n\
00062 $memac start\n\
00063 \n\
00064 $bsphy monitor $meid\n\
00065 $mephy monitor $bsid\n\
00066 }\n\
00067 \n\
00068 \n\
00069 \n\
00070 \n\
00071 proc finalizeUmtsStack {phymodule macmodule rlcmodule ipAddr} {\n\
00072 \n\
00073 set rlc [$rlcmodule getRlc]\n\
00074 \n\
00075 set chr      [$phymodule set chip_rate_]\n\
00076 set sf       [$phymodule set spreading_factor_]\n\
00077 set cdr      [$phymodule set coding_rate_ ]\n\
00078 set cid      [$phymodule set code_id_]\n\
00079 set TTI      [$rlc set TTI_] \n\
00080 set TTI_PDUs [$rlc set TTI_PDUs_]\n\
00081 \n\
00082 \n\
00083 set userbw   [$phymodule getDataRate ]  \n\
00084 set slotd    [expr $TTI / $TTI_PDUs ]\n\
00085 set payload  [expr ceil($userbw * $slotd /8)]\n\
00086 \n\
00087 $phymodule set slot_duration_  $slotd\n\
00088 $rlc set bandwidth_ $userbw\n\
00089 $rlc set payload_  $payload\n\
00090 $rlcmodule set ipAddr_ $ipAddr\n\
00091 \n\
00092 $phymodule setCorrelation   [new Correlation/UMTS]\n\
00093 $phymodule computeSIRtarget $payload\n\
00094 [$phymodule getCorrelation] set code_id_ $cid\n\
00095 \n\
00096 $macmodule set TTI_             $TTI\n\
00097 $macmodule set TTI_PDUs_        $TTI_PDUs\n\
00098 $macmodule set slot_duration_   $slotd\n\
00099 $macmodule set src_rlc_id_      [$rlcmodule getRlcId]\n\
00100 \n\
00101 $rlcmodule set myphy_code_id_ $cid\n\
00102 $rlcmodule set mymac_           $macmodule\n\
00103 $rlcmodule set myphy_           $phymodule\n\
00104 \n\
00105 }\n\
00106 \n\
00107 \n\
00108 \n\
00109 \n\
00110 \n\
00111 \n\
00112 \n\
00113 UMTS/RLC/UM set avoidReordering_                      false\n\
00114 UMTS/RLC/UM set payload_                              0\n\
00115 UMTS/RLC/UM set TTI_PDUs_                             15\n\
00116 UMTS/RLC/UM set bandwidth_                            0\n\
00117 UMTS/RLC/UM set debug_                                false\n\
00118 UMTS/RLC/UM set macDA_                                -1\n\
00119 UMTS/RLC/UM set win_                                  1024\n\
00120 UMTS/RLC/UM set temp_pdu_timeout_time_                10ms\n\
00121 UMTS/RLC/UM set buffer_level_max_                     500\n\
00122 UMTS/RLC/UM set TTI_                                  10ms\n\
00123 UMTS/RLC/UM set length_indicator_                     7\n\
00124 UMTS/RLC/UM set min_concat_data_                      3\n\
00125 UMTS/RLC/UM set delay_                                50us\n\
00126 \n\
00127 UMTS/RLC/AM set avoidReordering_                      false\n\
00128 UMTS/RLC/AM set ack_mode_                             2\n\
00129 UMTS/RLC/AM set win_                                  1024\n\
00130 UMTS/RLC/AM set maxRBSize_                            100kbytes\n\
00131 UMTS/RLC/AM set overhead_                             0\n\
00132 UMTS/RLC/AM set payload_                              0\n\
00133 UMTS/RLC/AM set TTI_PDUs_                             15\n\
00134 UMTS/RLC/AM set rtx_timeout_                          140ms\n\
00135 UMTS/RLC/AM set noFastRetrans_                        0\n\
00136 UMTS/RLC/AM set numdupacks_                           2\n\
00137 UMTS/RLC/AM set poll_PDU_                             256\n\
00138 UMTS/RLC/AM set poll_timeout_                         85ms\n\
00139 UMTS/RLC/AM set stprob_timeout_                       40ms\n\
00140 UMTS/RLC/AM set macDA_                                -1\n\
00141 UMTS/RLC/AM set maxdat_                               3\n\
00142 UMTS/RLC/AM set debug_                                false\n\
00143 UMTS/RLC/AM set bandwidth_                            0\n\
00144 UMTS/RLC/AM set TTI_                                  10ms\n\
00145 UMTS/RLC/AM set length_indicator_                     7\n\
00146 UMTS/RLC/AM set ack_pdu_header_                       1\n\
00147 UMTS/RLC/AM set status_pdu_header_                    20\n\
00148 UMTS/RLC/AM set min_concat_data_                      3\n\
00149 UMTS/RLC/AM set max_status_delay_                     10ms\n\
00150 UMTS/RLC/AM set max_ack_delay_                        10ms\n\
00151 UMTS/RLC/AM set delay_                                50us\n\
00152 UMTS/RLC/AM set ack_PDUs_                             0\n\
00153 UMTS/RLC/AM set ack_SDUs_                             0\n\
00154 UMTS/RLC/AM set drop_PDUs_                            0\n\
00155 UMTS/RLC/AM set drop_SDUs_                            0\n\
00156 UMTS/RLC/AM set tot_PDUs_                              0\n\
00157 UMTS/RLC/AM set err_PDUs_                             0\n\
00158 UMTS/RLC/AM set sender_debug_                         0\n\
00159 UMTS/RLC/AM set receiver_debug_                         0\n\
00160 \n\
00161 \n\
00162 Module/MPhy/UMTS set chip_rate_                       3840000\n\
00163 Module/MPhy/UMTS set coding_type_                     1        \n\
00164 Module/MPhy/UMTS set coding_rate_                     0.5\n\
00165 \n\
00166 Module/MPhy/UMTS set slot_duration_                0\n\
00167 Module/MPhy/UMTS set code_id_                      0\n\
00168 Module/MPhy/UMTS set alpha_                        0.2177777777\n\
00169 \n\
00170 Module/MPhy/UMTS set SIRtarget_                    0\n\
00171 Module/MPhy/UMTS set PERtarget_              0.00001\n\
00172 Module/MPhy/UMTS set PowerCtrlUpdateCmdAtStartRx_   1\n\
00173 Module/MPhy/UMTS set PowerCtrlReadCmdAtStartRx_    1\n\
00174 Module/MPhy/UMTS set debug_                        0\n\
00175 \n\
00176 MInterference/MIV/UMTS set alpha_                  0.2177777777\n\
00177 \n\
00178 Module/MPhy/UMTS set pcStep_                           1.258925412\n\
00179 \n\
00180 Module/MPhy/UMTS/ME set maxTxPower_                       0.025119\n\
00181 Module/MPhy/UMTS/ME set minTxPower_                       2.5e-10\n\
00182 Module/MPhy/UMTS/ME set TxPower_                          0.025119\n\
00183 \n\
00184 Module/MPhy/UMTS/BS set maxTxPower_                       0.316227\n\
00185 Module/MPhy/UMTS/BS set minTxPower_                       0.00316227\n\
00186 Module/MPhy/UMTS/BS set TxPower_                          0.316227\n\
00187 \n\
00188 \n\
00189 Module/MPhy/UMTS/BS set iuccorr_                      0.2\n\
00190 Module/MPhy/UMTS/BS set bits_per_symbol_              2\n\
00191 Module/MPhy/UMTS/BS set spreading_factor_             8\n\
00192 \n\
00193 Module/MPhy/UMTS/ME set bits_per_symbol_              1\n\
00194 Module/MPhy/UMTS/ME set spreading_factor_             4\n\
00195 \n\
00196 \n\
00197 Module/UMTS/RLC set ipAddr_                                                                     -1\n\
00198 Module/UMTS/RLC set destIpAddr_                                                         -1\n\
00199 Module/UMTS/RLC/AM set debug_                         0\n\
00200 \n\
00201 Module/UMTS/RLC/UM set debug_                         0\n\
00202 \n\
00203 Module/UMTS/MAC set debug_                            0\n\
00204 Module/UMTS/MAC set src_rlc_id_                       0\n\
00205 Module/UMTS/MAC set dst_rlc_id_                       0\n\
00206 Module/UMTS/MAC set me_code_id_                       0\n\
00207 Module/UMTS/MAC set slot_duration_                    0\n\
00208 Module/UMTS/MAC set TTI_PDUs_                         0\n\
00209 Module/UMTS/MAC set TTI_                              0\n\
00210 Module/UMTS/MAC set interleaving_                     0.040\n\
00211 Module/UMTS/MAC set initslotoffset_                   -1\n\
00212 \n\
00213 \n\
00214 Correlation/UMTS set dl_orthogonality_                0.4\n\
00215 Correlation/UMTS set code_id_                         0\n\
00216 Correlation/UMTS set debug_                           0\n\
00217 \n\
00218 \n\
00219 \n\
00220 \n\
00221 \n\
00222 Module/UmtsWirelessCh set debug_ 0\n\
00223 ";
00224 #include "tclcl.h"
00225 EmbeddedTcl InitTclCode(code);

Generated on Wed Nov 26 15:47:28 2008 for NS-MIRACLE library by  doxygen 1.5.2