summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-12-10 15:05:28 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-12-10 15:05:28 +0100
commit6b652f549ef8a60e9be22a7e698371fa9800402e (patch)
tree1670400e3050d6ce6c1b6186bea0773f865d44d9
parent5800d96fb2e6dde3ed24b57e3037f3d4b051db54 (diff)
oml: Add handling for the GetAttributes OML message
-rw-r--r--fakebts/OMLMsg.st32
-rw-r--r--fakebts/Test.st8
2 files changed, 40 insertions, 0 deletions
diff --git a/fakebts/OMLMsg.st b/fakebts/OMLMsg.st
index 0356838..91f9402 100644
--- a/fakebts/OMLMsg.st
+++ b/fakebts/OMLMsg.st
@@ -270,6 +270,11 @@ Object subclass: OMLAttribute [
^ 16r40
]
+ attrRequiredAttributes [
+ <category: 'attributes'>
+ ^ 16r1A
+ ]
+
asTLVDescription [
<category: 'parsing'>
^ Osmo.TLVDescription new
@@ -873,6 +878,11 @@ Object subclass: OMLMessageBase [
<category: 'message-type'>
^ 16r49
]
+
+ msgGetAttributes [
+ <category: 'message-type'>
+ ^ 16r81
+ ]
]
OMLMessageBase class >> parse: aStream [
@@ -1573,3 +1583,25 @@ OMLSetChannelAttributes subclass: OMLSetChannelAttributesAck [
^ FOMMessage msgSetChannelAttributesAck
]
]
+
+OMLDataField subclass: OMLGetAttributes [
+ | requestedAttributes |
+ <category: 'BTS-OML'>
+ <comment: 'I construct a GSM 12.21 O&M Get Attributes as of 8.11.1'>
+
+ OMLGetAttributes class >> attributeType [
+ <category: 'parsing'>
+ ^ FOMMessage msgGetAttributes
+ ]
+
+ OMLGetAttributes class >> tlvDescription [
+ <category: 'parsing'>
+ ^ OrderedCollection new
+ add: (Osmo.TLVDescription new
+ tag: OMLAttribute attrRequiredAttributes;
+ beTLV; minSize: 1;
+ parseClass: OMLAttributeData;
+ instVarName: #requestedAttributes; yourself);
+ yourself
+ ]
+]
diff --git a/fakebts/Test.st b/fakebts/Test.st
index 483fe6b..b019bae 100644
--- a/fakebts/Test.st
+++ b/fakebts/Test.st
@@ -228,6 +228,10 @@ RoundTripTestCase subclass: OMLMsgTest [
^ #(128 128 0 9 71 3 0 0 0 13 5 64 7)
]
+ getAttributes [
+ ^ #(128 128 0 9 129 4 0 0 255 26 0 1 167)
+ ]
+
testFomMessage [
| oml |
@@ -320,6 +324,10 @@ RoundTripTestCase subclass: OMLMsgTest [
testSetChannelAttributes [
self roundtripTestFor: #setChannelAttributesData class: OMLSetChannelAttributes.
]
+
+ testGetAttributes [
+ self roundtripTestFor: #getAttributes class: OMLGetAttributes.
+ ]
]
TestCase subclass: RSLSmokeTest [