aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/test/asn1_SUITE_data/BitStr.py
diff options
context:
space:
mode:
authorKenneth Lundin <[email protected]>2010-02-19 14:01:57 +0000
committerErlang/OTP <[email protected]>2010-02-19 14:01:57 +0000
commit18bd1239bee04427340a44f57f993ea92c264e41 (patch)
treedbb3031dcd2e446eb457ff7ac5229949517d7557 /lib/asn1/test/asn1_SUITE_data/BitStr.py
parent729565dc3f8bcf8829508136498aef6a542840f4 (diff)
downloadotp-18bd1239bee04427340a44f57f993ea92c264e41.tar.gz
otp-18bd1239bee04427340a44f57f993ea92c264e41.tar.bz2
otp-18bd1239bee04427340a44f57f993ea92c264e41.zip
OTP-8463 Support for EXTENSIBILITY IMPLIED and SET/SEQ OF NamedType is
added.
Diffstat (limited to 'lib/asn1/test/asn1_SUITE_data/BitStr.py')
-rw-r--r--lib/asn1/test/asn1_SUITE_data/BitStr.py56
1 files changed, 56 insertions, 0 deletions
diff --git a/lib/asn1/test/asn1_SUITE_data/BitStr.py b/lib/asn1/test/asn1_SUITE_data/BitStr.py
new file mode 100644
index 0000000000..1d5bc21fda
--- /dev/null
+++ b/lib/asn1/test/asn1_SUITE_data/BitStr.py
@@ -0,0 +1,56 @@
+BitStr DEFINITIONS ::=
+BEGIN
+
+-- F.2.5.1
+-- Use a bit string type to model binary data whose format and
+-- length are unspecified,
+-- or specified elsewhere, and whose length in bits is not necessarily
+-- a multiple of eight.
+-- EXAMPLE
+
+G3FacsimilePage ::= BIT STRING
+-- a sequence of bits conforming to Recommendation T.4.
+
+image G3FacsimilePage ::= '100110100100001110110'B
+trailer BIT STRING ::= '0123456789ABCDEF'H
+body1 G3FacsimilePage ::= '1101'B
+body2 G3FacsimilePage ::= '1101000'B
+
+-- F.2.5.2
+-- Use a bit string type with a size constraint to model the
+-- values of a fixed sized bit field.
+-- EXAMPLE
+
+BitField ::= BIT STRING (SIZE (12))
+map1 BitField ::= '100110100100'B
+map2 BitField ::= '9A4'H
+map3 BitField ::= '1001101001'B -- Illegal - violates size constraint
+
+-- F.2.5.3
+-- Use a bit string type to model the values of a bit map, an
+-- ordered collection of logical variables
+-- indicating whether a particular condition holds for each of a
+-- correspondingly ordered collection of objects.
+
+DaysOfTheWeek ::= BIT STRING {
+ sunday(0), monday (1), tuesday(2),
+ wednesday(3), thursday(4), friday(5),
+ saturday(6) } (SIZE (0..7))
+
+sunnyDaysLastWeek1 DaysOfTheWeek ::= {sunday, monday, wednesday}
+sunnyDaysLastWeek2 DaysOfTheWeek ::= '1101'B
+sunnyDaysLastWeek3 DaysOfTheWeek ::= '1101000'B
+sunnyDaysLastWeek4 DaysOfTheWeek ::= '11010000'B -- Illegal - violates size constraint
+
+-- F.2.5.5
+-- Use a bit string type with named bits to model the values of a
+-- collection of related logical variables.
+-- EXAMPLE
+
+PersonalStatus ::= BIT STRING
+ {married(0), employed(1), veteran(2), collegeGraduate(3)}
+
+billClinton PersonalStatus ::= {married, employed, collegeGraduate}
+hillaryClinton PersonalStatus ::= '110100'B
+
+END