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

GSM48: Parse the connect message..

This commit is contained in:
Holger Hans Peter Freyther 2010-11-30 22:33:10 +01:00
parent e70adb15db
commit 0974816a37
2 changed files with 42 additions and 0 deletions

View File

@ -525,6 +525,16 @@ GSM48DataHolder subclass: GSMCCCapabilities [
GSMCCCapabilities class >> elementId [ ^ 16r15 ]
]
GSM48DataHolder subclass: GSMConnectedNumber [
<comment: '10.5.4.13'>
GSMConnectedNumber class >> elementId [ ^ 16r4C ]
]
GSM48DataHolder subclass: GSMConnectedSubNumber [
<comment: '10.5.4.14'>
GSMConnectedSubNumber class >> elementId [ ^ 16r4D ]
]
GSM48SimpleData subclass: GSMAlertingPattern [
GSMAlertingPattern class >> elementId [ ^ 16r19 ]
GSMAlertingPattern class >> length [ ^ 2 ]
@ -729,6 +739,7 @@ GSM48MSG subclass: GSM48CCMessage [
GSM48CCMessage class >> msgAlerting [ ^ 16r1 ]
GSM48CCMessage class >> msgProceeding [ ^ 16r2 ]
GSM48CCMessage class >> msgSetup [ ^ 16r5 ]
GSM48CCMessage class >> msgConnect [ ^ 16r7 ]
ti [
^ ti ifNil: [ 0 ]
@ -1027,6 +1038,31 @@ GSM48CCMessage subclass: GSM48CCAlerting [
]
]
GSM48CCMessage subclass: GSM48CCConnect [
<category: 'osmo-message'>
Mandantory := nil.
Optional := nil.
GSM48CCConnect class >> messageType [ ^ self msgConnect ]
GSM48CCConnect class >> Mandantory [
^ Mandantory ifNil: [ Mandantory := OrderedCollection new. ]
]
GSM48CCConnect class >> Optional [
^ Optional ifNil: [ Optional := OrderedCollection new. ]
]
GSM48CCConnect class >> initialize [
self addOptional: 'facility' with: GSMFacility.
self addOptional: 'progress' with: GSMProgress.
self addOptional: 'connected' with: GSMConnectedNumber.
self addOptional: 'connectedSub' with: GSMConnectedSubNumber.
self addOptional: 'useruser' with: GSMUserUser.
self addOptional: 'ssVersion' with: GSMSSVersionInd.
]
]
Eval [
GSM48LURequest initialize.
GSM48LUReject initialize.
@ -1041,4 +1077,5 @@ Eval [
GSM48CCSetup initialize.
GSM48CCProceeding initialize.
GSM48CCAlerting initialize.
GSM48CCConnect initialize.
]

View File

@ -359,5 +359,10 @@ TestCase subclass: TestMessages [
inp := #(6 0 0 72 0 1 9 1 0 6 131 1 30 2 234 129) asByteArray.
msg := MSGParser parse: inp.
self assert: msg toMessage asByteArray = inp.
"Connect"
inp := #(6 0 0 72 0 1 5 1 0 2 131 7) asByteArray.
msg := MSGParser parse: inp.
self assert: msg toMessage asByteArray = inp.
]
]