From e2c35a5d931d628923d95e63a316020702b6d0f7 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 21 Oct 2012 13:11:43 +0200 Subject: [PATCH] gsm48: Add ClassmarkChange message to the list of messages we can generate Add ClassmarkChange as some MSCs require early classmark sending and this message can now easily be constructed. --- GSM48.st | 28 ++++++++++++++++++++++++++++ Tests.st | 10 +++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/GSM48.st b/GSM48.st index 430b420..b4f9091 100644 --- a/GSM48.st +++ b/GSM48.st @@ -517,6 +517,15 @@ GSM48DataHolder subclass: GSM48Classmark2 [ ] ] +GSM48DataHolder subclass: GSM48Classmark3 [ + + + + + + +] + GSM48VariableSizedIE subclass: GSM48MIdentity [ | type id | @@ -2355,6 +2364,24 @@ GSM48RRMessage subclass: GSM48RRChannelRelease [ ] ] +GSM48RRMessage subclass: GSM48RRClassmarkChange [ + + + + GSM48RRClassmarkChange class >> messageType [ + + ^ self msgClassmarkChange + ] + + GSM48RRClassmarkChange class >> tlvDescription [ + + ^ OrderedCollection new + add: GSM48Classmark2 asTLVDescription; + add: (GSM48Classmark3 asTLVDescription beConditional; yourself); + yourself + ] +] + GSM48SSMessage subclass: GSM48SSFacility [ @@ -2421,6 +2448,7 @@ Eval [ GSM48RRAssignmentComplete initialize. GSM48RRImmediateAssignCommand initialize. GSM48RRChannelRelease initialize. + GSM48RRClassmarkChange initialize. GSM48SSFacility initialize. GSM48SSRegister initialize. diff --git a/Tests.st b/Tests.st index 6024958..80d40ae 100644 --- a/Tests.st +++ b/Tests.st @@ -1,5 +1,5 @@ " - (C) 2010-2011 by Holger Hans Peter Freyther + (C) 2010-2012 by Holger Hans Peter Freyther All Rights Reserved This program is free software: you can redistribute it and/or modify @@ -378,6 +378,14 @@ TestCase subclass: GSM48Test [ octet3 radioChannelRequirement: 2r10. self assert: octet3 data = 2r01011101. ] + + testClassmarkChange [ + | dec inp | + inp := #(16r06 16r16 16r03 16r33 16r19 16rA2) asByteArray. + dec := GSM48MSG decode: inp readStream. + self assert: dec type = GSM48RRClassmarkChange messageType. + self assert: dec toMessage asByteArray = inp. + ] ] SCCPHandler subclass: TestSCCPHandler [