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

GSM: Implement handling the GSM Alerting messages..

This commit is contained in:
Holger Hans Peter Freyther 2010-11-30 21:25:47 +01:00
parent 45bb391116
commit e70adb15db
2 changed files with 33 additions and 0 deletions

View File

@ -643,6 +643,8 @@ IEMessage subclass: GSM48MSG [
"TODO: Complain if we have not consumed everything"
dat size = 0
ifFalse: [
res inspect.
dat printNl.
self error: 'Every byte should be consumed'.
].
@ -724,6 +726,7 @@ GSM48MSG subclass: GSM48CCMessage [
GSM48CCMessage class >> classType [ ^ 16r3 ]
GSM48CCMessage class >> msgAlerting [ ^ 16r1 ]
GSM48CCMessage class >> msgProceeding [ ^ 16r2 ]
GSM48CCMessage class >> msgSetup [ ^ 16r5 ]
@ -1000,6 +1003,30 @@ GSM48CCMessage subclass: GSM48CCProceeding [
]
]
GSM48CCMessage subclass: GSM48CCAlerting [
<category: 'osmo-message'>
Mandantory := nil.
Optional := nil.
GSM48CCAlerting class >> messageType [ ^ self msgAlerting ]
GSM48CCAlerting class >> Mandantory [
^ Mandantory ifNil: [ Mandantory := OrderedCollection new ]
]
GSM48CCAlerting class >> Optional [
^ Optional ifNil: [ Optional := OrderedCollection new ]
]
GSM48CCAlerting class >> initialize [
self addOptional: 'facility' with: GSMFacility.
self addOptional: 'progress' with: GSMProgress.
self addOptional: 'useruser' with: GSMUserUser.
"mobile station to network"
self addOptional: 'ssVersion' with: GSMSSVersionInd.
]
]
Eval [
GSM48LURequest initialize.
GSM48LUReject initialize.
@ -1013,4 +1040,5 @@ Eval [
GSM48CCSetup initialize.
GSM48CCProceeding initialize.
GSM48CCAlerting initialize.
]

View File

@ -354,5 +354,10 @@ TestCase subclass: TestMessages [
inp := #(6 0 0 72 0 1 5 1 0 2 131 2) asByteArray.
msg := MSGParser parse: inp.
self assert: msg toMessage asByteArray = inp.
"Alerting"
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.
]
]