test: Add code to require different kind of channels
This commit is contained in:
parent
39021215ba
commit
799ac59418
|
@ -121,13 +121,14 @@ Object subclass: OpenBSCTest [
|
|||
bts stop.
|
||||
]
|
||||
|
||||
requireAnyChannel [
|
||||
| rsl ra lchan |
|
||||
requireChannel: aType random: aMask [
|
||||
| ra rsl lchan |
|
||||
<category: 'bts'>
|
||||
"Require a Radio Channel of any type"
|
||||
aType = (aType bitAnd: aMask)
|
||||
ifFalse: [^self error: 'The mask/start is wrong.'].
|
||||
|
||||
"The RA we will wait for.."
|
||||
ra := 16r03.
|
||||
ra := aType bitOr: (Random between: 0 and: aMask).
|
||||
|
||||
rsl := RSLChannelRequired new.
|
||||
rsl channelNumber: RSLChannelNumber ccchRach.
|
||||
|
@ -138,6 +139,17 @@ Object subclass: OpenBSCTest [
|
|||
^ LogicalChannelWrapper initWith: lchan.
|
||||
]
|
||||
|
||||
requireAnyChannel [
|
||||
<category: 'bts'>
|
||||
" Only use four bit for random to work with both necis"
|
||||
^ self requireChannel: 2r0 random: 2r1111
|
||||
]
|
||||
|
||||
requireEmergencyChannel [
|
||||
<category: 'bts'>
|
||||
^ self requireChannel: 2r10100000 random: 2r11111
|
||||
]
|
||||
|
||||
assert: aBoolean message: aMessage [
|
||||
<category: 'verifying'>
|
||||
aBoolean ifTrue: [^self].
|
||||
|
|
Reference in New Issue