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

Method parseSMS

SMS/SMSMessages.cpp:58–75  ·  view source on GitHub ↗

(pat) This parses an incoming SMS message from the MS, called from

Source from the content-addressed store, hash-verified

56
57// (pat) This parses an incoming SMS message from the MS, called from
58CPMessage * SMS::parseSMS( const GSM::L3Frame& frame )
59{
60 CPMessage::MessageType MTI = (CPMessage::MessageType)(frame.MTI());
61 LOG(DEBUG) << "MTI="<<MTI;
62
63 CPMessage * retVal = CPFactory(MTI);
64 if( retVal==NULL ) return NULL;
65 retVal->TI(frame.TI());
66 // Documentation courtesy pat:
67 // The L3Message::CPMessage is a base class for CPData, CPAck, CPError, one of which is created by the CPFactory above.
68 // The below calls L3Message::parse which calls the parseBody from the derived class.
69 // For CPAck and CPError, parseBody is null (or worse, assert out - a former bug.)
70 // For CPData messages: calls CPData::parseBody which then calls L3ProtocolElement::parseLV which calls:
71 // CPUserData::parseV, which just copies the data into CPUserData::mRPDU; which is an L3Frame::RLFrame
72 retVal->parse(frame);
73 LOG(DEBUG) << *retVal;
74 return retVal;
75}
76
77
78RPData *SMS::hex2rpdata(const char *hexstring)

Callers

nothing calls this directly

Calls 3

MTIMethod · 0.45
TIMethod · 0.45
parseMethod · 0.45

Tested by

no test coverage detected