smalltalk
/
osmo-st-all
Archived
1
0
Fork 0

test: Add code to require different kind of channels

This commit is contained in:
Holger Hans Peter Freyther 2012-09-03 17:07:21 +02:00
parent 39021215ba
commit 799ac59418
1 changed files with 16 additions and 4 deletions

View File

@ -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].