990823-1

Write an ASN.1 specification to control a video recorder. The specification should allow the requestor to tell the recorder to rewind the tape, play the tape, and record a certain television channel at a certain time.

Answer

Solution 1:

Command ::= SEQUENCE {
    [1] operation Operation,
    [2] channel INTEGER OPTIONAL,
    [3] start GeneralizedTime OPTIONAL,
    [4] end GeneralizedTime OPTIONAL }

Operation ::= ENUMERATED {
    rewind (1), play(2), record(3) }

Solution 2:

Command ::= SEQUENCE {
    [0] rewindfirst BOOLEAN,
    [1] operation Operation,
    [2] channel INTEGER OPTIONAL,
    [3] start GeneralizedTime OPTIONAL,
    [4] end GeneralizedTime OPTIONAL }

Operation ::= ENUMERATED {
    none(1), play(2), record(3) }

Solution 3:

Command ::= CHOICE {
    play [0] NULL,
    rewind [1] NULL,

    record [2] Record }

Record ::= SEQUENCE {
    channel [1] INTEGER,
    start GeneralizedTime OPTIONAL,
    end GeneralizedTime OPTIONAL }

List of exam questions