MCPcopy Create free account
hub / github.com/RangeNetworks/openbts / handleGoodFrame

Method handleGoodFrame

GSM/GSML1FEC.cpp:892–931  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

890
891
892void 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.
934void MSPhysReportInfo::processPhysInfo(const RxBurst &inBurst)

Callers

nothing calls this directly

Calls 12

L2FrameClass · 0.85
gWriteGSMTAPFunction · 0.85
decodePowerFunction · 0.85
repeatLengthMethod · 0.80
tailMethod · 0.80
headMethod · 0.80
setMethod · 0.45
activeMethod · 0.45
resetMethod · 0.45
writeLowSideMethod · 0.45
sizeMethod · 0.45
FNMethod · 0.45

Tested by

no test coverage detected