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

Method parseMsRaCapability

SGSNGGSN/GPRSL3Messages.cpp:894–927  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

892void AccessCapabilities::text(std::ostream &os) const { text2(os,0); }
893
894void MsRaCapability::parseMsRaCapability()
895{
896 if (!sEnableMsRaCap ) {return;}
897 size_t rp = 0;
898 for (int numTechs = 0; numTechs < sMsRaCapMaxTypes; numTechs++) {
899 try {
900 mCList[numTechs].mTechType = (AccessTechnologyType) readField(rp,4);
901 unsigned len = readField(rp,7);
902 mCList[numTechs].mValid = true;
903 if (mCList[numTechs].mTechType == 0xf) {
904 // Special case means same as previous.
905 mCList[numTechs].mSameAsPrevious = true;
906 readField(rp,1); // Extraneous bit, not included in the length?
907 size_t trp = rp;
908 mCList[numTechs].mTechType = (AccessTechnologyType) readField(trp,4);
909 if (numTechs > 0) { // Otherwise it is an error on the part of the MS.
910 *mCList[numTechs].mCaps = *mCList[numTechs-1].mCaps;
911 }
912 // There are two more fields: GMSK Power Class and 8PSK Power Class
913 // which are included in the length and so skipped over without any more code here.
914 } else {
915 size_t trp = rp;
916 AccessCapabilities *prev = numTechs ? &mCList[numTechs-1] : 0;
917 mCList[numTechs].parseAccessCapabilities(*this,trp,prev,rp+len);
918 }
919 // Advance rp.
920 rp += len;
921 if (rp + 15 >= sizeBits()) { break; } // Not enough room left for anything useful.
922 if (readField(rp,1) == 0) { break; } // End of list marker.
923 } catch(ByteVectorError) { // oops!
924 break; // End of that.
925 }
926 }
927}
928
929void MsRaCapability::text2(std::ostream &os, bool verbose) const
930{

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected