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

gsm: Be able to parse the GSM 48 RR Channel Release

This commit is contained in:
Holger Hans Peter Freyther 2012-08-28 10:30:57 +02:00
parent fcfcfdbc59
commit 83fb82c3b0
2 changed files with 75 additions and 0 deletions

View File

@ -673,6 +673,24 @@ GSM48SimpleTag subclass: GSM48CTSPermission [
<gsmName: 'cts'>
]
GSM48SimpleTag subclass: GSM48GroupCipherKeyNumber [
<category: 'OsmoGSM'>
<comment: 'I represent the 10.5.1.10'>
<gsmIeMask: 16rF0>
<gsmElementId: 16r80>
<gsmName: 'groupCipherKey'>
]
GSM48SimpleTag subclass: GSM48GPRSResumption [
<category: 'OsmoGSM'>
<comment: 'I represent the 10.5.2.14c'>
<gsmIeMask: 16rF0>
<gsmElementId: 16rC0>
<gsmName: 'gprsResumption'>
]
GSM48SimpleData subclass: GSM48IdentityType [
<category: 'OsmoGSM'>
<comment: 'I represent the 10.5.3.4. Identity Type'>
@ -1489,6 +1507,33 @@ GSM48DataHolder subclass: GSMBackupBearerCapability [
<gsmMinValueSize: 1 max: 13>
]
GSM48DataHolder subclass: GSM48BARange [
<category: 'OsmoGSM'>
<comment: '105.2.1a'>
<gsmElementId: 16r73>
<gsmName: 'baRange'>
<gsmMinValueSize: 4 max: 128>
]
GSM48DataHolder subclass: GSM48GroupChannelDescription [
<category: 'OsmoGSM'>
<comment: '10.5.2.14b'>
<gsmElementId: 16r74>
<gsmName: 'groupChannelDescription'>
<gsmMinValueSize: 2 max: 11>
]
GSM48DataHolder subclass: GSM48BAListPref [
<category: 'OsmoGSM'>
<comment: '10.5.2.1c'>
<gsmElementId: 16r75>
<gsmName: 'baListPref'>
<gsmMinValueSize: 1 max: 128>
]
Osmo.TLVParserBase subclass: GSM48MSG [
| seq ti |
@ -2224,6 +2269,27 @@ GSM48RRMessage subclass: GSM48RRImmediateAssignCommand [
]
]
GSM48RRMessage subclass: GSM48RRChannelRelease [
<category: 'OsmoGSM'>
<comment: 'I represent a GSM 04.08 9.1.7 Channel Release'>
GSM48RRChannelRelease class [
messageType [ <category: 'parsing'> ^ self msgChannelRelease ]
]
GSM48RRChannelRelease class >> tlvDescription [
<category: 'parsing'>
^ OrderedCollection new
add: GSMRRCause asTLVDescription;
add: (GSM48BARange asTLVDescription beOptional; yourself);
add: (GSM48GroupChannelDescription asTLVDescription beOptional; yourself);
add: (GSM48GroupCipherKeyNumber asTLVDescription beConditional; yourself);
add: (GSM48GPRSResumption asTLVDescription beOptional; yourself);
add: (GSM48BAListPref asTLVDescription beOptional; yourself);
yourself
]
]
GSM48SSMessage subclass: GSM48SSFacility [
<category: 'OsmoGSM'>
@ -2288,6 +2354,7 @@ Eval [
GSM48RRAssignmentComplete initialize.
GSM48RRImmediateAssignCommand initialize.
GSM48RRChannelRelease initialize.
GSM48SSFacility initialize.
GSM48SSRegister initialize.

View File

@ -305,6 +305,14 @@ TestCase subclass: GSM48Test [
self assert: dec toMessage asByteArray = inp.
]
testRRChannelRelease [
| inp dec |
inp := #(16r06 16r0D 16r00) asByteArray.
dec := GSM48MSG decode: inp readStream.
self assert: dec type = GSM48RRChannelRelease messageType.
self assert: dec toMessage asByteArray = inp.
]
testCalledBCDNumber [
| dec |
dec := GSMCalledBCDNumber initWithData: #(145 51 83 102 246) asByteArray.