smalltalk
/
osmo-st-gsm
Archived
1
0
Fork 0

GSM48: Be able to parse a GSM IMSI Detach message

This commit is contained in:
Holger Hans Peter Freyther 2010-11-27 14:33:19 +01:00
parent 46231d5a0e
commit ded50cff4d
2 changed files with 22 additions and 0 deletions

View File

@ -498,6 +498,7 @@ GSM48MSG subclass: GSM48MMMessage [
GSM48MMMessage class >> msgAuReq [ ^ 16r12 ]
GSM48MMMessage class >> msgAuRes [ ^ 16r14 ]
GSM48MMMessage class >> msgCMReq [ ^ 16r24 ]
GSM48MMMessage class >> msgIMSIDetach [ ^ 16r01 ]
]
GSM48MMMessage subclass: LocationUpdatingRequest [
@ -639,6 +640,21 @@ GSM48MMMessage subclass: CMServiceRequest [
]
GSM48MMMessage subclass: IMSIDetachIndication [
<category: 'osmo-message'>
Mandantory := nil.
IMSIDetachIndication class >> messageType [ ^ self msgIMSIDetach ]
IMSIDetachIndication class >> Mandantory [
^ Mandantory ifNil: [ Mandantory := OrderedCollection new ].
]
IMSIDetachIndication class >> initialize [
self addMandantory: 'cm1' with: GSM48Classmark1.
self addMandantory: 'mi' with: GSM48MIdentity.
]
]
Eval [
LocationUpdatingRequest initialize.
LocationUpdatingReject initialize.
@ -648,4 +664,5 @@ Eval [
IdentityRequest initialize.
IdentityResponse initialize.
CMServiceRequest initialize.
IMSIDetachIndication initialize.
]

View File

@ -311,5 +311,10 @@ TestCase subclass: TestMessages [
inp := #(1 205 4 5 2 2 4 2 66 254 15 33 0 31 87 5 8 0 114 244 128 16 3 156 64 23 16 5 36 17 3 51 25 129 8 41 32 1 153 118 6 1 152 33 1 0) asByteArray.
msg := MSGParser parse: inp.
self assert: msg toMessage asByteArray = inp.
"IMSI Detach Ind"
inp := #(1 255 4 5 2 2 4 2 66 254 15 29 0 27 87 5 8 0 114 244 128 16 3 156 64 23 12 5 1 51 8 41 65 112 6 16 9 71 34 33 1 0 ) asByteArray.
msg := MSGParser parse: inp.
self assert: msg toMessage asByteArray = inp.
]
]