2010-12-14 02:03:20 +00:00
|
|
|
"
|
2011-03-31 09:09:23 +00:00
|
|
|
(C) 2010-2011 by Holger Hans Peter Freyther
|
2010-12-14 02:03:20 +00:00
|
|
|
All Rights Reserved
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Affero General Public License as
|
|
|
|
published by the Free Software Foundation, either version 3 of the
|
|
|
|
License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU Affero General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
"
|
2010-11-17 15:56:10 +00:00
|
|
|
"Messages for GSM04.08"
|
|
|
|
|
2010-11-17 20:19:42 +00:00
|
|
|
"""
|
|
|
|
IEs for GSM48MSG
|
|
|
|
"""
|
2010-11-26 15:18:06 +00:00
|
|
|
|
2010-11-27 12:38:40 +00:00
|
|
|
IEBase subclass: GSM48IE [
|
2010-11-26 21:00:47 +00:00
|
|
|
<comment: 'I am a Information Element for GSM48'>
|
2010-11-30 19:47:45 +00:00
|
|
|
|
|
|
|
GSM48IE class >> ieMask [
|
|
|
|
"Some IEs encode the IE and the value into one. Return the mask to be used
|
|
|
|
to determine the IE and see if it is matching."
|
|
|
|
^ 16rFF
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
GSM48IE subclass: GSM48SimpleTag [
|
|
|
|
| value |
|
|
|
|
<category: 'osmo-message'>
|
|
|
|
<comment: 'I am a simple Tag. Some TAGs even share the value in there'>
|
|
|
|
|
|
|
|
GSM48SimpleTag class >> ieMask [ ^ 16rF0 ]
|
|
|
|
GSM48SimpleTag class >> initWithData: aData [
|
|
|
|
^ self new
|
|
|
|
value: aData;
|
|
|
|
yourself
|
|
|
|
]
|
|
|
|
|
|
|
|
GSM48SimpleTag class >> length: aByteArray [
|
|
|
|
^ 0
|
|
|
|
]
|
|
|
|
|
|
|
|
value: aValue [
|
|
|
|
| inv |
|
|
|
|
inv := 255 - self class ieMask.
|
|
|
|
value := (aValue bitAnd: inv)
|
|
|
|
]
|
|
|
|
|
|
|
|
value [
|
|
|
|
^ value ifNil: [ 0 ]
|
|
|
|
]
|
|
|
|
|
|
|
|
writeOn: aMsg [
|
|
|
|
| combined |
|
|
|
|
combined := self class elementId bitOr: value.
|
|
|
|
aMsg putByte: combined.
|
|
|
|
]
|
|
|
|
|
|
|
|
writeOnDirect: aMsg [
|
|
|
|
self shouldNotImplement
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
GSM48IE subclass: GSM48DataHolder [
|
|
|
|
| data |
|
|
|
|
<comment: 'A simple wrapper for the lazy ones'>
|
|
|
|
|
|
|
|
GSM48DataHolder class >> createDefault [
|
2010-12-11 07:04:47 +00:00
|
|
|
| size data |
|
|
|
|
size := self validSizes first.
|
|
|
|
data := ByteArray new: size.
|
|
|
|
^ self new data: data; yourself.
|
2010-11-30 19:47:45 +00:00
|
|
|
]
|
|
|
|
|
2010-12-04 07:49:02 +00:00
|
|
|
GSM48DataHolder class >> validSizes [ ^ 1 to: 180 ]
|
|
|
|
|
2010-11-30 19:47:45 +00:00
|
|
|
GSM48DataHolder class >> length: aByteArray [
|
|
|
|
^ (aByteArray at: 1) + 1.
|
|
|
|
]
|
|
|
|
|
|
|
|
GSM48DataHolder class >> initWithData: aData [
|
|
|
|
^ self new
|
|
|
|
data: aData;
|
|
|
|
yourself.
|
|
|
|
]
|
|
|
|
|
|
|
|
GSM48DataHolder class >> parseFrom: aData [
|
|
|
|
| len |
|
|
|
|
len := aData at: 1.
|
|
|
|
^ self initWithData: (aData copyFrom: 2 to: 2 + len - 1)
|
|
|
|
]
|
|
|
|
|
|
|
|
data: aData [
|
2010-12-04 07:49:02 +00:00
|
|
|
| size |
|
|
|
|
"Add the size for the length header"
|
|
|
|
(self class validSizes includes: aData size + 1)
|
|
|
|
ifFalse: [
|
|
|
|
^ self error: 'The data is not of a valid size'.
|
|
|
|
].
|
|
|
|
|
2010-11-30 19:47:45 +00:00
|
|
|
data := aData.
|
|
|
|
]
|
|
|
|
|
|
|
|
data [ ^ data ]
|
|
|
|
|
|
|
|
writeOn: aMsg [
|
|
|
|
aMsg putByte: self class elementId.
|
|
|
|
aMsg putByte: data size.
|
|
|
|
aMsg putByteArray: data.
|
|
|
|
]
|
|
|
|
|
|
|
|
writeOnDirect: aMsg [
|
2010-11-30 21:53:08 +00:00
|
|
|
aMsg putByte: data size.
|
|
|
|
aMsg putByteArray: data.
|
2010-11-30 19:47:45 +00:00
|
|
|
]
|
2010-11-26 21:00:47 +00:00
|
|
|
]
|
|
|
|
|
2010-11-26 21:41:54 +00:00
|
|
|
GSM48IE subclass: GSM48SimpleData [
|
|
|
|
| data |
|
|
|
|
|
|
|
|
<category: 'osmo-meesage'>
|
|
|
|
<comment: 'I am the base for some simple data encapsulated'>
|
|
|
|
|
|
|
|
GSM48SimpleData class >> initWithData: aData [
|
|
|
|
^ self new
|
|
|
|
data: aData;
|
|
|
|
yourself.
|
|
|
|
]
|
|
|
|
|
|
|
|
GSM48SimpleData class >> length: aByteArray [
|
|
|
|
^ self length
|
|
|
|
]
|
|
|
|
|
2010-11-26 21:55:13 +00:00
|
|
|
GSM48SimpleData class >> defaultValue [
|
|
|
|
^ ByteArray new: self length
|
|
|
|
]
|
|
|
|
|
2010-11-26 21:41:54 +00:00
|
|
|
GSM48SimpleData class >> createDefault [
|
|
|
|
^ self new
|
2010-11-26 21:55:13 +00:00
|
|
|
data: self defaultValue;
|
2010-11-26 21:41:54 +00:00
|
|
|
yourself
|
|
|
|
]
|
|
|
|
|
|
|
|
GSM48SimpleData class >> parseFrom: aByteArray [
|
|
|
|
| dat |
|
2010-12-01 23:05:01 +00:00
|
|
|
dat := aByteArray copyFrom: 1 to: self length.
|
2010-11-26 21:41:54 +00:00
|
|
|
|
|
|
|
^ self new
|
|
|
|
data: dat;
|
|
|
|
yourself
|
|
|
|
]
|
|
|
|
|
|
|
|
data [
|
|
|
|
^ data
|
|
|
|
]
|
|
|
|
|
|
|
|
data: aData [
|
|
|
|
aData size = self class length
|
|
|
|
ifFalse: [
|
|
|
|
Error signal: 'DATA needs to be ', self class length asString, ' long.',
|
|
|
|
'But it was ', aData size asString, ' long.'.
|
|
|
|
].
|
|
|
|
|
|
|
|
data := aData.
|
|
|
|
]
|
|
|
|
|
|
|
|
writeOnDirect: aMsg [
|
|
|
|
aMsg putByteArray: data.
|
|
|
|
]
|
|
|
|
|
|
|
|
writeOn: aMsg [
|
|
|
|
"Write a TV"
|
|
|
|
aMsg putByte: self class elementId.
|
|
|
|
self writeOnDirect: aMsg
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
|
2010-11-27 13:25:00 +00:00
|
|
|
GSM48SimpleData subclass: GSM48KeySeqLuType [
|
2010-11-19 08:02:26 +00:00
|
|
|
<category: 'osmo-message'>
|
2010-11-27 13:25:00 +00:00
|
|
|
<comment: 'This byte is shared for two things'>
|
2010-11-17 20:19:42 +00:00
|
|
|
| val |
|
2010-11-17 15:56:10 +00:00
|
|
|
|
2010-11-17 20:19:42 +00:00
|
|
|
GSM48KeySeqLuType class >> createDefault [
|
2010-11-19 08:02:26 +00:00
|
|
|
<category: 'creation'>
|
2010-11-17 15:56:10 +00:00
|
|
|
^ (self new)
|
2010-11-17 20:19:42 +00:00
|
|
|
val: 16r70;
|
2010-11-17 15:56:10 +00:00
|
|
|
yourself
|
|
|
|
]
|
|
|
|
|
2010-11-27 13:25:00 +00:00
|
|
|
GSM48KeySeqLuType class >> length [
|
2010-11-23 22:37:27 +00:00
|
|
|
"We always need a byte"
|
|
|
|
^ 1
|
|
|
|
]
|
|
|
|
|
|
|
|
val [
|
2010-11-27 13:25:00 +00:00
|
|
|
^ self data at: 1
|
2010-11-23 22:37:27 +00:00
|
|
|
]
|
|
|
|
|
2010-11-17 20:19:42 +00:00
|
|
|
val: aVal [
|
2010-11-19 08:02:26 +00:00
|
|
|
<category: 'creation'>
|
2010-11-27 13:25:00 +00:00
|
|
|
self data: (ByteArray with: aVal).
|
2010-11-17 20:19:42 +00:00
|
|
|
]
|
|
|
|
]
|
|
|
|
|
2010-11-26 21:00:47 +00:00
|
|
|
GSM48IE subclass: GSM48Lai [
|
2010-11-23 22:38:17 +00:00
|
|
|
| lai lac |
|
2010-11-19 08:02:26 +00:00
|
|
|
<category: 'osmo-message'>
|
2010-11-17 20:19:42 +00:00
|
|
|
GSM48Lai class >> createDefault [
|
2010-11-19 08:02:26 +00:00
|
|
|
<category: 'creation'>
|
2010-11-17 15:56:10 +00:00
|
|
|
^ (self new)
|
2010-11-23 22:38:17 +00:00
|
|
|
lai: (LAI initWith: 0 mnc: 0);
|
2010-11-17 20:19:42 +00:00
|
|
|
lac: 0;
|
2010-11-17 15:56:10 +00:00
|
|
|
yourself
|
|
|
|
]
|
|
|
|
|
2010-11-23 22:45:11 +00:00
|
|
|
GSM48Lai class >> length: aByteArray [
|
|
|
|
^ 5
|
|
|
|
]
|
|
|
|
|
|
|
|
GSM48Lai class >> parseFrom: aByteArray [
|
|
|
|
^ (self new)
|
|
|
|
lai: (LAI parseFrom: (aByteArray copyFrom: 1 to: 3));
|
|
|
|
lac: (aByteArray ushortAt: 4) swap16;
|
|
|
|
yourself
|
|
|
|
]
|
|
|
|
|
2010-11-23 22:38:17 +00:00
|
|
|
mcc: aMcc [ <category: 'creation'> lai mcc: aMcc ]
|
|
|
|
mnc: aMnc [ <category: 'creation'> lai mnc: aMnc ]
|
|
|
|
lai: aLai [ <category: 'creation'> lai := aLai ]
|
2010-11-19 08:02:26 +00:00
|
|
|
lac: aLac [ <category: 'creation'> lac := aLac ]
|
2010-11-17 20:19:42 +00:00
|
|
|
|
2010-11-23 22:45:11 +00:00
|
|
|
mcc [ ^ lai mcc ]
|
|
|
|
mnc [ ^ lai mnc ]
|
|
|
|
lac [ ^ lac ]
|
|
|
|
|
2010-11-20 00:20:00 +00:00
|
|
|
writeOnDirect: aMsg [
|
2010-11-19 08:02:26 +00:00
|
|
|
<category: 'creation'>
|
2010-11-23 22:38:17 +00:00
|
|
|
lai writeOn: aMsg.
|
2010-11-17 21:43:43 +00:00
|
|
|
aMsg putLen16: lac.
|
2010-11-17 15:56:10 +00:00
|
|
|
]
|
|
|
|
]
|
|
|
|
|
2010-11-26 21:00:47 +00:00
|
|
|
GSM48IE subclass: GSM48Classmark1 [
|
2010-11-19 08:02:26 +00:00
|
|
|
<category: 'osmo-message'>
|
2010-11-17 20:19:42 +00:00
|
|
|
| cm1 |
|
|
|
|
|
|
|
|
GSM48Classmark1 class >> createDefault [
|
2010-11-19 08:02:26 +00:00
|
|
|
<category: 'creation'>
|
2010-11-17 20:19:42 +00:00
|
|
|
^ (self new)
|
|
|
|
cm1: 16r33;
|
|
|
|
yourself
|
|
|
|
]
|
|
|
|
|
2010-11-23 22:48:52 +00:00
|
|
|
GSM48Classmark1 class >> length: aByteArray [
|
|
|
|
^ 1
|
|
|
|
]
|
|
|
|
|
|
|
|
GSM48Classmark1 class >> parseFrom: aByteArray [
|
|
|
|
^ (self new)
|
|
|
|
cm1: (aByteArray at: 1);
|
|
|
|
yourself
|
|
|
|
]
|
|
|
|
|
2010-11-19 08:02:26 +00:00
|
|
|
cm1: aCm [ <category: 'creation'> cm1 := aCm ]
|
2010-11-23 22:48:52 +00:00
|
|
|
cm1 [ ^ cm1 ]
|
|
|
|
|
2010-11-20 00:20:00 +00:00
|
|
|
writeOnDirect: aMsg [
|
2010-11-19 08:02:26 +00:00
|
|
|
<category: 'creation'>
|
2010-11-17 20:19:42 +00:00
|
|
|
aMsg putByte: cm1.
|
2010-11-17 15:56:10 +00:00
|
|
|
]
|
|
|
|
]
|
|
|
|
|
2010-12-04 07:49:02 +00:00
|
|
|
GSM48DataHolder subclass: GSM48Classmark2 [
|
2010-12-01 09:54:26 +00:00
|
|
|
"TODO: This is broken... it needs to be a simple data holder"
|
2010-11-27 13:25:41 +00:00
|
|
|
<comment: 'I am CM2 of 10.5.1.6'>
|
|
|
|
|
2010-12-04 07:49:02 +00:00
|
|
|
GSM48Classmark2 class >> createDefault [
|
|
|
|
^ self new
|
|
|
|
data: self defaultValue;
|
|
|
|
yourself
|
2010-11-27 13:25:41 +00:00
|
|
|
]
|
|
|
|
|
2010-12-04 07:49:02 +00:00
|
|
|
GSM48Classmark2 class >> defaultValue [
|
|
|
|
^ ByteArray with: 16r33 with: 16r19 with: 16rA2.
|
2010-11-27 13:25:41 +00:00
|
|
|
]
|
2010-12-04 07:49:02 +00:00
|
|
|
|
|
|
|
GSM48Classmark2 class >> validSizes [ ^ 4 to: 4 ]
|
2010-11-27 13:25:41 +00:00
|
|
|
]
|
|
|
|
|
2010-11-26 21:00:47 +00:00
|
|
|
GSM48IE subclass: GSM48MIdentity [
|
2010-11-19 08:02:26 +00:00
|
|
|
<category: 'osmo-message'>
|
2010-11-17 20:19:42 +00:00
|
|
|
| imsi tmsi |
|
2010-11-19 19:26:59 +00:00
|
|
|
|
|
|
|
GSM48MIdentity class >> miIMSI [ <category: 'spec'> ^ 16r1 ]
|
|
|
|
GSM48MIdentity class >> miIMEI [ <category: 'spec'> ^ 16r2 ]
|
|
|
|
GSM48MIdentity class >> miIMEISV [ <category: 'spec'> ^ 16r3 ]
|
|
|
|
GSM48MIdentity class >> miTMSI [ <category: 'sepc'> ^ 16r4 ]
|
|
|
|
|
2010-11-26 15:18:06 +00:00
|
|
|
GSM48MIdentity class >> elementId [ ^ 23 ]
|
|
|
|
|
2010-11-17 20:19:42 +00:00
|
|
|
GSM48MIdentity class >> createDefault [
|
2010-11-19 08:02:26 +00:00
|
|
|
<category: 'creation'>
|
2010-11-17 20:19:42 +00:00
|
|
|
^ (self new)
|
|
|
|
imsi: '000000000000';
|
|
|
|
yourself
|
|
|
|
]
|
|
|
|
|
2010-11-23 23:12:36 +00:00
|
|
|
GSM48MIdentity class >> length: aByteArray [
|
|
|
|
^ (aByteArray at: 1) + 1
|
|
|
|
]
|
|
|
|
|
|
|
|
GSM48MIdentity class >> parseFrom: aByteArray [
|
|
|
|
| len head type |
|
|
|
|
|
|
|
|
len := aByteArray at: 1.
|
|
|
|
head := aByteArray at: 2.
|
|
|
|
type := head bitAnd: 16r7.
|
|
|
|
|
|
|
|
type = self miIMSI
|
|
|
|
ifTrue: [
|
|
|
|
| odd digits |
|
|
|
|
digits := OrderedCollection new.
|
|
|
|
odd := (head bitShift: -3) bitAnd: 16r1.
|
|
|
|
|
|
|
|
digits add: ((head bitShift: -4) bitAnd: 16rF).
|
|
|
|
|
|
|
|
3 to: (1 + len) do: [:each |
|
|
|
|
digits add: ((aByteArray at: each) bitAnd: 16rF).
|
|
|
|
digits add: (((aByteArray at: each) bitShift: -4) bitAnd: 16rF).
|
|
|
|
].
|
|
|
|
|
|
|
|
"The last was just a dummy value"
|
|
|
|
odd = 1 ifFalse: [
|
|
|
|
digits removeLast.
|
|
|
|
].
|
|
|
|
|
|
|
|
^ (self new) imsi: (BCD decode: digits) asString; yourself
|
|
|
|
].
|
|
|
|
|
|
|
|
self notYetImplemented.
|
|
|
|
]
|
|
|
|
|
2010-11-19 08:02:26 +00:00
|
|
|
imsi: aImsi [ <category: 'creation'> imsi := aImsi. ]
|
2010-11-23 23:12:36 +00:00
|
|
|
imsi [ ^ imsi ]
|
|
|
|
|
2010-11-20 00:20:00 +00:00
|
|
|
writeOnDirect: aMsg [
|
2010-11-19 08:02:26 +00:00
|
|
|
<category: 'creation'>
|
2010-11-18 14:31:25 +00:00
|
|
|
imsi ifNotNil: [
|
|
|
|
^ self storeImsiDirect: aMsg.
|
|
|
|
].
|
2010-11-17 21:39:28 +00:00
|
|
|
self notYetImplemented
|
2010-11-17 15:56:10 +00:00
|
|
|
]
|
2010-11-18 14:31:25 +00:00
|
|
|
|
|
|
|
storeImsiDirect: aMsg [
|
2010-11-19 19:26:59 +00:00
|
|
|
| odd len head encoded bcds |
|
2010-11-19 18:10:38 +00:00
|
|
|
<category: 'private'>
|
2010-11-19 19:26:59 +00:00
|
|
|
|
|
|
|
odd := imsi size odd.
|
|
|
|
|
|
|
|
"Calculate the length. We can fit two digits into one byte"
|
|
|
|
len := odd
|
|
|
|
ifTrue: [ (imsi size + 1) / 2 ]
|
|
|
|
ifFalse: [ (imsi size / 2) + 1 ].
|
|
|
|
aMsg putByte: len.
|
|
|
|
|
|
|
|
"Create the first data"
|
|
|
|
head := ((imsi at: 1) digitValue) bitShift: 4.
|
|
|
|
odd ifTrue: [
|
|
|
|
head := head bitOr: (1 bitShift: 3).
|
|
|
|
].
|
|
|
|
head := head bitOr: self class miIMSI.
|
|
|
|
aMsg putByte: head.
|
|
|
|
|
|
|
|
"Encode everything from 2..n into a ByteArray of len - 1"
|
|
|
|
bcds := OrderedCollection new.
|
|
|
|
2 to: imsi size do: [:pos |
|
|
|
|
bcds add: (imsi at: pos) digitValue.
|
|
|
|
].
|
|
|
|
|
|
|
|
odd ifFalse: [
|
|
|
|
bcds add: 16r0F.
|
|
|
|
].
|
|
|
|
|
|
|
|
"now fold the bcds into and encoded array"
|
|
|
|
|
|
|
|
encoded := OrderedCollection new.
|
|
|
|
1 to: bcds size by: 2 do: [:pos |
|
|
|
|
| lower upper |
|
|
|
|
lower := bcds at: pos.
|
|
|
|
upper := bcds at: pos + 1.
|
|
|
|
|
|
|
|
encoded add: ((upper bitShift: 4) bitOr: lower).
|
|
|
|
].
|
|
|
|
|
|
|
|
aMsg putByteArray: encoded asByteArray.
|
2010-11-18 14:31:25 +00:00
|
|
|
]
|
2010-11-17 15:56:10 +00:00
|
|
|
]
|
|
|
|
|
2010-11-26 21:05:22 +00:00
|
|
|
GSM48SimpleData subclass: GSM48RejectCause [
|
2010-11-26 21:01:22 +00:00
|
|
|
|
|
|
|
GSM48RejectCause class >> createDefault [
|
|
|
|
<category: 'creation'>
|
|
|
|
^ self new
|
|
|
|
cause: 11;
|
|
|
|
yourself.
|
|
|
|
]
|
|
|
|
|
2010-11-26 21:05:22 +00:00
|
|
|
GSM48RejectCause class >> length [
|
2010-11-26 21:01:22 +00:00
|
|
|
^ 1
|
|
|
|
]
|
|
|
|
|
|
|
|
cause [
|
2010-11-26 21:05:22 +00:00
|
|
|
^ self data at: 1
|
2010-11-26 21:01:22 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
cause: aCause [
|
2010-11-26 21:05:22 +00:00
|
|
|
self data: (ByteArray with: aCause).
|
2010-11-26 21:01:22 +00:00
|
|
|
]
|
|
|
|
]
|
|
|
|
|
2010-11-24 21:18:48 +00:00
|
|
|
GSM48SimpleData subclass: GSM48AuthRand [
|
|
|
|
<category: 'osmo-meesage'>
|
|
|
|
<comment: 'I represent the 10.5.3.1 Authentication parameter RAND'>
|
|
|
|
|
|
|
|
GSM48AuthRand class >> length [ ^ 16 ]
|
|
|
|
]
|
|
|
|
|
|
|
|
GSM48SimpleData subclass: GSM48AuthSRES [
|
|
|
|
<category: 'osmo-message'>
|
|
|
|
<comment: 'I represent the 10.5.3.2 Auth. parameter SRES'>
|
|
|
|
|
|
|
|
GSM48AuthSRES class >> length [ ^ 4 ]
|
|
|
|
]
|
|
|
|
|
2010-11-30 19:47:45 +00:00
|
|
|
GSM48SimpleTag subclass: GSM48FollowOn [
|
2010-11-26 15:18:06 +00:00
|
|
|
<category: 'osmo-message'>
|
|
|
|
<comment: 'I represent the 10.5.3.7. A simple tag value'>
|
|
|
|
|
2010-11-30 19:47:45 +00:00
|
|
|
GSM48FollowOn class >> ieMask [ ^ 16rFF ]
|
2010-11-26 15:18:06 +00:00
|
|
|
GSM48FollowOn class >> elementId [ ^ 16rA1 ]
|
|
|
|
]
|
|
|
|
|
2010-11-30 19:47:45 +00:00
|
|
|
GSM48SimpleTag subclass: GSM48CTSPermission [
|
2010-11-26 15:18:06 +00:00
|
|
|
<category: 'osmo-message'>
|
|
|
|
<comment: 'I represent the 10.5.3.7. A simple tag value'>
|
|
|
|
|
2010-11-30 19:47:45 +00:00
|
|
|
GSM48CTSPermission class >> ieMask [ ^ 16rFF ]
|
2010-11-26 15:18:06 +00:00
|
|
|
GSM48CTSPermission class >> elementId [ ^ 16rA2 ]
|
|
|
|
]
|
|
|
|
|
2010-11-26 21:55:13 +00:00
|
|
|
GSM48SimpleData subclass: GSM48IdentityType [
|
|
|
|
<category: 'osmo-message'>
|
|
|
|
<comment: 'I represent the 10.5.3.4. Identity Type'>
|
|
|
|
"Ignore the spare values"
|
|
|
|
|
|
|
|
GSM48IdentityType class >> typeIMSI [ ^ 1 ]
|
|
|
|
GSM48IdentityType class >> typeIMEI [ ^ 2 ]
|
|
|
|
GSM48IdentityType class >> typeIMEISV [ ^ 3 ]
|
|
|
|
GSM48IdentityType class >> typeTMSI [ ^ 4 ]
|
|
|
|
|
|
|
|
GSM48IdentityType class >> defaultValue [
|
|
|
|
^ ByteArray with: self typeIMSI
|
|
|
|
]
|
|
|
|
|
|
|
|
GSM48IdentityType class >> length [ ^ 1 ]
|
2010-12-18 15:48:34 +00:00
|
|
|
|
|
|
|
type: aType [
|
|
|
|
self data: (ByteArray with: aType)
|
|
|
|
]
|
2010-11-26 21:55:13 +00:00
|
|
|
]
|
|
|
|
|
2010-11-30 19:47:45 +00:00
|
|
|
GSM48SimpleTag subclass: GSMRepeatInd [
|
|
|
|
GSMRepeatInd class >> elementId [ ^ 16rD0 ]
|
|
|
|
]
|
|
|
|
|
|
|
|
GSM48SimpleTag subclass: GSMPriorityLevel [
|
|
|
|
GSMPriorityLevel class >> elementId [ ^ 16r80 ]
|
|
|
|
]
|
|
|
|
|
|
|
|
GSM48DataHolder subclass: GSMBearerCap [
|
|
|
|
GSMBearerCap class >> elementId [ ^ 16r04 ]
|
2010-12-04 07:49:02 +00:00
|
|
|
GSMBearerCap class >> validSizes [ ^ 1 to: 14 ]
|
2010-11-30 19:47:45 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
GSM48DataHolder subclass: GSMFacility [
|
|
|
|
GSMFacility class >> elementId [ ^ 16r1C ]
|
2010-12-04 07:49:02 +00:00
|
|
|
GSMFacility class >> validSizes [ ^ 1 to: 254 ]
|
2010-11-30 19:47:45 +00:00
|
|
|
]
|
|
|
|
|
2010-12-04 07:49:02 +00:00
|
|
|
GSM48DataHolder subclass: GSMProgress [
|
2010-11-30 19:47:45 +00:00
|
|
|
GSMProgress class >> elementId [ ^ 16r1E ]
|
2010-12-04 07:49:02 +00:00
|
|
|
GSMProgress class >> validSizes [ ^ 3 to: 3 ]
|
2010-11-30 19:47:45 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
GSM48SimpleData subclass: GSMSignal [
|
|
|
|
| signal |
|
|
|
|
GSMSignal class >> elementId [ ^ 16r34 ]
|
|
|
|
GSMSignal class >> length [ ^ 1 ]
|
|
|
|
]
|
|
|
|
|
2010-12-04 09:39:21 +00:00
|
|
|
Object subclass: GSMNumberingPlan [
|
|
|
|
<comment: 'I represent table 10.5.1.118'>
|
|
|
|
GSMNumberingPlan class >> planUnknown [ ^ 0 ]
|
|
|
|
GSMNumberingPlan class >> planISDN [ ^ 1 ]
|
|
|
|
GSMNumberingPlan class >> planData [ ^ 3 ]
|
|
|
|
GSMNumberingPlan class >> planTelex [ ^ 4 ]
|
|
|
|
GSMNumberingPlan class >> planNational [ ^ 8 ]
|
|
|
|
GSMNumberingPlan class >> planPrivate [ ^ 9 ]
|
|
|
|
GSMNumberingPlan class >> planReserved [ ^ 15 ]
|
|
|
|
]
|
|
|
|
|
|
|
|
Object subclass: GSMNumberDigits [
|
|
|
|
<comment: 'I represent table 10.5.118 continued'>
|
|
|
|
DigitMap := nil.
|
2010-12-05 08:39:56 +00:00
|
|
|
ReverseMap := nil.
|
2010-12-04 09:39:21 +00:00
|
|
|
|
|
|
|
GSMNumberDigits class >> mapDigit: aBinary [
|
|
|
|
^ self digitMap at: aBinary asInteger + 1.
|
|
|
|
]
|
|
|
|
|
2010-12-05 08:39:56 +00:00
|
|
|
GSMNumberDigits class >> digitMap: aDigit [
|
|
|
|
^ self reverseMap at: aDigit.
|
|
|
|
]
|
|
|
|
|
2010-12-04 09:39:21 +00:00
|
|
|
GSMNumberDigits class >> digitMap [
|
|
|
|
^ DigitMap ifNil: [
|
|
|
|
DigitMap := Dictionary new.
|
|
|
|
1 to: 10 do: [:each |
|
|
|
|
DigitMap at: each put: (each + 48 - 1) asCharacter.
|
|
|
|
].
|
|
|
|
|
|
|
|
DigitMap at: 11 put: $*.
|
|
|
|
DigitMap at: 12 put: $#.
|
|
|
|
DigitMap at: 13 put: $a.
|
|
|
|
DigitMap at: 14 put: $b.
|
|
|
|
DigitMap at: 15 put: $c.
|
|
|
|
DigitMap at: 16 put: Character eof.
|
|
|
|
DigitMap yourself.
|
|
|
|
].
|
|
|
|
]
|
|
|
|
|
2010-12-05 08:39:56 +00:00
|
|
|
GSMNumberDigits class >> reverseMap [
|
|
|
|
^ ReverseMap ifNil: [
|
|
|
|
ReverseMap := Dictionary new.
|
|
|
|
self digitMap associationsDo: [:each |
|
|
|
|
ReverseMap at: each value put: (each key - 1).
|
|
|
|
].
|
|
|
|
|
|
|
|
ReverseMap yourself.
|
|
|
|
].
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-12-04 09:39:21 +00:00
|
|
|
GSMNumberDigits class >> decodeFrom: anArray [
|
|
|
|
| str |
|
|
|
|
|
|
|
|
str := OrderedCollection new.
|
|
|
|
|
|
|
|
1 to: anArray size do: [:each |
|
|
|
|
| low high char |
|
|
|
|
low := (anArray at: each) bitAnd: 16r0F.
|
|
|
|
str add: (self mapDigit: low).
|
|
|
|
|
|
|
|
high := ((anArray at: each) bitAnd: 16rF0) bitShift: -4.
|
|
|
|
char := (self mapDigit: high).
|
|
|
|
char = Character eof
|
|
|
|
ifFalse: [
|
|
|
|
str add: char.
|
|
|
|
].
|
|
|
|
].
|
|
|
|
|
|
|
|
^ str asString
|
|
|
|
]
|
2010-12-05 08:39:56 +00:00
|
|
|
|
|
|
|
GSMNumberDigits class >> encodeFrom: aNumber [
|
|
|
|
| digits res |
|
|
|
|
digits := OrderedCollection new.
|
|
|
|
|
|
|
|
aNumber do: [:digit |
|
|
|
|
digits add: (self digitMap: digit).
|
|
|
|
].
|
|
|
|
|
|
|
|
digits size odd
|
|
|
|
ifTrue: [
|
|
|
|
digits add: 16rF.
|
|
|
|
].
|
|
|
|
|
|
|
|
"Create the binary structure"
|
|
|
|
res := OrderedCollection new.
|
|
|
|
1 to: digits size by: 2 do: [:each |
|
|
|
|
| low high |
|
|
|
|
low := digits at: each.
|
|
|
|
high := digits at: each + 1.
|
|
|
|
|
|
|
|
res add: (low bitOr: (high bitShift: 4)).
|
|
|
|
].
|
|
|
|
|
|
|
|
^ res asByteArray.
|
|
|
|
]
|
2010-12-04 09:39:21 +00:00
|
|
|
]
|
|
|
|
|
2010-11-30 19:47:45 +00:00
|
|
|
GSM48DataHolder subclass: GSMCalledBCDNumber [
|
|
|
|
GSMCalledBCDNumber class >> elementId [ ^ 16r5E ]
|
2010-12-04 07:49:02 +00:00
|
|
|
GSMCalledBCDNumber class >> validSizes [ ^ 2 to: 18 ]
|
2010-11-30 19:47:45 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
GSM48DataHolder subclass: GSMCalledSubBCDNumber [
|
|
|
|
GSMCalledSubBCDNumber class >> elementId [ ^ 16r6D ]
|
2010-12-04 07:49:02 +00:00
|
|
|
GSMCalledSubBCDNumber class >> validSizes [ ^ 1 to: 22 ]
|
2010-11-30 19:47:45 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
GSM48DataHolder subclass: GSMCallingBCDNumber [
|
|
|
|
GSMCallingBCDNumber class >> elementId [ ^ 16r5C ]
|
2010-12-04 07:49:02 +00:00
|
|
|
GSMCallingBCDNumber class >> validSizes [ ^ 2 to: 13 ]
|
2010-11-30 19:47:45 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
GSM48DataHolder subclass: GSMCallingSubBCDNumber [
|
|
|
|
GSMCallingSubBCDNumber class >> elementId [ ^ 16r5D ]
|
2010-12-04 07:49:02 +00:00
|
|
|
GSMCallingSubBCDNumber class >> validSizes [ ^ 1 to: 22 ]
|
2010-11-30 19:47:45 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
GSM48DataHolder subclass: GSMRedirectingBCDNumber [
|
|
|
|
GSMRedirectingBCDNumber class >> elementId [ ^ 16r74 ]
|
2010-12-04 07:49:02 +00:00
|
|
|
GSMRedirectingBCDNumber class >> validSizes [ ^ 2 to: 18 ]
|
2010-11-30 19:47:45 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
GSM48DataHolder subclass: GSMRedirectingSubBCDNumber [
|
|
|
|
GSMRedirectingSubBCDNumber class >> elementId [ ^ 16r75 ]
|
2010-12-04 07:49:02 +00:00
|
|
|
GSMRedirectingSubBCDNumber class >> validSizes [ ^ 1 to: 22 ]
|
2010-11-30 19:47:45 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
GSM48DataHolder subclass: GSMLLCompability [
|
|
|
|
GSMLLCompability class >> elementId [ ^ 16r7C ]
|
2010-12-04 07:49:02 +00:00
|
|
|
GSMLLCompability class >> validSizes [ ^ 1 to: 14 ]
|
2010-11-30 19:47:45 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
GSM48DataHolder subclass: GSMHLCompability [
|
|
|
|
GSMHLCompability class >> elementId [ ^ 16r7D ]
|
2010-12-04 07:49:02 +00:00
|
|
|
GSMHLCompability class >> validSizes [ ^ 1 to: 4 ]
|
2010-11-30 19:47:45 +00:00
|
|
|
]
|
|
|
|
GSM48DataHolder subclass: GSMUserUser [
|
|
|
|
GSMUserUser class >> elementId [ ^ 16r7E ]
|
2010-12-04 07:49:02 +00:00
|
|
|
GSMUserUser class >> validSizes [ ^ 2 to: 34 ]
|
2010-11-30 19:47:45 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
GSM48DataHolder subclass: GSMSSVersionInd [
|
|
|
|
GSMSSVersionInd class >> elementId [ ^ 16r7F ]
|
2010-12-04 07:49:02 +00:00
|
|
|
GSMSSVersionInd class >> validSizes [ ^ 1 to: 2 ]
|
2010-11-30 19:47:45 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
GSM48SimpleTag subclass: GSMClirSuppression [
|
|
|
|
GSMClirSuppression class >> elementId [ ^ 16rA1 ]
|
|
|
|
GSMClirSuppression class >> ieMask [ ^ 16rFF ]
|
|
|
|
]
|
|
|
|
|
|
|
|
GSM48SimpleTag subclass: GSMClirInvocation [
|
|
|
|
GSMClirInvocation class >> elementId [ ^ 16rA2 ]
|
|
|
|
GSMClirInvocation class >> ieMask [ ^ 16rFF ]
|
|
|
|
]
|
|
|
|
|
|
|
|
GSM48DataHolder subclass: GSMCCCapabilities [
|
|
|
|
"TODO: the length is fixed to three"
|
|
|
|
GSMCCCapabilities class >> elementId [ ^ 16r15 ]
|
2010-12-04 07:49:02 +00:00
|
|
|
GSMCCCapabilities class >> validSizes [ ^ 2 to: 2 ]
|
2010-11-30 19:47:45 +00:00
|
|
|
]
|
|
|
|
|
2010-11-30 21:33:10 +00:00
|
|
|
GSM48DataHolder subclass: GSMConnectedNumber [
|
|
|
|
<comment: '10.5.4.13'>
|
|
|
|
GSMConnectedNumber class >> elementId [ ^ 16r4C ]
|
2010-12-04 07:49:02 +00:00
|
|
|
GSMConnectedNumber class >> validSizes [ ^ 2 to: 13 ]
|
2010-11-30 21:33:10 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
GSM48DataHolder subclass: GSMConnectedSubNumber [
|
|
|
|
<comment: '10.5.4.14'>
|
|
|
|
GSMConnectedSubNumber class >> elementId [ ^ 16r4D ]
|
2010-12-04 07:49:02 +00:00
|
|
|
GSMConnectedSubNumber class >> validSizes [ ^ 1 to: 22 ]
|
2010-11-30 21:33:10 +00:00
|
|
|
]
|
|
|
|
|
2010-11-30 21:53:08 +00:00
|
|
|
GSM48DataHolder subclass: GSMAllowedActions [
|
|
|
|
<comment: '10.5.4.27'>
|
|
|
|
GSMAllowedActions class >> elementId [ ^ 16r7B ]
|
2010-12-04 07:49:02 +00:00
|
|
|
GSMAllowedActions class >> validSizes [ ^ 2 to: 2 ]
|
2010-11-30 21:53:08 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
GSM48DataHolder subclass: GSM48Cause [
|
|
|
|
<comment: '10.5.4.11'>
|
2010-12-01 09:54:26 +00:00
|
|
|
GSM48Cause class >> elementId [ ^ 16r8 ]
|
2010-12-04 07:49:02 +00:00
|
|
|
GSM48Cause class >> validSizes [ ^ 3 to: 31 ]
|
2010-11-30 21:53:08 +00:00
|
|
|
]
|
|
|
|
|
2010-12-04 07:49:02 +00:00
|
|
|
GSM48DataHolder subclass: GSMAlertingPattern [
|
2010-11-30 19:47:45 +00:00
|
|
|
GSMAlertingPattern class >> elementId [ ^ 16r19 ]
|
2010-12-04 07:49:02 +00:00
|
|
|
GSMAlertingPattern class >> validSizes [ ^ 3 to: 3 ]
|
2010-11-30 19:47:45 +00:00
|
|
|
]
|
|
|
|
|
2010-11-17 20:19:42 +00:00
|
|
|
IEMessage subclass: GSM48MSG [
|
2010-11-30 20:04:45 +00:00
|
|
|
| seq ti |
|
2010-11-19 18:11:55 +00:00
|
|
|
<category: 'osmo-message'>
|
2010-11-17 20:19:42 +00:00
|
|
|
<comment: 'GSM48 has helper code for mandantory types'>
|
|
|
|
|
2010-12-01 23:00:42 +00:00
|
|
|
GSM48MSG class >> addVariable: aName [
|
|
|
|
"Check if the variable exists, otherwise add it"
|
|
|
|
(self instVarNames includes: aName)
|
2010-11-28 22:23:00 +00:00
|
|
|
ifFalse: [
|
2010-12-01 23:00:42 +00:00
|
|
|
self addInstVarName: aName.
|
2010-11-28 22:23:00 +00:00
|
|
|
].
|
2010-12-01 23:00:42 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
GSM48MSG class >> addMandantory: aName with: aClass [
|
|
|
|
<comment: 'creation'>
|
|
|
|
self addVariable: aName asSymbol.
|
2010-11-19 18:11:24 +00:00
|
|
|
self compile: '%1 [ ^ %1 ifNil: [%1 := %2 createDefault.]]' % {aName. aClass}.
|
2011-03-31 09:09:23 +00:00
|
|
|
self Mandantory add: ({aName asSymbol. #normal} -> aClass).
|
|
|
|
]
|
|
|
|
|
|
|
|
GSM48MSG class >> addTaggedMandantory: aName with: aClass [
|
|
|
|
<comment: 'creation'>
|
|
|
|
self addVariable: aName asSymbol.
|
|
|
|
self compile: '%1 [ ^ %1 ifNil: [%1 := %2 createDefault.]]' % {aName. aClass}.
|
|
|
|
self Mandantory add: ({aName asSymbol. #tagged} -> aClass).
|
2010-11-23 23:41:38 +00:00
|
|
|
]
|
|
|
|
|
2010-11-26 15:18:06 +00:00
|
|
|
GSM48MSG class >> addOptional: aName with: aClass [
|
|
|
|
<comment: 'creation'>
|
2010-11-30 19:47:45 +00:00
|
|
|
|
|
|
|
aClass = nil
|
|
|
|
ifTrue: [
|
|
|
|
self error: 'Class should not be null for ', aName
|
|
|
|
].
|
|
|
|
|
2010-12-01 23:00:42 +00:00
|
|
|
self addVariable: aName asSymbol.
|
2010-11-26 15:18:06 +00:00
|
|
|
self compile: '%1 [ ^ %1 ]' % {aName}.
|
2010-12-01 23:04:01 +00:00
|
|
|
self compile: '%1OrDefault [ ^ %1 ifNil: [%1 := %2 createDefault.]]' % {aName. aClass}.
|
2010-11-26 15:18:06 +00:00
|
|
|
self Optional add: (aName asSymbol -> aClass).
|
|
|
|
]
|
|
|
|
|
2010-11-23 23:41:38 +00:00
|
|
|
GSM48MSG class >> isCompatible: classType msgType: messageType [
|
2010-11-30 20:04:45 +00:00
|
|
|
| localType |
|
|
|
|
|
|
|
|
"Ignore the base classes. TODO: find a better way"
|
2010-11-30 19:47:45 +00:00
|
|
|
(self = GSM48MMMessage or: [self = GSM48CCMessage])
|
2010-11-23 23:41:38 +00:00
|
|
|
ifTrue: [^ false].
|
|
|
|
|
2010-11-30 20:04:45 +00:00
|
|
|
localType := classType bitAnd: 16r0F.
|
|
|
|
^ (self classType = localType) and: [self messageType = messageType].
|
2010-11-23 23:41:38 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
GSM48MSG class >> decode: aByteArray [
|
|
|
|
| classType messageType |
|
|
|
|
classType := aByteArray at: 1.
|
2010-11-26 22:11:58 +00:00
|
|
|
messageType := (aByteArray at: 2) bitAnd: 16r3F.
|
2010-11-23 23:41:38 +00:00
|
|
|
|
|
|
|
GSM48MSG allSubclassesDo: [:each |
|
|
|
|
(each isCompatible: classType msgType: messageType)
|
|
|
|
ifTrue: [
|
|
|
|
^ each parseFrom: aByteArray.
|
|
|
|
].
|
|
|
|
].
|
|
|
|
|
2010-11-24 14:13:14 +00:00
|
|
|
Exception signal: 'No one handles: ', classType asString,
|
2010-11-24 21:18:48 +00:00
|
|
|
' and: ', (aByteArray at: 2) asString.
|
2010-11-23 23:41:38 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
GSM48MSG class >> parseFrom: aByteArray [
|
|
|
|
| res dat |
|
|
|
|
|
|
|
|
res := self new.
|
2010-11-24 21:18:48 +00:00
|
|
|
res seq: ((aByteArray at: 2) bitShift: -6).
|
2010-11-30 20:04:45 +00:00
|
|
|
res ti: ((aByteArray at: 1) bitShift: -4).
|
2010-11-23 23:41:38 +00:00
|
|
|
dat := aByteArray copyFrom: 3.
|
|
|
|
|
2011-03-31 09:09:23 +00:00
|
|
|
"This is messy. The GSM04.80 spec had the great idea of adding
|
|
|
|
tagged mandantory items and we need to deal with it here."
|
|
|
|
self Mandantory do: [:tuple |
|
|
|
|
| len name type clazz |
|
|
|
|
name := tuple key first.
|
|
|
|
type := tuple key second.
|
|
|
|
clazz := tuple value.
|
|
|
|
|
|
|
|
type = #tagged ifTrue: [
|
|
|
|
(dat at: 1) = clazz elementId ifFalse: [
|
|
|
|
^ self error: 'Mandantory Tagged Element %1 not present.' % {name->clazz}.
|
|
|
|
].
|
|
|
|
dat := dat copyFrom: 2.
|
|
|
|
].
|
|
|
|
|
|
|
|
len := clazz length: dat.
|
|
|
|
res instVarNamed: name put: (clazz parseFrom: dat).
|
2010-11-23 23:41:38 +00:00
|
|
|
|
|
|
|
"Move the parser forward"
|
|
|
|
dat := dat copyFrom: len + 1.
|
|
|
|
].
|
|
|
|
|
2010-11-26 15:18:06 +00:00
|
|
|
"We are done here if this class has no optional IEs"
|
|
|
|
(self respondsTo: #Optional)
|
|
|
|
ifFalse: [
|
|
|
|
^ res
|
|
|
|
].
|
|
|
|
|
|
|
|
"Types must appear in order"
|
|
|
|
self Optional do: [:each |
|
|
|
|
| tag |
|
2010-11-30 19:45:36 +00:00
|
|
|
|
|
|
|
"We have consumed everything"
|
|
|
|
dat size = 0
|
|
|
|
ifTrue: [
|
|
|
|
^ res
|
|
|
|
].
|
|
|
|
|
|
|
|
tag := (dat at: 1) bitAnd: each value ieMask.
|
2010-11-26 15:18:06 +00:00
|
|
|
tag = each value elementId
|
|
|
|
ifTrue: [
|
|
|
|
| len data |
|
|
|
|
data := dat copyFrom: 2.
|
|
|
|
len := each value length: data.
|
|
|
|
|
2010-11-30 19:45:36 +00:00
|
|
|
"treat the T only tags specially"
|
|
|
|
len = 0
|
|
|
|
ifTrue: [
|
|
|
|
res instVarNamed: each key
|
|
|
|
put: (each value initWithData: (dat at: 1)).
|
|
|
|
dat := data.
|
|
|
|
]
|
|
|
|
ifFalse: [
|
|
|
|
res instVarNamed: each key
|
|
|
|
put: (each value parseFrom: data).
|
|
|
|
dat := data copyFrom: len + 1.
|
|
|
|
].
|
2010-11-26 15:18:06 +00:00
|
|
|
].
|
|
|
|
].
|
|
|
|
|
2010-11-30 19:45:36 +00:00
|
|
|
"TODO: Complain if we have not consumed everything"
|
2010-11-30 19:47:01 +00:00
|
|
|
dat size = 0
|
|
|
|
ifFalse: [
|
2010-11-30 20:25:47 +00:00
|
|
|
res inspect.
|
|
|
|
dat printNl.
|
2010-11-30 19:47:01 +00:00
|
|
|
self error: 'Every byte should be consumed'.
|
|
|
|
].
|
2010-11-30 19:45:36 +00:00
|
|
|
|
2010-11-23 23:41:38 +00:00
|
|
|
^ res
|
2010-11-17 20:19:42 +00:00
|
|
|
]
|
|
|
|
|
2010-11-20 00:20:00 +00:00
|
|
|
writeOn: aMsg [
|
2010-11-30 20:04:45 +00:00
|
|
|
| type classType |
|
2010-11-24 21:18:48 +00:00
|
|
|
|
|
|
|
type := self seq bitShift: 6.
|
|
|
|
type := type bitOr: self class messageType.
|
|
|
|
|
2010-11-17 20:19:42 +00:00
|
|
|
"Write the header. Skip Ind, Sequence are hardcoded"
|
2010-11-30 20:04:45 +00:00
|
|
|
classType := self ti bitShift: 4.
|
|
|
|
classType := classType bitOr: self class classType.
|
|
|
|
aMsg putByte: classType.
|
2010-11-24 21:18:48 +00:00
|
|
|
aMsg putByte: type.
|
2010-11-17 20:19:42 +00:00
|
|
|
|
|
|
|
"Write all Mandantory parts"
|
2011-03-31 09:09:23 +00:00
|
|
|
self class Mandantory do: [:tuple | | tmp |
|
|
|
|
tmp := self perform: tuple key first.
|
|
|
|
tuple key second = #tagged
|
|
|
|
ifTrue: [tmp writeOn: aMsg.]
|
|
|
|
ifFalse: [tmp writeOnDirect: aMsg.].
|
2010-11-19 18:11:24 +00:00
|
|
|
].
|
2010-11-17 20:19:42 +00:00
|
|
|
|
2010-11-26 15:18:06 +00:00
|
|
|
(self class respondsTo: #Optional)
|
|
|
|
ifFalse: [
|
|
|
|
^ 0
|
|
|
|
].
|
|
|
|
|
|
|
|
self class Optional do: [:each | | tmp |
|
|
|
|
tmp := self perform: each key.
|
|
|
|
tmp ifNotNil: [
|
2010-11-26 21:00:47 +00:00
|
|
|
tmp writeOn: aMsg.
|
2010-11-26 15:18:06 +00:00
|
|
|
].
|
|
|
|
].
|
|
|
|
|
|
|
|
|
2010-11-17 20:19:42 +00:00
|
|
|
"TODO: Handle the Conditionals too"
|
2010-11-26 15:18:06 +00:00
|
|
|
^ 0
|
2010-11-17 15:56:10 +00:00
|
|
|
]
|
2010-11-24 21:18:48 +00:00
|
|
|
|
|
|
|
seq: aSeq [
|
|
|
|
seq := aSeq.
|
|
|
|
]
|
|
|
|
|
|
|
|
seq [
|
|
|
|
^ seq ifNil: [ 0 ]
|
|
|
|
]
|
2010-11-30 20:04:45 +00:00
|
|
|
|
|
|
|
ti: aTi [
|
|
|
|
ti := aTi.
|
|
|
|
]
|
|
|
|
|
|
|
|
ti [
|
|
|
|
"by default treat it like a spare"
|
|
|
|
^ 0
|
|
|
|
]
|
2010-12-18 15:49:38 +00:00
|
|
|
|
|
|
|
type [
|
|
|
|
^ self class messageType
|
|
|
|
]
|
2010-11-17 15:56:10 +00:00
|
|
|
]
|
|
|
|
|
2010-11-17 20:19:42 +00:00
|
|
|
GSM48MSG subclass: GSM48MMMessage [
|
2010-11-19 08:02:26 +00:00
|
|
|
<category: 'osmo-message'>
|
2010-11-17 20:19:42 +00:00
|
|
|
<comment: 'Baseclass for mobility managamenet'>
|
|
|
|
|
2010-11-23 23:41:38 +00:00
|
|
|
GSM48MMMessage class >> classType [ ^ 16r5 ]
|
|
|
|
GSM48MMMessage class >> msgLUAcc [ ^ 16r02 ]
|
|
|
|
GSM48MMMessage class >> msgLURej [ ^ 16r04 ]
|
|
|
|
GSM48MMMessage class >> msgLUReq [ ^ 16r08 ]
|
|
|
|
GSM48MMMessage class >> msgIdRes [ ^ 16r19 ]
|
|
|
|
GSM48MMMessage class >> msgIdReq [ ^ 16r18 ]
|
2011-02-02 22:19:45 +00:00
|
|
|
GSM48MMMessage class >> msgAuRej [ ^ 16r11 ]
|
2010-11-24 20:46:34 +00:00
|
|
|
GSM48MMMessage class >> msgAuReq [ ^ 16r12 ]
|
2010-11-24 21:18:48 +00:00
|
|
|
GSM48MMMessage class >> msgAuRes [ ^ 16r14 ]
|
2010-12-11 07:34:26 +00:00
|
|
|
GSM48MMMessage class >> msgCMAccept [ ^ 16r21 ]
|
2010-12-01 12:43:31 +00:00
|
|
|
GSM48MMMessage class >> msgCMReject [ ^ 16r22 ]
|
2010-11-27 13:25:41 +00:00
|
|
|
GSM48MMMessage class >> msgCMReq [ ^ 16r24 ]
|
2010-11-27 13:33:19 +00:00
|
|
|
GSM48MMMessage class >> msgIMSIDetach [ ^ 16r01 ]
|
2010-11-17 20:19:42 +00:00
|
|
|
]
|
|
|
|
|
2010-11-30 19:47:45 +00:00
|
|
|
GSM48MSG subclass: GSM48CCMessage [
|
|
|
|
<category: 'osmo-message'>
|
|
|
|
<comment: 'Baseclass for call control'>
|
|
|
|
|
|
|
|
GSM48CCMessage class >> classType [ ^ 16r3 ]
|
2010-11-30 20:05:15 +00:00
|
|
|
|
2010-11-30 20:25:47 +00:00
|
|
|
GSM48CCMessage class >> msgAlerting [ ^ 16r1 ]
|
2010-11-30 20:05:15 +00:00
|
|
|
GSM48CCMessage class >> msgProceeding [ ^ 16r2 ]
|
|
|
|
GSM48CCMessage class >> msgSetup [ ^ 16r5 ]
|
2010-11-30 21:33:10 +00:00
|
|
|
GSM48CCMessage class >> msgConnect [ ^ 16r7 ]
|
2010-11-30 21:38:39 +00:00
|
|
|
GSM48CCMessage class >> msgConnectAck [ ^ 16rF ]
|
2010-11-30 21:53:08 +00:00
|
|
|
GSM48CCMessage class >> msgDisconnect [ ^ 16r25 ]
|
2010-12-01 09:54:26 +00:00
|
|
|
GSM48CCMessage class >> msgReleaseCompl [ ^ 16r2A ]
|
2010-12-01 09:31:02 +00:00
|
|
|
GSM48CCMessage class >> msgRelease [ ^ 16r2D ]
|
2010-11-30 20:04:45 +00:00
|
|
|
|
|
|
|
ti [
|
|
|
|
^ ti ifNil: [ 0 ]
|
|
|
|
]
|
2010-11-30 19:47:45 +00:00
|
|
|
]
|
|
|
|
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48MMMessage subclass: GSM48LURequest [
|
2010-11-19 18:11:24 +00:00
|
|
|
<category: 'osmo-message'>
|
|
|
|
Mandantory := nil.
|
2010-11-26 15:18:06 +00:00
|
|
|
Optional := nil.
|
2010-11-17 20:19:42 +00:00
|
|
|
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48LURequest class >> messageType [ ^ self msgLUReq ]
|
2010-11-19 18:11:24 +00:00
|
|
|
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48LURequest class >> Mandantory [
|
2010-11-19 18:11:24 +00:00
|
|
|
^ Mandantory ifNil: [ Mandantory := OrderedCollection new ].
|
|
|
|
]
|
|
|
|
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48LURequest class >> Optional [
|
2010-11-26 15:18:06 +00:00
|
|
|
^ Optional ifNil: [ Optional := OrderedCollection new ].
|
|
|
|
]
|
|
|
|
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48LURequest class >> initialize [
|
2010-11-19 18:11:24 +00:00
|
|
|
self addMandantory: 'luType' with: GSM48KeySeqLuType.
|
|
|
|
self addMandantory: 'lai' with: GSM48Lai.
|
|
|
|
self addMandantory: 'cm1' with: GSM48Classmark1.
|
|
|
|
self addMandantory: 'mi' with: GSM48MIdentity.
|
|
|
|
]
|
2010-11-17 20:19:42 +00:00
|
|
|
]
|
|
|
|
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48MMMessage subclass: GSM48LUAccept [
|
2010-11-19 18:11:55 +00:00
|
|
|
<category: 'osmo-message'>
|
2010-11-26 15:18:06 +00:00
|
|
|
Mandantory := nil.
|
|
|
|
Optional := nil.
|
|
|
|
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48LUAccept class >> Mandantory [
|
2010-11-26 15:18:06 +00:00
|
|
|
^ Mandantory ifNil: [ Mandantory := OrderedCollection new ].
|
|
|
|
]
|
|
|
|
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48LUAccept class >> Optional [
|
2010-11-26 15:18:06 +00:00
|
|
|
^ Optional ifNil: [ Optional := OrderedCollection new ].
|
|
|
|
]
|
|
|
|
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48LUAccept class >> messageType [ ^ self msgLUAcc ]
|
|
|
|
GSM48LUAccept class >> initialize [
|
2010-11-26 15:18:06 +00:00
|
|
|
self addMandantory: 'cause' with: GSM48Lai.
|
|
|
|
self addOptional: 'mi' with: GSM48MIdentity.
|
|
|
|
self addOptional: 'follow' with: GSM48FollowOn.
|
|
|
|
self addOptional: 'cts' with: GSM48CTSPermission.
|
|
|
|
]
|
2010-11-17 20:19:42 +00:00
|
|
|
]
|
|
|
|
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48MMMessage subclass: GSM48LUReject [
|
2010-11-19 18:11:55 +00:00
|
|
|
<category: 'osmo-message'>
|
2010-11-24 14:13:39 +00:00
|
|
|
Mandantory := nil.
|
2010-11-26 15:18:06 +00:00
|
|
|
Optional := nil.
|
2010-11-24 14:13:39 +00:00
|
|
|
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48LUReject class >> messageType [ ^ self msgLURej ]
|
2010-11-24 14:13:39 +00:00
|
|
|
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48LUReject class >> Mandantory [
|
2010-11-24 14:13:39 +00:00
|
|
|
^ Mandantory ifNil: [ Mandantory := OrderedCollection new ].
|
|
|
|
]
|
|
|
|
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48LUReject class >> initialize [
|
2010-11-24 14:13:39 +00:00
|
|
|
self addMandantory: 'cause' with: GSM48RejectCause.
|
|
|
|
]
|
2010-11-17 20:19:42 +00:00
|
|
|
]
|
|
|
|
|
2011-02-02 22:19:45 +00:00
|
|
|
GSM48MMMessage subclass: GSM48AuthRej [
|
|
|
|
<category: 'osmo-message'>
|
|
|
|
Mandantory := nil.
|
|
|
|
Optional := nil.
|
|
|
|
|
|
|
|
GSM48AuthRej class >> messageType [ ^ self msgAuRej ]
|
|
|
|
GSM48AuthRej class >> Mandantory [
|
|
|
|
^ Mandantory ifNil: [ Mandantory := OrderedCollection new ].
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48MMMessage subclass: GSM48AuthReq [
|
2010-11-24 20:46:34 +00:00
|
|
|
<category: 'osmo-message'>
|
|
|
|
Mandantory := nil.
|
2010-11-26 15:18:06 +00:00
|
|
|
Optional := nil.
|
2010-11-24 20:46:34 +00:00
|
|
|
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48AuthReq class >> messageType [ ^ self msgAuReq ]
|
|
|
|
GSM48AuthReq class >> Mandantory [
|
2010-11-24 20:46:34 +00:00
|
|
|
^ Mandantory ifNil: [ Mandantory := OrderedCollection new ].
|
|
|
|
]
|
|
|
|
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48AuthReq class >> initialize [
|
2010-11-24 20:46:34 +00:00
|
|
|
self addMandantory: 'key' with: GSM48KeySeqLuType.
|
|
|
|
self addMandantory: 'auth' with: GSM48AuthRand.
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48MMMessage subclass: GSM48AuthResp [
|
2010-11-24 21:18:48 +00:00
|
|
|
<category: 'osmo-message'>
|
|
|
|
Mandantory := nil.
|
|
|
|
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48AuthResp class >> messageType [ ^ self msgAuRes ]
|
|
|
|
GSM48AuthResp class >> Mandantory [
|
2010-11-24 21:18:48 +00:00
|
|
|
^ Mandantory ifNil: [ Mandantory := OrderedCollection new ].
|
|
|
|
]
|
|
|
|
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48AuthResp class >> initialize [
|
2010-11-24 21:18:48 +00:00
|
|
|
self addMandantory: 'sres' with: GSM48AuthSRES.
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48MMMessage subclass: GSM48IdentityReq [
|
2010-11-19 18:11:55 +00:00
|
|
|
<category: 'osmo-message'>
|
2010-11-26 21:55:13 +00:00
|
|
|
|
|
|
|
Mandantory := nil.
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48IdentityReq class >> messageType [ ^ self msgIdReq ]
|
|
|
|
GSM48IdentityReq class >> Mandantory [
|
2010-11-26 21:55:13 +00:00
|
|
|
^ Mandantory ifNil: [ Mandantory := OrderedCollection new ].
|
|
|
|
]
|
|
|
|
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48IdentityReq class >> initialize [
|
2010-11-26 21:55:13 +00:00
|
|
|
self addMandantory: 'idType' with: GSM48IdentityType.
|
|
|
|
]
|
2010-11-17 20:19:42 +00:00
|
|
|
]
|
|
|
|
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48MMMessage subclass: GSM48IdentityResponse [
|
2010-11-19 18:11:55 +00:00
|
|
|
<category: 'osmo-message'>
|
2010-11-26 23:17:34 +00:00
|
|
|
|
|
|
|
Mandantory := nil.
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48IdentityResponse class >> messageType [ ^ self msgIdRes ]
|
|
|
|
GSM48IdentityResponse class >> Mandantory [
|
2010-11-26 23:17:34 +00:00
|
|
|
^ Mandantory ifNil: [ Mandantory := OrderedCollection new ].
|
|
|
|
]
|
|
|
|
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48IdentityResponse class >> initialize [
|
2010-11-26 23:17:34 +00:00
|
|
|
self addMandantory: 'mi' with: GSM48MIdentity.
|
|
|
|
]
|
2010-11-17 15:56:10 +00:00
|
|
|
]
|
2010-11-19 18:11:24 +00:00
|
|
|
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48MMMessage subclass: GSM48CMServiceReq [
|
2010-11-27 13:25:41 +00:00
|
|
|
<category: 'osmo-message'>
|
|
|
|
|
|
|
|
Mandantory := nil.
|
2010-12-01 23:07:07 +00:00
|
|
|
Optional := nil.
|
|
|
|
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48CMServiceReq class >> messageType [ ^ self msgCMReq ]
|
|
|
|
GSM48CMServiceReq class >> Mandantory [
|
2010-11-27 13:25:41 +00:00
|
|
|
^ Mandantory ifNil: [ Mandantory := OrderedCollection new ].
|
|
|
|
]
|
2010-12-01 23:07:07 +00:00
|
|
|
GSM48CMServiceReq class >> Optional [
|
|
|
|
^ Optional ifNil: [ Optional := OrderedCollection new ]
|
|
|
|
]
|
2010-11-27 13:25:41 +00:00
|
|
|
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48CMServiceReq class >> initialize [
|
2010-11-27 13:25:41 +00:00
|
|
|
self addMandantory: 'keyAndType' with: GSM48KeySeqLuType.
|
|
|
|
self addMandantory: 'cm2' with: GSM48Classmark2.
|
|
|
|
self addMandantory: 'mi' with: GSM48MIdentity.
|
|
|
|
|
2010-12-01 23:07:07 +00:00
|
|
|
self addOptional: 'prio' with: GSMPriorityLevel.
|
2010-11-27 13:25:41 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
]
|
|
|
|
|
2010-12-01 12:43:31 +00:00
|
|
|
GSM48MMMessage subclass: GSM48CMServiceReject [
|
|
|
|
<category: 'osmo-message'>
|
|
|
|
|
|
|
|
Mandantory := nil.
|
|
|
|
GSM48CMServiceReject class >> messageType [ ^ self msgCMReject ]
|
|
|
|
GSM48CMServiceReject class >> Mandantory [
|
|
|
|
^ Mandantory ifNil: [ Mandantory := OrderedCollection new ]
|
|
|
|
]
|
|
|
|
|
|
|
|
GSM48CMServiceReject class >> initialize [
|
|
|
|
self addMandantory: 'reject' with: GSM48RejectCause.
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48MMMessage subclass: GSM48IMSIDetachInd [
|
2010-11-27 13:33:19 +00:00
|
|
|
<category: 'osmo-message'>
|
|
|
|
|
|
|
|
Mandantory := nil.
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48IMSIDetachInd class >> messageType [ ^ self msgIMSIDetach ]
|
|
|
|
GSM48IMSIDetachInd class >> Mandantory [
|
2010-11-27 13:33:19 +00:00
|
|
|
^ Mandantory ifNil: [ Mandantory := OrderedCollection new ].
|
|
|
|
]
|
|
|
|
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48IMSIDetachInd class >> initialize [
|
2010-11-27 13:33:19 +00:00
|
|
|
self addMandantory: 'cm1' with: GSM48Classmark1.
|
|
|
|
self addMandantory: 'mi' with: GSM48MIdentity.
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
2010-11-30 19:47:45 +00:00
|
|
|
GSM48CCMessage subclass: GSM48CCSetup [
|
|
|
|
<category: 'osmo-message'>
|
|
|
|
|
|
|
|
Mandantory := nil.
|
|
|
|
Optional := nil.
|
|
|
|
|
|
|
|
GSM48CCSetup class >> messageType [ ^ self msgSetup ]
|
|
|
|
GSM48CCSetup class >> Mandantory [
|
|
|
|
^ Mandantory ifNil: [ Mandantory := OrderedCollection new ].
|
|
|
|
]
|
|
|
|
GSM48CCSetup class >> Optional [
|
|
|
|
^ Optional ifNil: [ Optional := OrderedCollection new ]
|
|
|
|
]
|
|
|
|
|
|
|
|
GSM48CCSetup class >> initialize [
|
|
|
|
self addOptional: 'repeatInd' with: GSMRepeatInd.
|
|
|
|
self addOptional: 'bearer1' with: GSMBearerCap.
|
|
|
|
self addOptional: 'bearer2' with: GSMBearerCap.
|
|
|
|
self addOptional: 'facility' with: GSMFacility.
|
|
|
|
self addOptional: 'progress' with: GSMProgress.
|
|
|
|
self addOptional: 'signal' with: GSMSignal.
|
2010-12-11 07:05:18 +00:00
|
|
|
self addOptional: 'calling' with: GSMCallingBCDNumber.
|
|
|
|
self addOptional: 'callingSub' with: GSMCallingSubBCDNumber.
|
|
|
|
self addOptional: 'called' with: GSMCalledBCDNumber.
|
|
|
|
self addOptional: 'calledSub' with: GSMCalledSubBCDNumber.
|
2010-11-30 19:47:45 +00:00
|
|
|
self addOptional: 'redirect' with: GSMRedirectingBCDNumber.
|
|
|
|
self addOptional: 'redirectSub' with: GSMRedirectingSubBCDNumber.
|
|
|
|
self addOptional: 'LLCInd' with: GSMRepeatInd.
|
|
|
|
self addOptional: 'llc1' with: GSMLLCompability.
|
|
|
|
self addOptional: 'llc2' with: GSMLLCompability.
|
|
|
|
self addOptional: 'HLCInd' with: GSMRepeatInd.
|
|
|
|
self addOptional: 'hlc1' with: GSMHLCompability.
|
|
|
|
self addOptional: 'hlc2' with: GSMHLCompability.
|
|
|
|
self addOptional: 'useruser' with: GSMUserUser.
|
|
|
|
"For MO call"
|
|
|
|
self addOptional: 'ssVersion' with: GSMSSVersionInd.
|
|
|
|
self addOptional: 'clirSuppr' with: GSMClirSuppression.
|
|
|
|
self addOptional: 'clirInvoc' with: GSMClirInvocation.
|
|
|
|
self addOptional: 'ccCapabil' with: GSMCCCapabilities.
|
|
|
|
self addOptional: 'facilityCCBS' with: GSMFacility.
|
|
|
|
self addOptional: 'facilityReca' with: GSMFacility.
|
|
|
|
|
|
|
|
"For MT call"
|
|
|
|
self addOptional: 'prio' with: GSMPriorityLevel.
|
|
|
|
self addOptional: 'alert' with: GSMAlertingPattern.
|
|
|
|
]
|
|
|
|
|
|
|
|
writeOn: aMsg [
|
|
|
|
"TODO: these are incomplete and wrong"
|
|
|
|
"Implement the conditionals"
|
|
|
|
(self bearer1 ~= nil and: [self bearer2 ~= nil])
|
|
|
|
ifTrue: [
|
|
|
|
self instVarNamed: #repeatInd put: GSMRepeatInd new.
|
|
|
|
]
|
|
|
|
ifFalse: [
|
|
|
|
self instVarNamed: #repeatInd put: nil.
|
|
|
|
].
|
|
|
|
|
|
|
|
(self llc1 ~= nil and: [self llc2 ~= nil])
|
|
|
|
ifTrue: [
|
|
|
|
self instVarNamed: #LLCInd put: GSMRepeatInd new.
|
|
|
|
]
|
|
|
|
ifFalse: [
|
|
|
|
self instVarNamed: #LLCInd put: nil.
|
|
|
|
].
|
|
|
|
|
|
|
|
(self hlc1 ~= nil and: [self hlc2 ~= nil])
|
|
|
|
ifTrue: [
|
|
|
|
self instVarNamed: #HLCInd put: GSMRepeatInd new.
|
|
|
|
]
|
|
|
|
ifFalse: [
|
|
|
|
self instVarNamed: #HLCInd put: nil.
|
|
|
|
].
|
|
|
|
|
|
|
|
^ super writeOn: aMsg.
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
2010-11-30 20:05:15 +00:00
|
|
|
GSM48CCMessage subclass: GSM48CCProceeding [
|
|
|
|
<category: 'osmo-message'>
|
|
|
|
|
|
|
|
Mandantory := nil.
|
|
|
|
Optional := nil.
|
|
|
|
|
|
|
|
GSM48CCProceeding class >> messageType [ ^ self msgProceeding ]
|
|
|
|
GSM48CCProceeding class >> Mandantory [
|
|
|
|
^ Mandantory ifNil: [ Mandantory := OrderedCollection new ]
|
|
|
|
]
|
|
|
|
GSM48CCProceeding class >> Optional [
|
|
|
|
^ Optional ifNil: [ Optional := OrderedCollection new ]
|
|
|
|
]
|
|
|
|
|
|
|
|
GSM48CCProceeding class >> initialize [
|
|
|
|
self addOptional: 'repeatInd' with: GSMRepeatInd.
|
|
|
|
self addOptional: 'bearer1' with: GSMBearerCap.
|
|
|
|
self addOptional: 'bearer2' with: GSMBearerCap.
|
|
|
|
self addOptional: 'facility' with: GSMFacility.
|
|
|
|
self addOptional: 'progress' with: GSMProgress.
|
|
|
|
self addOptional: 'priorityGranted' with: GSMPriorityLevel.
|
|
|
|
]
|
|
|
|
|
|
|
|
writeOn: aMsg [
|
|
|
|
(self bearer1 ~= nil and: [self bearer2 ~= nil])
|
|
|
|
ifTrue: [
|
|
|
|
self instVarNamed: #repeatInd put: GSMRepeatInd new.
|
|
|
|
]
|
|
|
|
ifFalse: [
|
|
|
|
self instVarNamed: #repeatInd put: nil.
|
|
|
|
].
|
|
|
|
|
|
|
|
^ super writeOn: aMsg.
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
2010-11-30 20:25:47 +00:00
|
|
|
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.
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
2010-11-30 21:33:10 +00:00
|
|
|
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.
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
2010-11-30 21:38:39 +00:00
|
|
|
GSM48CCMessage subclass: GSM48CCConnectAck [
|
|
|
|
<category: 'osmo-message'>
|
|
|
|
|
|
|
|
Optional := nil.
|
|
|
|
Mandantory := nil.
|
|
|
|
|
|
|
|
GSM48CCConnectAck class >> messageType [ ^ self msgConnectAck ]
|
|
|
|
GSM48CCConnectAck class >> Mandantory [
|
|
|
|
^ Mandantory ifNil: [ Mandantory := OrderedCollection new. ]
|
|
|
|
]
|
|
|
|
|
|
|
|
GSM48CCConnectAck class >> Optional [
|
|
|
|
^ Optional ifNil: [ Optional := OrderedCollection new. ]
|
|
|
|
]
|
|
|
|
|
|
|
|
GSM48CCConnectAck class >> initialize [
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
2010-11-30 21:53:08 +00:00
|
|
|
GSM48CCMessage subclass: GSM48CCDisconnect [
|
|
|
|
<category: 'osmo-message'>
|
|
|
|
|
|
|
|
Optional := nil.
|
|
|
|
Mandantory := nil.
|
|
|
|
|
|
|
|
GSM48CCDisconnect class >> messageType [ ^ self msgDisconnect ]
|
|
|
|
GSM48CCDisconnect class >> Mandantory [
|
|
|
|
^ Mandantory ifNil: [ Mandantory := OrderedCollection new. ]
|
|
|
|
]
|
|
|
|
|
|
|
|
GSM48CCDisconnect class >> Optional [
|
|
|
|
^ Optional ifNil: [ Optional := OrderedCollection new. ]
|
|
|
|
]
|
|
|
|
|
|
|
|
GSM48CCDisconnect class >> initialize [
|
|
|
|
self addMandantory: 'cause' with: GSM48Cause.
|
|
|
|
self addOptional: 'facility' with: GSMFacility.
|
|
|
|
self addOptional: 'progress' with: GSMProgress.
|
|
|
|
self addOptional: 'useruser' with: GSMUserUser.
|
|
|
|
self addOptional: 'allowedActions' with: GSMAllowedActions.
|
|
|
|
|
|
|
|
"MO addition"
|
|
|
|
self addOptional: 'ssVersion' with: GSMSSVersionInd.
|
|
|
|
]
|
|
|
|
|
|
|
|
]
|
|
|
|
|
2010-12-01 09:31:02 +00:00
|
|
|
GSM48CCMessage subclass: GSM48CCRelease [
|
|
|
|
<category: 'osmo-messages'>
|
|
|
|
|
|
|
|
Optional := nil.
|
|
|
|
Mandantory := nil.
|
|
|
|
|
|
|
|
GSM48CCRelease class >> messageType [ ^ self msgRelease ]
|
|
|
|
GSM48CCRelease class >> Mandantory [
|
|
|
|
^ Mandantory ifNil: [ Mandantory := OrderedCollection new ]
|
|
|
|
]
|
|
|
|
|
|
|
|
GSM48CCRelease class >> Optional [
|
|
|
|
^ Optional ifNil: [ Optional := OrderedCollection new ]
|
|
|
|
]
|
|
|
|
|
|
|
|
GSM48CCRelease class >> initialize [
|
|
|
|
self addOptional: 'cause' with: GSM48Cause.
|
|
|
|
self addOptional: 'secondCause' with: GSM48Cause.
|
|
|
|
self addOptional: 'facility' with: GSMFacility.
|
|
|
|
self addOptional: 'useruser' with: GSMUserUser.
|
|
|
|
self addOptional: 'ssVersion' with: GSMSSVersionInd.
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
2010-12-01 09:54:26 +00:00
|
|
|
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.
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
2010-11-19 18:11:24 +00:00
|
|
|
Eval [
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48LURequest initialize.
|
|
|
|
GSM48LUReject initialize.
|
|
|
|
GSM48LUAccept initialize.
|
|
|
|
GSM48AuthReq initialize.
|
|
|
|
GSM48AuthResp initialize.
|
|
|
|
GSM48IdentityReq initialize.
|
|
|
|
GSM48IdentityResponse initialize.
|
|
|
|
GSM48CMServiceReq initialize.
|
2010-12-01 12:43:31 +00:00
|
|
|
GSM48CMServiceReject initialize.
|
2010-11-29 10:36:27 +00:00
|
|
|
GSM48IMSIDetachInd initialize.
|
2010-11-30 19:47:45 +00:00
|
|
|
|
|
|
|
GSM48CCSetup initialize.
|
2010-11-30 20:05:15 +00:00
|
|
|
GSM48CCProceeding initialize.
|
2010-11-30 20:25:47 +00:00
|
|
|
GSM48CCAlerting initialize.
|
2010-11-30 21:33:10 +00:00
|
|
|
GSM48CCConnect initialize.
|
2010-11-30 21:38:39 +00:00
|
|
|
GSM48CCConnectAck initialize.
|
2010-11-30 21:53:08 +00:00
|
|
|
GSM48CCDisconnect initialize.
|
2010-12-01 09:31:02 +00:00
|
|
|
GSM48CCRelease initialize.
|
2010-12-01 09:54:26 +00:00
|
|
|
GSM48CCReleaseCompl initialize.
|
2010-11-19 18:11:24 +00:00
|
|
|
]
|