aboutsummaryrefslogtreecommitdiffstats
path: root/GSM48.st
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-12-23 11:52:54 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-12-23 11:52:54 +0100
commitdd93a5c1b1b7e8619b4528462285f86129eeb10a (patch)
tree124bb5f269b8b336e3f2fb69b365e0e0ff4f68fa /GSM48.st
parent2cad3db5c81ccc53da44a29ceb02e82d5a3a2444 (diff)
gsm: Be able to handle the channel mode modify and channel mode modify ack
Split the channel description and packet description in two classes while adding the channel mode modify.
Diffstat (limited to 'GSM48.st')
-rw-r--r--GSM48.st106
1 files changed, 100 insertions, 6 deletions
diff --git a/GSM48.st b/GSM48.st
index dacfaa6..4adbfea 100644
--- a/GSM48.st
+++ b/GSM48.st
@@ -286,16 +286,13 @@ GSM48SimpleData subclass: GSM48PageAndDedicatedMode [
<gsmValueLength: 1>
]
-GSM48SimpleData subclass: GSM48ChannelOrPacketDescription [
+GSM48SimpleData subclass: GSM48ChannelDescription [
<category: 'OsmoGSM'>
- <comment: 'I represent a 10.5.2.5 or 10.5.2.25a. Conditionals
- can not be easily expressed yet.'>
+ <comment: 'I represent a 10.5.2.5 channel description'>
- <gsmName: 'channelOrPacketDescription'>
+ <gsmName: 'channelDescription'>
<gsmValueLength: 3>
- "broken stuff.. I really need to add a proper conditional
- checking here..."
timeslotNumber [
<category: 'channel-description'>
^ (data at: 1) bitAnd: 2r111
@@ -307,6 +304,49 @@ GSM48SimpleData subclass: GSM48ChannelOrPacketDescription [
]
]
+GSM48SimpleData subclass: GSM48ChannelMode [
+ | mode |
+ <category: 'OsmoGSM'>
+ <comment: 'I represent a 10.5.2.6'>
+
+ <gsmName: 'channelMode'>
+ <gsmValueLength: 1>
+
+ GSM48ChannelMode class [
+ modeSignallingOnly [ <category: 'attr'> ^ 2r00000000 ]
+ modeSpeechVersion1 [ <category: 'attr'> ^ 2r00000001 ]
+ modeSpeechVersion2 [ <category: 'attr'> ^ 2r00100001 ]
+ modeSpeechVersion3 [ <category: 'attr'> ^ 2r01000001 ]
+ modeData145 [ <category: 'attr'> ^ 2r00001111 ]
+ modeData120 [ <category: 'attr'> ^ 2r00000011 ]
+ modeData60 [ <category: 'attr'> ^ 2r00001011 ]
+ modeData36 [ <category: 'attr'> ^ 2r00010011 ]
+ ]
+
+ GSM48ChannelMode class >> defaultValue [
+ <category: 'creation'>
+ ^ ByteArray with: self modeSignallingOnly
+ ]
+
+ mode [
+ ^ data first
+ ]
+
+ mode: aMode [
+ data := ByteArray with: aMode.
+ ]
+]
+
+GSM48ChannelDescription subclass: GSM48ChannelOrPacketDescription [
+ <category: 'OsmoGSM'>
+ <comment: 'I represent a 10.5.2.5 or 10.5.2.25a. Conditionals
+ can not be easily expressed yet.'>
+ <gsmName: 'channelOrPacketDescription'>
+
+ "broken stuff.. I really need to add a proper conditional
+ checking here..."
+]
+
GSM48SimpleData subclass: GSM48TimingAdvance [
<category: 'OsmoGSM'>
<comment: 'I represent a 10.5.2.40'>
@@ -315,6 +355,14 @@ GSM48SimpleData subclass: GSM48TimingAdvance [
<gsmValueLength: 1>
]
+GSM48DataHolder subclass: GSM48VGCSTargetModeIndication [
+ <category: 'OsmoGSM'>
+ <comment: 'I represent a 10.5.2.42a'>
+
+ <gsmName: 'vgcsTargetMode'>
+ <gsmMinValueSize: 1 max: 1>
+]
+
GSM48SimpleData subclass: GSM48StartingTime [
<category: 'OsmoGSM'>
<comment: 'I represent a 10.5.2.38'>
@@ -397,6 +445,15 @@ GSM48DataHolder subclass: GSM48MobileAllocation [
<gsmMinValueSize: 0 max: 8>
]
+GSM48DataHolder subclass: GSM48MultiRateConfiguration [
+ <category: 'OsmoGSM'>
+ <comment: 'I represent a GSM 04.08 Multi-rate configuration as of
+ 10.5.2.21aa'>
+
+ <gsmName: 'multiRate'>
+ <gsmMinValueSize: 2 max: 6>
+]
+
GSM48SimpleData subclass: GSM48KeySeqLuType [
<category: 'OsmoGSM'>
<comment: 'This byte is shared for two things'>
@@ -2568,6 +2625,41 @@ GSM48RRMessage subclass: GSM48RRPagingResponse [
]
]
+GSM48RRMessage subclass: GSM48RRChannelModeModify [
+ <category: 'OsmoGSM'>
+
+ GSM48RRChannelModeModify class >> messageType [
+ <category: 'factory'>
+ ^ self msgChannelModeModify
+ ]
+
+ GSM48RRChannelModeModify class >> tlvDescription [
+ <category: 'parsing'>
+ ^ OrderedCollection new
+ add: GSM48ChannelDescription asTLVDescription;
+ add: GSM48ChannelMode asTLVDescription;
+ add: (GSM48VGCSTargetModeIndication asTLVDescription beOptional; yourself);
+ add: (GSM48MultiRateConfiguration asTLVDescription beOptional; yourself);
+ yourself
+ ]
+]
+
+GSM48RRMessage subclass: GSM48RRChannelModeModifyAck [
+ <category: 'OsmoGSM'>
+
+ GSM48RRChannelModeModifyAck class >> messageType [
+ <category: 'factory'>
+ ^ self msgChannelModeModifyAck
+ ]
+
+ GSM48RRChannelModeModifyAck class >> tlvDescription [
+ ^ OrderedCollection new
+ add: GSM48ChannelDescription asTLVDescription;
+ add: GSM48ChannelMode asTLVDescription;
+ yourself
+ ]
+]
+
GSM48SSMessage subclass: GSM48SSFacility [
<category: 'OsmoGSM'>
@@ -2640,6 +2732,8 @@ Eval [
GSM48RRChannelRelease initialize.
GSM48RRClassmarkChange initialize.
GSM48RRPagingResponse initialize.
+ GSM48RRChannelModeModify initialize.
+ GSM48RRChannelModeModifyAck initialize.
GSM48SSFacility initialize.
GSM48SSRegister initialize.