
{ DECK: IOT$PP_RESPONSE

  CONST
    ioc$min_response_length = 5 * 8,
    ioc$max_response_length = 49 * 8,
    ioc$detailed_status_length_b = (ioc$max_response_length -
      ioc$min_response_length),
    ioc$detailed_status_length = ioc$detailed_status_length_b DIV 8,
    ioc$disk_detailed_status_length = 44,
    ioc$disk_detailed_status_words = ioc$disk_detailed_status_length * 4,
    ioc$unsolicited_response = 0,
    ioc$intermediate_response = 1,
    ioc$normal_response = 2,
    ioc$abnormal_response = 3,
    ioc$statistics_report = 7,
    ioc$recovered_error = 1;

  TYPE
    iot$short_response = packed record
      flags: ALIGNED [0 MOD 8] iot$short_response_flags,
      request: ^iot$io_request,
    recend,

    iot$short_response_flags = packed record
      fill1: 0 .. 1,
      one_word_response: boolean,
      fill2: 0 .. 3fff(16),
    recend,


    iot$pp_response = packed record
      fill1: ALIGNED [0 MOD 8] 0 .. 0ffff(16),
      request: ^iot$io_request,
      fill2: 0 .. 0ffffffff(16),
      request_rma: ost$real_memory_address,
      response_length: iot$response_length,
      logical_unit: iot$logical_unit,
      recovery: iot$request_recovery,
      interrupt: iot$interrupt,
      priority: iot$priority,
      alert_mask: iot$alert_conditions,
      abnormal_status: iot$abnormal_status,
      interface_error_code: iot$interface_error_code,
      response_code: iot$response_code,
      unsolicited_response_code: iot$unsolicited_response_code,
      alert_conditions: iot$alert_conditions,
      transfer_count: iot$transfer_count,
      last_command: ost$real_memory_address,
    recend,

    iot$detailed_status = SEQ (REP ioc$detailed_status_length of ost$word),

    iot$detailed = record
      CASE word_move: boolean OF
      = TRUE =
        bytes: ALIGNED [0 MOD 8]  ARRAY [0 .. ioc$detailed_status_length_b - 1]
              OF ost$byte,
      = FALSE =
        detailed_status: ALIGNED [0 MOD 8]  iot$detailed_status,
      CASEND,
    recend,

    iot$detailed_seq = record
      detailed_status: ALIGNED [0 MOD 8]  iot$detailed_status,
    recend,


    iot$response_length = 0 .. 0ffff(16),

    iot$abnormal_status = packed record
      abnormal_alert: boolean,
      interface_error: boolean,
      forced_termination: boolean,
      channel_error: boolean,
      data_overrun: boolean,
      recording_medium_error: boolean,
      hardware_malfunction: boolean,
      intervention_required: boolean,
      function_timeout: boolean,
      output_channel_parity: boolean,
      fill: 0 .. 03f(16),
    recend,

    iot$interface_error_code = 0 .. 0ffff(16),

    iot$response_code = packed record
      primary_response: 0 .. 3,
      secondary_response: 0 .. 3,
      future: 0 .. 0f(16),
    recend,

    iot$unsolicited_response_code = 0 .. 0ff(16);

*copyc iot$io_request
*copyc ost$hardware_subranges
*copyc iot$logical_unit
*copyc iot$request_recovery
*copyc iot$alert_conditions
*copyc iot$transfer_count
