rsl: Start sending a channel required down the BTS link
This commit is contained in:
parent
cc3e2e89e3
commit
9b8d70289a
|
@ -7,5 +7,6 @@ Eval [
|
|||
fileIn: 'IPAOMLMsg.st';
|
||||
fileIn: 'OML.st';
|
||||
fileIn: 'OMLInit.st';
|
||||
fileIn: 'RSLMsg.st'.
|
||||
fileIn: 'RSLMsg.st';
|
||||
fileIn: 'OpenBSCTest.st'.
|
||||
]
|
||||
|
|
|
@ -21,6 +21,17 @@ Object subclass: OpenBSCTest [
|
|||
<category: 'OpenBSC-Test'>
|
||||
<comment: 'I help in dealing with setup and teardown of a test'>
|
||||
|
||||
OpenBSCTest class >> initWith: aBTS [
|
||||
<category: 'creation'>
|
||||
^ self new
|
||||
bts: aBTS; yourself.
|
||||
]
|
||||
|
||||
bts: aBTS [
|
||||
<category: 'creation'>
|
||||
bts := aBTS
|
||||
]
|
||||
|
||||
createAndConnectBTS [
|
||||
<category: 'bts'>
|
||||
bts := BTS new.
|
||||
|
@ -29,8 +40,16 @@ Object subclass: OpenBSCTest [
|
|||
]
|
||||
|
||||
requireAnyChannel [
|
||||
| rsl |
|
||||
<category: 'bts'>
|
||||
"Require a Radio Channel of any type"
|
||||
|
||||
rsl := RSLChannelRequired new.
|
||||
rsl channelNumber: RSLChannelNumber ccchRach.
|
||||
rsl requestReference: #(16r03 42 20) asRSLAttributeData.
|
||||
rsl accessDelay: #(23) asRSLAttributeData.
|
||||
|
||||
bts sendRSL: rsl toMessage.
|
||||
]
|
||||
]
|
||||
|
||||
|
|
|
@ -561,15 +561,17 @@ RSLInformationElement subclass: RSLAttributeData [
|
|||
data := aData
|
||||
]
|
||||
|
||||
writeOn: aMsg [
|
||||
writeOn: aMsg with: attr [
|
||||
<category: 'serialize'>
|
||||
|
||||
aMsg
|
||||
putByteArray: data size;
|
||||
putByteArray: data.
|
||||
]
|
||||
"Sanity checking"
|
||||
attr isFixedSize ifTrue: [
|
||||
data size = attr valueSize
|
||||
ifFalse: [^ self error: 'Element ', attr instVarName,
|
||||
' should be of size: ', attr valueSize printString.]
|
||||
].
|
||||
|
||||
writeOn: aMsg with: attr [
|
||||
"Write it out"
|
||||
attr isLen8 ifTrue: [aMsg putByte: data size].
|
||||
attr isLen16 ifTrue: [aMsg putLen16: data size].
|
||||
aMsg putByteArray: data.
|
||||
|
@ -581,6 +583,16 @@ RSLInformationElement subclass: RSLAttributeData [
|
|||
]
|
||||
]
|
||||
|
||||
RSLAttributeData subclass: RSLChannelNumber [
|
||||
<category: 'BTS-RSL'>
|
||||
<comment: 'I represent a GSM 08.58 Channel Number as of 9.3.1'>
|
||||
|
||||
RSLChannelNumber class >> ccchRach [
|
||||
<category: 'creation'>
|
||||
^ #(2r10001000) asRSLAttributeData
|
||||
]
|
||||
]
|
||||
|
||||
RSLMessageBase subclass: RSLCommonChannelManagement [
|
||||
| channel_number |
|
||||
<category: 'BTS-RSL'>
|
||||
|
@ -595,6 +607,11 @@ RSLMessageBase subclass: RSLCommonChannelManagement [
|
|||
<category: 'parsing'>
|
||||
^ 0
|
||||
]
|
||||
|
||||
channelNumber: aNumber [
|
||||
<category: 'creation'>
|
||||
channel_number := aNumber
|
||||
]
|
||||
]
|
||||
|
||||
RSLCommonChannelManagement subclass: RSLChannelRequired [
|
||||
|
@ -606,6 +623,21 @@ RSLCommonChannelManagement subclass: RSLChannelRequired [
|
|||
<category: 'parsing'>
|
||||
^ self messageTrxChannelRequired
|
||||
]
|
||||
|
||||
RSLChannelRequired class >> tlvDescription [
|
||||
<category: 'parsing'>
|
||||
^ RSLMessageDefinitions channelRequiredMessage
|
||||
]
|
||||
|
||||
requestReference: aRef [
|
||||
<category: 'creation'>
|
||||
request_reference := aRef.
|
||||
]
|
||||
|
||||
accessDelay: aDelay [
|
||||
<category: 'creation'>
|
||||
access_delay := aDelay
|
||||
]
|
||||
]
|
||||
|
||||
RSLCommonChannelManagement subclass: RSLBCCHInformation [
|
||||
|
|
|
@ -121,6 +121,11 @@ Object subclass: TLVDescription [
|
|||
^ kind = self class conditional
|
||||
]
|
||||
|
||||
isFixedSize [
|
||||
<category: 'access'>
|
||||
^ type = self class tagValue or: [type = self class valueOnly].
|
||||
]
|
||||
|
||||
hasLength [
|
||||
<category: 'access'>
|
||||
^ type = self class tagLengthValue
|
||||
|
|
Reference in New Issue