| 198 | |
| 199 | |
| 200 | L1Encoder::L1Encoder(unsigned wCN, unsigned wTN, const TDMAMapping& wMapping, L1FEC *wParent) |
| 201 | :mDownstream(NULL), |
| 202 | mMapping(wMapping), |
| 203 | mCN(wCN),mTN(wTN), |
| 204 | mTSC(gBTS.BCC()), // Note that TSC (Training Sequence Code) is hardcoded to the BCC. |
| 205 | mParent(wParent), |
| 206 | mTotalBursts(0), |
| 207 | mPrevWriteTime(gBTS.time().FN(),wTN), |
| 208 | mNextWriteTime(gBTS.time().FN(),wTN), |
| 209 | mRunning(false),mActive(false), |
| 210 | mEncrypted(ENCRYPT_NO), |
| 211 | mEncryptionAlgorithm(0) |
| 212 | { |
| 213 | assert((int)mCN<gConfig.getNum("GSM.Radio.ARFCNs")); |
| 214 | #ifndef TESTTCHL1FEC |
| 215 | assert(mMapping.allowedSlot(mTN)); |
| 216 | assert(mMapping.downlink()); |
| 217 | mNextWriteTime.rollForward(mMapping.frameMapping(0),mMapping.repeatLength()); |
| 218 | mPrevWriteTime.rollForward(mMapping.frameMapping(0),mMapping.repeatLength()); |
| 219 | #endif // TESTTCHL1FEC |
| 220 | // Compatibility with C0 will be checked in the ARFCNManager. |
| 221 | // Build the descriptive string. |
| 222 | ostringstream ss; |
| 223 | ss << wMapping.typeAndOffset(); |
| 224 | //sprintf(mDescriptiveString,"C%dT%d %s", wCN, wTN, ss.str().c_str()); |
| 225 | mDescriptiveString = format("C%dT%d %s", wCN, wTN, ss.str().c_str()); |
| 226 | } |
| 227 | |
| 228 | |
| 229 | void L1Encoder::rollForward() |
nothing calls this directly
no test coverage detected