| 890 | |
| 891 | |
| 892 | void XCCHL1Decoder::handleGoodFrame() |
| 893 | { |
| 894 | OBJLOG(DEBUG) <<"XCCHL1Decoder u[]=" << mU; |
| 895 | |
| 896 | { |
| 897 | ScopedLock lock(mLock); |
| 898 | // Keep T3109 from timing out. |
| 899 | mT3109.set(); |
| 900 | // If this is the first good frame of a new transaction, |
| 901 | // stop T3101 and tell L2 we're alive down here. |
| 902 | if (mT3101.active()) { |
| 903 | mT3101.reset(); |
| 904 | if (mUpstream!=NULL) mUpstream->writeLowSide(L2Frame(ESTABLISH)); |
| 905 | } |
| 906 | } |
| 907 | |
| 908 | // Get the d[] bits, the actual payload in the radio channel. |
| 909 | // Undo GSM's LSB-first octet encoding. |
| 910 | OBJLOG(DEBUG) <<"XCCHL1Decoder d[]=" << mD; |
| 911 | |
| 912 | if (mUpstream) { |
| 913 | // Are we fuzzing ourselves? |
| 914 | if (random()%100 < gConfig.getNum("Test.GSM.UplinkFuzzingRate")) { |
| 915 | size_t i = random() % mD.size(); |
| 916 | mD[i] = 1 - mD[i]; |
| 917 | LOG(NOTICE) << "fuzzing input frame, flipped bit " << i; |
| 918 | } |
| 919 | // Send all bits to GSMTAP |
| 920 | if (gConfig.getBool("Control.GSMTAP.GSM")) { |
| 921 | // FIXME -- This repeatLengh>51 is a bit of a hack. |
| 922 | gWriteGSMTAP(ARFCN(),TN(),mReadTime.FN(),typeAndOffset(),mMapping.repeatLength()>51,true,mD); |
| 923 | } |
| 924 | // Build an L2 frame and pass it up. |
| 925 | const BitVector2 L2Part(mD.tail(headerOffset())); |
| 926 | OBJLOG(DEBUG) <<"XCCHL1Decoder L2=" << L2Part; |
| 927 | mUpstream->writeLowSide(L2Frame(L2Part,DATA)); |
| 928 | } else { |
| 929 | OBJLOG(ERR) << "XCCHL1Decoder with no uplink connected."; |
| 930 | } |
| 931 | } |
| 932 | |
| 933 | // Get the physical parameters of the burst. |
| 934 | void MSPhysReportInfo::processPhysInfo(const RxBurst &inBurst) |
nothing calls this directly
no test coverage detected