gsm: Provide access to the cell description..
This commit is contained in:
parent
11efcf94bb
commit
f653a23da5
17
GSM48.st
17
GSM48.st
|
@ -291,6 +291,23 @@ GSM48SimpleData subclass: GSM48CellDescription [
|
|||
<comment: 'I represent a 10.5.2.2 Cell Description'>
|
||||
<gsmName: 'cellDescription'>
|
||||
<gsmValueLength: 2>
|
||||
|
||||
ncc [
|
||||
<category: 'accessing'>
|
||||
^ (data first bitShift: -3) bitAnd: 2r111
|
||||
]
|
||||
|
||||
bcc [
|
||||
<category: 'accessing'>
|
||||
^ (data first bitShift: -0) bitAnd: 2r111
|
||||
]
|
||||
|
||||
bcch [
|
||||
| hi low |
|
||||
hi := data first bitShift: -6.
|
||||
low := data second.
|
||||
^ (hi bitShift: 8) bitOr: low.
|
||||
]
|
||||
]
|
||||
|
||||
GSM48SimpleData subclass: GSM48ChannelDescription [
|
||||
|
|
5
Tests.st
5
Tests.st
|
@ -435,6 +435,11 @@ TestCase subclass: GSM48Test [
|
|||
inp := #(16r06 16r2B 16rFF 16r29 16r0B 16rE3 16r29 16r00 16r00) asByteArray.
|
||||
dec := GSM48MSG decode: inp readStream.
|
||||
self assert: dec toMessage asByteArray = inp.
|
||||
|
||||
"Now test some decoding inside"
|
||||
self assert: dec cellDescription bcc = 7.
|
||||
self assert: dec cellDescription ncc = 7.
|
||||
self assert: dec cellDescription bcch = 809.
|
||||
]
|
||||
]
|
||||
|
||||
|
|
Reference in New Issue