previous | start | next

ASN.1 Data Types

Simple data types include:
BOOLEAN(1)
takes values true and false
INTEGER(2)
any positive or negative whole number
REAL(9)
expressed as mantissa, base, exponent
BITSTRING(3), OCTETSTRING(4)
an ordered sequence of 0 or more bits or octets (bytes?)
NULL(5)
takes only one value, null...
ENUMERATED(10)
a list of values is supplied
Examples of some of these include:
brainDamaged ::= BOOLEAN
numberOfEmployees ::= INTEGER
avogadrosNumber ::= REAL(602,10,23)
sevenDeadlySins ::= ENUMERATED {
    pride(1), envy(2), gluttony(3), avarice(4), lust(5), sloth(6),
wrath(7)
} -- corresponding to OSI 7 layers :-)
NB: The numbers given in parentheses, eg (1), are called TAGS, see later this lecture.
 


previous | start | next