1
0
Fork 0

tlv: Introduce a LV type as well.

This will be used by GSM 04.11 RP-IEs
This commit is contained in:
Holger Hans Peter Freyther 2014-02-09 14:01:53 +01:00
parent 6ddaa3cd5b
commit 564087a32d
2 changed files with 18 additions and 3 deletions

View File

@ -1,5 +1,5 @@
"
(C) 2012 by Holger Hans Peter Freyther
(C) 2012-2014 by Holger Hans Peter Freyther
All Rights Reserved
This program is free software: you can redistribute it and/or modify
@ -57,6 +57,11 @@ Object subclass: TLVDescription [
^ #tagOnly
]
lengthValue [
<category: 'type'>
^#lv
]
new [
<category: 'creation'>
^ super basicNew
@ -182,6 +187,11 @@ Object subclass: TLVDescription [
self typeKind: self class tagLengthValue
]
beLV [
<category: 'creation'>
self typeKind: self class lengthValue
]
beLen16 [
<category: 'creation'>
len_size := 2.

View File

@ -1,5 +1,5 @@
"
(C) 2012 by Holger Hans Peter Freyther
(C) 2012,2014 by Holger Hans Peter Freyther
All Rights Reserved
This program is free software: you can redistribute it and/or modify
@ -39,6 +39,11 @@ TestCase subclass: TLVDescriptionTest [
self assert: tlv instVarName = #bla.
tlv tag: 16r23.
self assert: tlv tag = 16r23
self assert: tlv tag = 16r23.
tlv beLV.
self assert: tlv typeKind = #lv.
tlv beTLV.
self assert: tlv typeKind = #tlv.
]
]