- Given the definition
company ::= SET
{
name [0] IA5String,
zipcode [1] IA5String,
CitationType INTEGER,
other ANY DEFINED BY CitationType
}
where the INTEGER value of CitationType can be 0 = INTEGER, 1 = REAL, or
2 = BOOLEAN, which of the following values are valid? Assume tagging has been
done accurately.
- ``CyberReal'', ``20742-1911'', 1, TRUE
- ``60603'', ``Villaland'', 0, 500000.00
- 0, 450, ``HomeNet''
- ``SitCom'', 1, 70000.00
- Write a module that identifies DaysOfWeek as a BIT STRING consisting
of seven bits, one for each day of the week and the first of which represents
Sunday. Write a value of the string that represents (Monday, Wednesday,
Saturday).
- Differentiate between the following two representations?
a. HouseType ::= INTEGER b. HouseType ::= ENUMERATED
( {
Ranch (1) Ranch (1)
SplitLevel (2) SplitLevel (2)
Colonial (3) Colonial (3)
TownHome (4) TownHome (4)
} }
- Assume Employee is of type SEQUENCE with the following components:
hire date, job title, age, salary, and office location (a city name). Write an
ASN.1 notation for Employee. Give a valid representation of Employee.
- Distinguish among the various kinds of tagging in ASN.1. Use an
example to illustrate the distinctions. Indicate the effects of IMPLICIT and
EXPLICIT.
- Differentiate among SEQUENCE, SET, ENUMERATED, and WITH COMPONENTS.
In your discussion, use the following structures as examples to illustrate
differences.
a) airport ::= SEQUENCE
{
origin [0] IA5String,
stop [1] IA5String OPTIONAL,
destination [2] IA5String
}
b) airport ::= SET
{
origin [0] IA5String,
stop [1] IA5String,
destination [2] IA5String
}
c) airport ::= ENUMERATED
{
origin [o],
stop [s],
destination [d]
}
d) airport_list ::= airport
( WITH COMPONENTS
{
origin [0],
stop [1],
destination [2]
}
)
- Give an instance of the AirlineFlight example in
Structured Types Section that includes a
stop in the Dallas-Fort Worth (DFW) airport.
- For each of the following examples, name an appropriate ASN.1 data
type and write the corresponding ASN.1 definition.
- An alphabetized list of employees.
- One of a movie, play, or sport event.
- Prime numbers between 0 and 15.
- 110010001111000011111100
- The local time in hours, minutes, and seconds.
- A sentence of text.
- Number of cars delivered, sold, leased, and on-hand.
- The following data structures are written in C. Write each structure
in ASN.1.
a) struct calendar birthday[2] =
{ { {`O', `C', `T'}, 2, 1948 }, { {`A', `P', `R'}, 14, 1955 } }
where "calendar" is a structure defined by
struct calendar
{
char name[3];
int date:
int year;
};
b) struct time depart_time, arrive_time;
where "time" is a structure defined by
struct time
{
int hour;
int minute;
int second;
};
c) char array[7] = "NETWORK"
d) struct entry
{
char *word;
int *page_number;
} index[50] =
{ {"ARPANET", 105}, {"ASN.1", 328} };
- Write in Pascal (or another high-level language different from C)
each of the ASN.1 representations you produced in the preceding exercise.
- CASE: Stores in Philadelphia and Washington, but not Baltimore,
carry colonial flags. The stores obtain the flags for 25.99 each. The
identification number for colonial flags is cf1783, The Philadelphia store has
14 flags on hand and the Washington store has 10. Write the ASN.1
representation(s) for this CASE using the module in this
Figure.
- Write a definition of NonStopFlights in this
Section with the following additional
conditions: include United Airlines and allow both nonstop flights and those
that stop in Dallas-Fort Worth (DFW).
- Consider the entries in the Table of Contents for this chapter as
records in ``ASN.1''.
- Which main section headings represent simple records and which
represent structured records?
- Write an ASN.1 recursive definition that specifies a record such
as ``ASN.1''.
- Write the Table of Contents as an
instance of the record definition.
- Write an ASN.1 recursive definition of a binary tree.
- Use your definition of a binary tree in the preceding exercise to
represent the following instance:
50
/ \
/ \
42 60
/ \ /
30 47 58
\
25