Template for EMMG Simulator
| 147 | # EMMG CLASS |
| 148 | # **************************************************** |
| 149 | class CEMMG: |
| 150 | """ |
| 151 | Template for EMMG Simulator |
| 152 | """ |
| 153 | def __init__( self, |
| 154 | client_id, # #1 |
| 155 | section_TSpkt_flag, # #2 |
| 156 | data_channel_id, # #3 |
| 157 | data_stream_id, # #4 |
| 158 | bandwidth, # #5 # Unit : Kbps |
| 159 | data_id, # #6 |
| 160 | data_type, # #7 |
| 161 | inputFile): # #8 |
| 162 | """ |
| 163 | These 7 parameters (excluding the actual data) form a single EMM stream. |
| 164 | One channel, One stream, One data id . |
| 165 | """ |
| 166 | # #1 |
| 167 | self.client_id = CLongParam(client_id_type, |
| 168 | client_id_length, |
| 169 | client_id) |
| 170 | # #2 |
| 171 | self.section_TSpkt_flag = CByteParam(section_TSpkt_flag_type, |
| 172 | section_TSpkt_flag_length, |
| 173 | section_TSpkt_flag) |
| 174 | # #3 |
| 175 | self.data_channel_id = CShortParam(data_channel_id_type, |
| 176 | data_channel_id_length, |
| 177 | data_channel_id) |
| 178 | # #4 |
| 179 | self.data_stream_id = CShortParam(data_stream_id_type, |
| 180 | data_stream_id_length, |
| 181 | data_stream_id) |
| 182 | |
| 183 | # #6 |
| 184 | self.data_id = CShortParam(data_id_type, |
| 185 | data_id_length, |
| 186 | data_id) |
| 187 | # #7 |
| 188 | self.data_type = CByteParam(data_type_type, |
| 189 | data_type_length, |
| 190 | data_type) |
| 191 | |
| 192 | |
| 193 | #8 |
| 194 | #Initialize members |
| 195 | self.Section = 0 |
| 196 | self.IpEmmSectionPerCycle = 0 |
| 197 | self.IpEmmSection = 0 |
| 198 | self.IpEmmSectionLen = 0 |
| 199 | self.dataTypeLength = 0 |
| 200 | self._buildIpEmm_(inputFile, bandwidth) |
| 201 | |
| 202 | #5 |
| 203 | #Initialize members |
| 204 | self.minimumBPS = 0 |
| 205 | self.ReqBWfromMux = 0 |
| 206 | self.requestBW = 0 |