aboutsummaryrefslogtreecommitdiffstats
path: root/BSSMAP.st
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-11-30 09:42:21 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-12-05 10:02:08 +0100
commit7a8a3f1ad3a51950461826f09a8c3c4abb73f790 (patch)
treeaef9f0762b9dc24150f820d2aa9bb38b1af74afc /BSSMAP.st
parentebd0c2db733850836e1db5e34c270b49878b941b (diff)
BSSMAP: Be able to parse a simple Classmark Update
Diffstat (limited to 'BSSMAP.st')
-rw-r--r--BSSMAP.st51
1 files changed, 51 insertions, 0 deletions
diff --git a/BSSMAP.st b/BSSMAP.st
index 3b69b18..cfde905 100644
--- a/BSSMAP.st
+++ b/BSSMAP.st
@@ -561,3 +561,54 @@ GSM0808IE subclass: GSM0808SpeechVerIE [
aMsg putByte: speech.
]
]
+
+GSM0808IE subclass: GSM0808Classmark2IE [
+ | cm |
+
+ GSM0808Classmark2IE class >> elementId [ ^ 18 ]
+ GSM0808Classmark2IE class >> initWith: aCM [
+ ^ self new
+ cm: aCM; yourself
+ ]
+
+ GSM0808Classmark2IE class >> parseFrom: aByteArray [
+ | size |
+ size := aByteArray at: 2.
+
+ ^ self initWith: (aByteArray copyFrom: 3 to: 3 + size - 1)
+ ]
+
+ cm: aCM [
+ cm := aCM
+ ]
+
+ writeOnDirect: aMsg [
+ aMsg putByte: cm size.
+ aMsg putByteArray: cm.
+ ]
+]
+
+GSM0808IE subclass: GSM0808Classmark3IE [
+ | cm |
+ GSM0808Classmark3IE class >> elementId [ ^ 19 ]
+ GSM0808Classmark3IE class >> initWith: aCM [
+ ^ self new
+ cm: aCM; yourself
+ ]
+
+ GSM0808Classmark3IE class >> parseFrom: aByteArray [
+ | size |
+ size := aByteArray at: 2.
+
+ ^ self initWith: (aByteArray copyFrom: 3 to: 3 + size - 1)
+ ]
+
+ cm: aCM [
+ cm := aCM.
+ ]
+
+ writeOnDirect: aMsg [
+ aMsg putByte: cm size.
+ aMsg putByteArray: cm.
+ ]
+]