10 *\brief Tape data block base class.
12 * This class represents a Honeywell paper tape block.
13 * That may be some kind of data block or a end of tape mark.
20 *\brief Initialisation state.
23 TBS_OK, //!< Block successfully initialised
24 TBS_EOF_LEGAL, //!< Legal EOF while initialising
25 TBS_EOF_ILLEGAL, //!< Illegal EOF while initialising
26 TBS_CHECKSUM, //!< Checksum error
27 TBS_IOERR, //!< I/O-Error while reading
28 TBS_DEFAULT //!< Block not initialised.
35 TBT_DATA=0x10, //!< Data block
36 TBT_EOT, //!< End of tape block
37 TBT_DISCARD //!< Invalid block, check block_type
41 virtual ~tape_block();
43 tape_block(tape_block &);
44 void operator=(tape_block &);
46 tb_state_t get_state();
47 virtual int get_type();
48 virtual int get_subtype();
49 virtual vector<string> get_description();
51 int get_discarded_bytes();
52 unsigned char * get_raw_data();
54 static tape_block * gen_from_fd(int fd,
55 void(*input_start)(void *)=0,
56 void (*input_stop)(void *)=0,
57 void * start_stop_arg=0
62 string get_typestring();
66 void(*input_start)(void *)=0,
67 void (*input_stop)(void *)=0,
68 void * start_stop_arg=0
75 int block_type; //!< Type of this block.
76 tb_state_t init_state; //!< Initialisation state.
77 int discarded_bytes; //!< Amount of bytes discarded before beginning.
78 unsigned char * raw_data; //!< Raw block data in bytes.
79 int raw_size; //!< Size of the raw data.
80 unsigned short * word_data; //!< Data organized in machine words.
81 int word_size; //!< Size of the blocks in machine words.
82 int poolsize; //!< Amount of data malloc'ed
83 }; // class tape_block