note description: "[ A parallel port's read-only status register. ]" legal : "See notice at end of class." status : "See notice at end of class."; author : "Paul Bates (paul.a.bates@gmail.com)" date : "$Date$" revision: "$Revision$" frozen class PRT_PARALLEL_STATUS_REGISTER inherit PRT_PARALLEL_REGISTER rename bit_2 as irq, bit_3 as error, bit_4 as select_in, bit_5 as paper_out, bit_6 as ack, bit_7 as busy export {NONE} bit_0, bit_1, set_bit_0, set_bit_1, set_bit_2, set_bit_3, set_bit_4, set_bit_5, set_bit_6, set_bit_7 redefine is_writable, irq, error, select_in, paper_out, ack, busy end create {PRT_PARALLEL_CONNECTION} make feature -- Access data_bit_mask: NATURAL_8 = 0b11111000 -- type: attached PRT_PARALLEL_REGISTER_TYPE -- once Result := {PRT_PARALLEL_REGISTER_TYPE}.status end feature -- Status report irq: BOOLEAN -- Indicates if IRQ is enabled. -- Note: Be sure to call `receive' to query the register's state. do Result := Precursor end error: BOOLEAN -- Indicates if there was an error. -- Note: Be sure to call `receive' to query the register's state. do Result := Precursor end select_in: BOOLEAN -- Indicates if the device is on-line. -- Note: Be sure to call `receive' to query the register's state. do Result := Precursor end paper_out: BOOLEAN --Indicates if there is no paper. -- Note: Be sure to call `receive' to query the register's state. do Result := Precursor end ack: BOOLEAN -- Indicates if the last character was recieved. -- Note: Be sure to call `receive' to query the register's state. do Result := Precursor end busy: BOOLEAN -- Indicates if the device is busy and cannot accept more data at this time. -- Note: Be sure to call `receive' to query the register's state. do Result := Precursor end feature {NONE} -- Status report frozen is_writable: BOOLEAN -- once Result := False end end