GSM48: Prefix classes with GSM48 to ease migrating to other ST dialects
This commit is contained in:
parent
d3dcc6db1a
commit
5a54fe3caf
94
GSM48.st
94
GSM48.st
|
@ -503,22 +503,22 @@ GSM48MSG subclass: GSM48MMMessage [
|
|||
GSM48MMMessage class >> msgIMSIDetach [ ^ 16r01 ]
|
||||
]
|
||||
|
||||
GSM48MMMessage subclass: LocationUpdatingRequest [
|
||||
GSM48MMMessage subclass: GSM48LURequest [
|
||||
<category: 'osmo-message'>
|
||||
Mandantory := nil.
|
||||
Optional := nil.
|
||||
|
||||
LocationUpdatingRequest class >> messageType [ ^ self msgLUReq ]
|
||||
GSM48LURequest class >> messageType [ ^ self msgLUReq ]
|
||||
|
||||
LocationUpdatingRequest class >> Mandantory [
|
||||
GSM48LURequest class >> Mandantory [
|
||||
^ Mandantory ifNil: [ Mandantory := OrderedCollection new ].
|
||||
]
|
||||
|
||||
LocationUpdatingRequest class >> Optional [
|
||||
GSM48LURequest class >> Optional [
|
||||
^ Optional ifNil: [ Optional := OrderedCollection new ].
|
||||
]
|
||||
|
||||
LocationUpdatingRequest class >> initialize [
|
||||
GSM48LURequest class >> initialize [
|
||||
self addMandantory: 'luType' with: GSM48KeySeqLuType.
|
||||
self addMandantory: 'lai' with: GSM48Lai.
|
||||
self addMandantory: 'cm1' with: GSM48Classmark1.
|
||||
|
@ -526,21 +526,21 @@ GSM48MMMessage subclass: LocationUpdatingRequest [
|
|||
]
|
||||
]
|
||||
|
||||
GSM48MMMessage subclass: LocationUpdatingAccept [
|
||||
GSM48MMMessage subclass: GSM48LUAccept [
|
||||
<category: 'osmo-message'>
|
||||
Mandantory := nil.
|
||||
Optional := nil.
|
||||
|
||||
LocationUpdatingAccept class >> Mandantory [
|
||||
GSM48LUAccept class >> Mandantory [
|
||||
^ Mandantory ifNil: [ Mandantory := OrderedCollection new ].
|
||||
]
|
||||
|
||||
LocationUpdatingAccept class >> Optional [
|
||||
GSM48LUAccept class >> Optional [
|
||||
^ Optional ifNil: [ Optional := OrderedCollection new ].
|
||||
]
|
||||
|
||||
LocationUpdatingAccept class >> messageType [ ^ self msgLUAcc ]
|
||||
LocationUpdatingAccept class >> initialize [
|
||||
GSM48LUAccept class >> messageType [ ^ self msgLUAcc ]
|
||||
GSM48LUAccept class >> initialize [
|
||||
self addMandantory: 'cause' with: GSM48Lai.
|
||||
self addOptional: 'mi' with: GSM48MIdentity.
|
||||
self addOptional: 'follow' with: GSM48FollowOn.
|
||||
|
@ -548,90 +548,90 @@ GSM48MMMessage subclass: LocationUpdatingAccept [
|
|||
]
|
||||
]
|
||||
|
||||
GSM48MMMessage subclass: LocationUpdatingReject [
|
||||
GSM48MMMessage subclass: GSM48LUReject [
|
||||
<category: 'osmo-message'>
|
||||
Mandantory := nil.
|
||||
Optional := nil.
|
||||
|
||||
LocationUpdatingReject class >> messageType [ ^ self msgLURej ]
|
||||
GSM48LUReject class >> messageType [ ^ self msgLURej ]
|
||||
|
||||
LocationUpdatingReject class >> Mandantory [
|
||||
GSM48LUReject class >> Mandantory [
|
||||
^ Mandantory ifNil: [ Mandantory := OrderedCollection new ].
|
||||
]
|
||||
|
||||
LocationUpdatingReject class >> initialize [
|
||||
GSM48LUReject class >> initialize [
|
||||
self addMandantory: 'cause' with: GSM48RejectCause.
|
||||
]
|
||||
]
|
||||
|
||||
GSM48MMMessage subclass: AuthenticationRequest [
|
||||
GSM48MMMessage subclass: GSM48AuthReq [
|
||||
<category: 'osmo-message'>
|
||||
Mandantory := nil.
|
||||
Optional := nil.
|
||||
|
||||
AuthenticationRequest class >> messageType [ ^ self msgAuReq ]
|
||||
AuthenticationRequest class >> Mandantory [
|
||||
GSM48AuthReq class >> messageType [ ^ self msgAuReq ]
|
||||
GSM48AuthReq class >> Mandantory [
|
||||
^ Mandantory ifNil: [ Mandantory := OrderedCollection new ].
|
||||
]
|
||||
|
||||
AuthenticationRequest class >> initialize [
|
||||
GSM48AuthReq class >> initialize [
|
||||
self addMandantory: 'key' with: GSM48KeySeqLuType.
|
||||
self addMandantory: 'auth' with: GSM48AuthRand.
|
||||
]
|
||||
]
|
||||
|
||||
GSM48MMMessage subclass: AuthenticationResponse [
|
||||
GSM48MMMessage subclass: GSM48AuthResp [
|
||||
<category: 'osmo-message'>
|
||||
Mandantory := nil.
|
||||
|
||||
AuthenticationResponse class >> messageType [ ^ self msgAuRes ]
|
||||
AuthenticationResponse class >> Mandantory [
|
||||
GSM48AuthResp class >> messageType [ ^ self msgAuRes ]
|
||||
GSM48AuthResp class >> Mandantory [
|
||||
^ Mandantory ifNil: [ Mandantory := OrderedCollection new ].
|
||||
]
|
||||
|
||||
AuthenticationResponse class >> initialize [
|
||||
GSM48AuthResp class >> initialize [
|
||||
self addMandantory: 'sres' with: GSM48AuthSRES.
|
||||
]
|
||||
]
|
||||
|
||||
GSM48MMMessage subclass: IdentityRequest [
|
||||
GSM48MMMessage subclass: GSM48IdentityReq [
|
||||
<category: 'osmo-message'>
|
||||
|
||||
Mandantory := nil.
|
||||
IdentityRequest class >> messageType [ ^ self msgIdReq ]
|
||||
IdentityRequest class >> Mandantory [
|
||||
GSM48IdentityReq class >> messageType [ ^ self msgIdReq ]
|
||||
GSM48IdentityReq class >> Mandantory [
|
||||
^ Mandantory ifNil: [ Mandantory := OrderedCollection new ].
|
||||
]
|
||||
|
||||
IdentityRequest class >> initialize [
|
||||
GSM48IdentityReq class >> initialize [
|
||||
self addMandantory: 'idType' with: GSM48IdentityType.
|
||||
]
|
||||
]
|
||||
|
||||
GSM48MMMessage subclass: IdentityResponse [
|
||||
GSM48MMMessage subclass: GSM48IdentityResponse [
|
||||
<category: 'osmo-message'>
|
||||
|
||||
Mandantory := nil.
|
||||
IdentityResponse class >> messageType [ ^ self msgIdRes ]
|
||||
IdentityResponse class >> Mandantory [
|
||||
GSM48IdentityResponse class >> messageType [ ^ self msgIdRes ]
|
||||
GSM48IdentityResponse class >> Mandantory [
|
||||
^ Mandantory ifNil: [ Mandantory := OrderedCollection new ].
|
||||
]
|
||||
|
||||
IdentityResponse class >> initialize [
|
||||
GSM48IdentityResponse class >> initialize [
|
||||
self addMandantory: 'mi' with: GSM48MIdentity.
|
||||
]
|
||||
]
|
||||
|
||||
GSM48MMMessage subclass: CMServiceRequest [
|
||||
GSM48MMMessage subclass: GSM48CMServiceReq [
|
||||
<category: 'osmo-message'>
|
||||
|
||||
Mandantory := nil.
|
||||
CMServiceRequest class >> messageType [ ^ self msgCMReq ]
|
||||
CMServiceRequest class >> Mandantory [
|
||||
GSM48CMServiceReq class >> messageType [ ^ self msgCMReq ]
|
||||
GSM48CMServiceReq class >> Mandantory [
|
||||
^ Mandantory ifNil: [ Mandantory := OrderedCollection new ].
|
||||
]
|
||||
|
||||
CMServiceRequest class >> initialize [
|
||||
GSM48CMServiceReq class >> initialize [
|
||||
self addMandantory: 'keyAndType' with: GSM48KeySeqLuType.
|
||||
self addMandantory: 'cm2' with: GSM48Classmark2.
|
||||
self addMandantory: 'mi' with: GSM48MIdentity.
|
||||
|
@ -642,29 +642,29 @@ GSM48MMMessage subclass: CMServiceRequest [
|
|||
|
||||
]
|
||||
|
||||
GSM48MMMessage subclass: IMSIDetachIndication [
|
||||
GSM48MMMessage subclass: GSM48IMSIDetachInd [
|
||||
<category: 'osmo-message'>
|
||||
|
||||
Mandantory := nil.
|
||||
IMSIDetachIndication class >> messageType [ ^ self msgIMSIDetach ]
|
||||
IMSIDetachIndication class >> Mandantory [
|
||||
GSM48IMSIDetachInd class >> messageType [ ^ self msgIMSIDetach ]
|
||||
GSM48IMSIDetachInd class >> Mandantory [
|
||||
^ Mandantory ifNil: [ Mandantory := OrderedCollection new ].
|
||||
]
|
||||
|
||||
IMSIDetachIndication class >> initialize [
|
||||
GSM48IMSIDetachInd class >> initialize [
|
||||
self addMandantory: 'cm1' with: GSM48Classmark1.
|
||||
self addMandantory: 'mi' with: GSM48MIdentity.
|
||||
]
|
||||
]
|
||||
|
||||
Eval [
|
||||
LocationUpdatingRequest initialize.
|
||||
LocationUpdatingReject initialize.
|
||||
LocationUpdatingAccept initialize.
|
||||
AuthenticationRequest initialize.
|
||||
AuthenticationResponse initialize.
|
||||
IdentityRequest initialize.
|
||||
IdentityResponse initialize.
|
||||
CMServiceRequest initialize.
|
||||
IMSIDetachIndication initialize.
|
||||
GSM48LURequest initialize.
|
||||
GSM48LUReject initialize.
|
||||
GSM48LUAccept initialize.
|
||||
GSM48AuthReq initialize.
|
||||
GSM48AuthResp initialize.
|
||||
GSM48IdentityReq initialize.
|
||||
GSM48IdentityResponse initialize.
|
||||
GSM48CMServiceReq initialize.
|
||||
GSM48IMSIDetachInd initialize.
|
||||
]
|
||||
|
|
|
@ -107,7 +107,7 @@ Object subclass: MessageTests [
|
|||
MessageTests class >> createLU: aHandler [
|
||||
| lu bssap msg sccp |
|
||||
|
||||
lu := LocationUpdatingRequest new.
|
||||
lu := GSM48LURequest new.
|
||||
lu mi imsi: '666666666666'.
|
||||
|
||||
msg := IEMessage initWith: GSM0808Helper msgComplL3.
|
||||
|
|
6
Tests.st
6
Tests.st
|
@ -194,7 +194,7 @@ TestCase subclass: GSM48Test [
|
|||
|
||||
res := #(5 8 112 2 242 80 255 254 51 8 105 102 1 69 0 114 131 136) asByteArray.
|
||||
msg := Osmo.MessageBuffer new.
|
||||
gsm := LocationUpdatingRequest new.
|
||||
gsm := GSM48LURequest new.
|
||||
(gsm lai) mcc: 202; mnc: 5; lac: 65534.
|
||||
(gsm mi) imsi: '666105400273888'.
|
||||
gsm writeOn: msg.
|
||||
|
@ -244,7 +244,7 @@ TestCase subclass: TestMessages [
|
|||
self assert: (l3 isKindOf: GSMLayer3Info).
|
||||
|
||||
gsm48 := l3 data.
|
||||
self assert: (gsm48 isKindOf: LocationUpdatingRequest).
|
||||
self assert: (gsm48 isKindOf: GSM48LURequest).
|
||||
|
||||
self assert: gsm48 mi imsi = '666666666666'.
|
||||
|
||||
|
@ -262,7 +262,7 @@ TestCase subclass: TestMessages [
|
|||
self assert: (bssap isKindOf: BSSAPDTAP).
|
||||
|
||||
gsm48 := bssap data.
|
||||
self assert: (gsm48 isKindOf: LocationUpdatingReject).
|
||||
self assert: (gsm48 isKindOf: GSM48LUReject).
|
||||
|
||||
self assert: msg toMessage asByteArray = inp.
|
||||
]
|
||||
|
|
Reference in New Issue