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

GSM48: Parse the Release Complete message...

This commit is contained in:
Holger Hans Peter Freyther 2010-12-01 10:54:26 +01:00
parent dd4b5a5595
commit 11631c1065
2 changed files with 33 additions and 1 deletions

View File

@ -256,10 +256,11 @@ GSM48IE subclass: GSM48Classmark1 [
]
GSM48SimpleData subclass: GSM48Classmark2 [
"TODO: This is broken... it needs to be a simple data holder"
<comment: 'I am CM2 of 10.5.1.6'>
GSM48Classmark2 class >> defaultValue [
^ ByteArray with: 16r33 with: 16r19 with: 16rA2.
^ ByteArray with: 3 with: 16r33 with: 16r19 with: 16rA2.
]
GSM48Classmark2 class >> length [
@ -543,6 +544,7 @@ GSM48DataHolder subclass: GSMAllowedActions [
GSM48DataHolder subclass: GSM48Cause [
<comment: '10.5.4.11'>
GSM48Cause class >> elementId [ ^ 16r8 ]
]
GSM48SimpleData subclass: GSMAlertingPattern [
@ -752,6 +754,7 @@ GSM48MSG subclass: GSM48CCMessage [
GSM48CCMessage class >> msgConnect [ ^ 16r7 ]
GSM48CCMessage class >> msgConnectAck [ ^ 16rF ]
GSM48CCMessage class >> msgDisconnect [ ^ 16r25 ]
GSM48CCMessage class >> msgReleaseCompl [ ^ 16r2A ]
GSM48CCMessage class >> msgRelease [ ^ 16r2D ]
ti [
@ -1147,6 +1150,29 @@ GSM48CCMessage subclass: GSM48CCRelease [
]
]
GSM48CCMessage subclass: GSM48CCReleaseCompl [
<category: 'osmo-message'>
Optional := nil.
Mandantory := nil.
GSM48CCReleaseCompl class >> messageType [ ^ self msgReleaseCompl ]
GSM48CCReleaseCompl class >> Mandantory [
^ Mandantory ifNil: [ Mandantory := OrderedCollection new ]
]
GSM48CCReleaseCompl class >> Optional [
^ Optional ifNil: [ Optional := OrderedCollection new ]
]
GSM48CCReleaseCompl class >> initialize [
self addOptional: 'cause' with: GSM48Cause.
self addOptional: 'facility' with: GSMFacility.
self addOptional: 'useruser' with: GSMUserUser.
self addOptional: 'ssVersion' with: GSMSSVersionInd.
]
]
Eval [
GSM48LURequest initialize.
GSM48LUReject initialize.
@ -1165,4 +1191,5 @@ Eval [
GSM48CCConnectAck initialize.
GSM48CCDisconnect initialize.
GSM48CCRelease initialize.
GSM48CCReleaseCompl initialize.
]

View File

@ -379,5 +379,10 @@ TestCase subclass: TestMessages [
inp := #(6 1 3 35 0 1 5 1 128 2 3 109) asByteArray.
msg := MSGParser parse: inp.
self assert: msg toMessage asByteArray = inp.
"Release Complete"
inp := #(6 0 0 72 0 1 9 1 0 6 131 42 8 2 225 144) asByteArray.
msg := MSGParser parse: inp.
self assert: msg toMessage asByteArray = inp.
]
]