+typedef enum {
+ TAPER_STATE_DEFAULT = 0, // 0 Before TAPER-START
+ TAPER_STATE_INIT = (1 << 0), // 1 Between TAPE-START and TAPE-OK
+ TAPER_STATE_RESERVATION = (1 << 1), // 2 Have a reservation
+ TAPER_STATE_IDLE = (1 << 2), // 4 tape started and do nothing
+ TAPER_STATE_DUMP_TO_TAPE = (1 << 3), // 8 Doing a PORT-WRITE
+ TAPER_STATE_FILE_TO_TAPE = (1 << 4), // 16 Doing a FILE-WRITE
+ TAPER_STATE_TAPE_REQUESTED = (1 << 5), // 32 REQUEST-NEW-TAPE received
+ TAPER_STATE_WAIT_FOR_TAPE = (1 << 6), // 64 if taper wait for a tape,
+ // after a START-SCAN send
+ TAPER_STATE_WAIT_NEW_TAPE = (1 << 7), // 128 AFTER NEW-TAPE sent and before
+ // NEW-TAPE received
+ TAPER_STATE_TAPE_STARTED = (1 << 8), // 256 taper already started to write
+ // to a tape.
+ TAPER_STATE_DONE = (1 << 9),
+} TaperState;
+