diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-11-30 09:42:21 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-12-05 10:02:08 +0100 |
commit | 7a8a3f1ad3a51950461826f09a8c3c4abb73f790 (patch) | |
tree | aef9f0762b9dc24150f820d2aa9bb38b1af74afc /BSSMAP.st | |
parent | ebd0c2db733850836e1db5e34c270b49878b941b (diff) |
BSSMAP: Be able to parse a simple Classmark Update
Diffstat (limited to 'BSSMAP.st')
-rw-r--r-- | BSSMAP.st | 51 |
1 files changed, 51 insertions, 0 deletions
@@ -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. + ] +] |