1
0
Fork 0

GSM48: Turn the KeySeq/LuType into a simple data...

This commit is contained in:
Holger Hans Peter Freyther 2010-11-27 14:25:00 +01:00
parent 892d4d19ab
commit 7bc65f3293
1 changed files with 5 additions and 15 deletions

View File

@ -75,8 +75,9 @@ GSM48IE subclass: GSM48SimpleData [
]
GSM48IE subclass: GSM48KeySeqLuType [
GSM48SimpleData subclass: GSM48KeySeqLuType [
<category: 'osmo-message'>
<comment: 'This byte is shared for two things'>
| val |
GSM48KeySeqLuType class >> createDefault [
@ -86,29 +87,18 @@ GSM48IE subclass: GSM48KeySeqLuType [
yourself
]
GSM48KeySeqLuType class >> length: aByteArray [
GSM48KeySeqLuType class >> length [
"We always need a byte"
^ 1
]
GSM48KeySeqLuType class >> parseFrom: aByteArray [
^ self new
val: (aByteArray at: 1);
yourself
]
val [
^ val
^ self data at: 1
]
val: aVal [
<category: 'creation'>
val := aVal.
]
writeOnDirect: aMsg [
<category: 'creation'>
aMsg putByte: val.
self data: (ByteArray with: aVal).
]
]