aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-08-27 17:43:26 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-08-27 17:43:26 +0200
commit73dbc2941c25cd8899f5770369c39cd14a69b738 (patch)
tree9c3bfd51d3f14119c2bfa16c14d41721eb3260e0
parent4721872838734d400b6e78f3ca28d859fe9b6746 (diff)
gsm: Introduce the minimal Ciphering Mode Complete class
-rw-r--r--GSM48.st18
-rw-r--r--Tests.st7
2 files changed, 25 insertions, 0 deletions
diff --git a/GSM48.st b/GSM48.st
index c80b80f..60d8d78 100644
--- a/GSM48.st
+++ b/GSM48.st
@@ -3008,6 +3008,23 @@ GSM48RRMessage subclass: GSM48RRCipheringModeCommand [
]
]
+GSM48RRMessage subclass: GSM48RRCipheringModeComplete [
+ <category: 'OsmoGSM'>
+ <comment: 'I represent a GSM 04.08 9.1.10 Ciphering Mode Complete'>
+
+ GSM48RRCipheringModeComplete class >> messageType [
+ <category: 'parsing'>
+ ^self msgCipherModeComplete
+ ]
+
+ GSM48RRCipheringModeComplete class >> tlvDescription [
+ <category: 'parsing'>
+ ^OrderedCollection new
+ add: (GSM48MIdentity asTLVDescription beOptional; yourself);
+ yourself
+ ]
+]
+
GSM48RRMessage subclass: GSM48RRClassmarkChange [
<category: 'OsmoGSM'>
<comment: 'I represent a GSM 04.08 9.1.11 Classmark'>
@@ -3154,6 +3171,7 @@ Eval [
GSM48RRImmediateAssignCommand initialize.
GSM48RRChannelRelease initialize.
GSM48RRCipheringModeCommand initialize.
+ GSM48RRCipheringModeComplete initialize.
GSM48RRClassmarkChange initialize.
GSM48RRPagingResponse initialize.
GSM48RRChannelModeModify initialize.
diff --git a/Tests.st b/Tests.st
index 6269c3a..6d336da 100644
--- a/Tests.st
+++ b/Tests.st
@@ -440,6 +440,13 @@ TestCase subclass: GSM48Test [
dec := GSM48MSG decode: inp readStream.
self assert: dec toMessage asByteArray = inp.
]
+
+ testCipheringModeComplete [
+ | dec inp |
+ inp := #(16r06 16r32) asByteArray.
+ dec := GSM48MSG decode: inp readStream.
+ self assert: dec toMessage asByteArray = inp.
+ ]
]
SCCPHandler subclass: TestSCCPHandler [