1
0
Fork 0

rsl: Implement the positive CRCX, MDCX and DLCX messages

This commit is contained in:
Holger Hans Peter Freyther 2012-12-23 19:20:48 +01:00
parent 6a514a588f
commit 6db40339de
2 changed files with 222 additions and 5 deletions

View File

@ -151,7 +151,7 @@ Osmo.TLVParserBase subclass: RSLMessageBase [
RSLMessageBase class >> ignoredBaseClasses [
<category: 'handling'>
^ {RSLCommonChannelManagement. RSLTRXManagement.
RSLDedicatedChannelManagement. RSLRadioLinkManagement}
RSLDedicatedChannelManagement. RSLRadioLinkManagement. RSLIPAVendorManagement}
]
RSLMessageBase class >> canHandle: aDiscrim transparent: aTrans type: aType [
@ -290,6 +290,14 @@ Object subclass: RSLMessageDefinitions [
beTV; valueSize: 1; yourself
]
causeIE [
<category: 'common-ie'>
^ Osmo.TLVDescription new
tag: RSLInformationElement attrCause;
instVarName: #cause; parseClass: RSLAttributeData;
beTLV; minSize: 1; yourself
]
radioLinkMessageBase [
<category: 'radio-link'>
^ OrderedCollection new
@ -473,10 +481,7 @@ Object subclass: RSLMessageDefinitions [
channelActivationNackMessage [
<category: 'dedicated-channel'>
^ self dedicatedChannelMessageBase
add: (Osmo.TLVDescription new
tag: RSLInformationElement attrCause;
instVarName: #cause; parseClass: RSLAttributeData;
beTLV; minSize: 1; yourself);
add: self causeIE;
yourself
]
@ -1120,3 +1125,170 @@ RSLRadioLinkManagement subclass: RSLReleaseIndication [
<rslMessageType: #messageRadioLinkReleaseIndication>
<rslMessageDefinition: #releaseIndicationMessage>
]
RSLMessageDefinitions subclass: RSLIPAMessageDefinitions [
RSLIPAMessageDefinitions class [
connectionIdentifierIE [
^ Osmo.TLVDescription new
tag: 16rF8; instVarName: #conn_id; parseClass: RSLAttributeData;
beTV; valueSize: 2; yourself
]
localIPIE [
^ Osmo.TLVDescription new
tag: 16rF5; instVarName: #local_ip; parseClass: RSLAttributeData;
beTV; valueSize: 4; yourself
]
localPortIE [
^ Osmo.TLVDescription new
tag: 16rF3; instVarName: #local_port; parseClass: RSLAttributeData;
beTV; valueSize: 2; yourself
]
remoteIPIE [
^ self localIPIE
tag: 16rF0; instVarName: #remote_ip; yourself
]
remotePortIE [
^ self localPortIE
tag: 16rF1; instVarName: #remote_port; yourself.
]
speechModeIE [
^ Osmo.TLVDescription new
tag: 16rF4; instVarName: #speech_mode; parseClass: RSLAttributeData;
beTV; valueSize: 1; yourself
]
rtpPayloadTypeIE [
^ Osmo.TLVDescription new
tag: 16rF2; instVarName: #rtp_payload; parseClass: RSLAttributeData;
beTV; valueSize: 1; yourself
]
connectionStatisticsIE [
^ Osmo.TLVDescription new
tag: 16rF6; instVarName: #stats; parseClass: RSLAttributeData;
beTLV; valueSize: 28; yourself
]
createConnectionMessage [
^ OrderedCollection new
add: self channelNumberIE;
add: self speechModeIE;
add: self rtpPayloadTypeIE;
yourself
]
createConnectionAckMessage [
^ OrderedCollection new
add: self channelNumberIE;
add: self connectionIdentifierIE;
add: self localPortIE;
add: self localIPIE;
yourself
]
modifyConnectionMessage [
<category: 'ipa'>
^ OrderedCollection new
add: self channelNumberIE;
add: self connectionIdentifierIE;
add: self remoteIPIE;
add: self remotePortIE;
add: self speechModeIE;
add: self rtpPayloadTypeIE;
yourself
]
modifyConnectionAckMessage [
^ OrderedCollection new
add: self channelNumberIE;
add: self connectionIdentifierIE;
yourself
]
deleteConnectionIndMessage [
^ OrderedCollection new
add: self channelNumberIE;
add: self connectionIdentifierIE;
add: self connectionStatisticsIE;
add: self causeIE;
yourself
]
]
]
RSLMessageBase subclass: RSLIPAVendorManagement [
<category: 'BTS-RSL-IPA'>
<comment: 'I represent a ip.access vendor extension'>
RSLIPAVendorManagement class [
messageCRCX [ <category: 'tag'> ^ 16r70 ]
messageCRCXAck [ <category: 'tag'> ^ 16r71 ]
messageCRCXNack [ <category: 'tag'> ^ 16r72 ]
messageMDCX [ <category: 'tag'> ^ 16r73 ]
messageMDCXAck [ <category: 'tag'> ^ 16r74 ]
messageMDCXNack [ <category: 'tag'> ^ 16r75 ]
messageDLCXInd [ <category: 'tag'> ^ 16r76 ]
messageDLCX [ <category: 'tag'> ^ 16r77 ]
messageDLCXAck [ <category: 'tag'> ^ 16r78 ]
messageDLCXNack [ <category: 'tag'> ^ 16r79 ]
]
RSLIPAVendorManagement class >> messageDiscrimator [
<category: 'parsing'>
^ 63
]
RSLIPAVendorManagement class >> isTransparent [
^ 0
]
RSLIPAVendorManagement class >> tlvDescription [
<category: 'tlv'>
^ RSLIPAMessageDefinitions perform: messageDefinition
]
]
RSLIPAVendorManagement subclass: RSLIPACreateConnection [
| channel_number speech_mode rtp_payload |
<category: 'BTS-RSL-IPA'>
<comment: 'I represent a Create Connection (CRCX) message'>
<rslMessageType: #messageCRCX>
<rslMessageDefinition: #createConnectionMessage>
]
RSLIPAVendorManagement subclass: RSLIPACreateConnectionAck [
| channel_number conn_id local_port local_ip |
<category: 'BTS-RSL-IPA'>
<comment: 'I represent a Create Connection (CRCX) ACK message'>
<rslMessageType: #messageCRCXAck>
<rslMessageDefinition: #createConnectionAckMessage>
]
RSLIPAVendorManagement subclass: RSLIPAModifyConnection [
| channel_number conn_id remote_ip remote_port speech_mode rtp_payload |
<category: 'BTS-RSL-IPA'>
<comment: 'I represent a Modify Connection (MDCX) message'>
<rslMessageType: #messageMDCX>
<rslMessageDefinition: #modifyConnectionMessage>
]
RSLIPAVendorManagement subclass: RSLIPAModifyConnectionAck [
| channel_number conn_id |
<category: 'BTS-RSL-IPA'>
<comment: 'I represent a Modify Connection (MDCX) ACK message'>
<rslMessageType: #messageMDCXAck>
<rslMessageDefinition: #modifyConnectionAckMessage>
]
RSLIPAVendorManagement subclass: RSLIPADeleteConnectionInd [
| channel_number conn_id stats cause |
<category: 'BTS-RSL-IPA'>
<comment: 'I represent a Delete Connection (DLCX) Indication message'>
<rslMessageType: #messageDLCXInd>
<rslMessageDefinition: #deleteConnectionIndMessage>
]

View File

@ -472,6 +472,51 @@ RoundTripTestCase subclass: RSLRoundTripTest [
^ #(8 41 1 10 6 4 0 1 8 17 )
]
ipaCrcxData [
^ #(126 112 1 10 244 17 242 97)
]
ipaCrcxAckData [
^ #(16r7E 16r71 16r01 16r0A 16rF8 16r00 16r27 16rF3 16r0F
16rAE 16rF5 16rC0 16rA8 16r0A 16r4E)
]
ipaDlcxIndData [
^ #(16r7E 16r76 16r01 16r0A 16rF8 16r00 16r27 16rF6 16r1C
16r00 16r00 16r06 16rE4 16r00 16r00 16rD5 16r9C 16r00
16r00 16r07 16r14 16r00 16r00 16rDB 16r6C 16r00 16r00
16r00 16r2A 16r00 16r00 16r00 16r35 16r00 16r00 16r00
16r00 16r1A 16r01 16r0F)
]
ipaMdcxData [
^ #(126 115 1 10 248 0 0 240 0 0 0 0 241 0 0 244 1 242 97)
]
ipaMdcxDataAck [
^ #(16r7E 16r74 16r01 16r0A 16rF8 16r00 16r27)
]
testIpaCrcxAck [
self roundtripTestFor: #ipaCrcxAckData class: RSLIPACreateConnectionAck.
]
testIpaCrcx [
self roundtripTestFor: #ipaCrcxData class: RSLIPACreateConnection.
]
testIpaDlcx [
self roundtripTestFor: #ipaDlcxIndData class: RSLIPADeleteConnectionInd.
]
testIpaMdcx [
self roundtripTestFor: #ipaMdcxData class: RSLIPAModifyConnection.
]
testIpaMdcxAck [
self roundtripTestFor: #ipaMdcxDataAck class: RSLIPAModifyConnectionAck.
]
testBCCHInformation [
self roundtripTestFor: #bcchInformationData class: RSLBCCHInformation
]