  TYPE
    nat$mdi_pp_log_response = packed record
      fill1: 0 .. 0fff(16),
      error_id: nat$mdi_pp_error_id,
      fill2: 0 .. 1fff(16),
      operation_kind: nat$mdi_pp_operation_kind,
{ The following bits represent the symptom codes diagnosed by the MDI pp.
      general_status_error: boolean,
      channel_error_flag: boolean,
      channel_deactivation_error: boolean,
      message_length_verify_error: boolean,
      channel_active: boolean,
      channel_full: boolean,
      channel_empty: boolean,
      incomplete_transfer: boolean,
      message_content_error: boolean,
      maximum_size_exceeded: boolean,
{ End of symptom_codes.
      fill3: 0 .. 3f(16),
      timed_out_function: 0 .. 0ffff(16),
      previous_function: 0 .. 0ffff(16),
      error_word1: 0 .. 0ffff(16),
      error_word2: 0 .. 0ffff(16),
      fill4: 0 .. 0f(16),
      general_status: 0 .. 0fff(16),
      length_1: 0 .. 0ffffffff(16),
      length_2: 0 .. 0ffffffff(16),
      fill5: 0 .. 3fff(16),
      error_kind: nat$mdi_pp_error_kind,
      retry_count: 0 .. 0ffff(16),
      detailed_status_included: boolean,
      general_status_included: boolean,
      mdi_is_down: boolean,
      fill6: 0 .. 1fff(16),
    recend,

    nat$mdi_pp_error_id = (nac$mdi_null_error_id, nac$mdi_function_timeout,
          nac$mdi_gen_status_busy_timeout, nac$mdi_operation_failure,
          nac$mdi_gen_status_send_timeout, nac$mdi_gen_status_avai_timeout,
          nac$mdi_gen_status_content_fail, nac$mdi_gen_status_data_avail,
          nac$mdi_usage_data, nac$mdi_invalid_state_change, nac$mdi_available,
          nac$mdi_reset, nac$mdi_channel_protocol_error, nac$mdi_master_clear_failure,
          nac$mdi_invalid_flow_control, nac$mdi_invalid_message_type),

    nat$mdi_pp_operation_kind = (nac$mdi_null_op_kind, nac$mdi_op_write,
          nac$mdi_op_read, nac$mdi_op_read_det_status,
          nac$mdi_op_read_diagnostic_cmd, nac$mdi_read_gen_status,
          nac$mdi_op_inline_write),

    nat$mdi_pp_error_kind = (nac$mdi_recovered_error,
          nac$mdi_unrecovered_error, nac$mdi_intermediate_error,
          nac$mdi_informative_message);

  TYPE
    nat$mdi_general_status = packed record
      general_error: boolean,
      memory_error: boolean,
      data_available: boolean,
      send_data: boolean,
      busy: boolean,
      state: nat$mdi_states,
      fill2: boolean,
      expected_memory_error: boolean,
      expected_error: boolean,
    recend;

  TYPE
    nat$mdi_states = (nac$mdi_reset_state, nac$mdi_diagnostic_state,
          nac$mdi_maintenance_state, nac$mdi_invalid_state,
          nac$mdi_loading_state, nac$mci_reset_state,
          nac$logically_closed_state, nac$mdi_down_state,
          nac$mdi_operational_state);


  TYPE
    nat$mdi_detailed_status = packed record
      protocol_number: 0 .. 0ff(16),
      card_slot: 0 .. 0ff(16),
      software_version_number: 0 .. 0ffff(16),
      system_identifier: 0 .. 0ffffffffffff(16),
      fill1: 0 .. 03f(16),
      last_io: 0 .. 2,
      last_transparent: 0 .. 0ff(16),
      last_function: 0 .. 0ffff(16),
      last_but_one: 0 .. 0ffff(16),
      status_flag: nat$mdi_status_flags,
      general_status: nat$mdi_general_status,
      error_1: nat$mdi_icb_status_register_1,
      error_2: 0 .. 0ff(16),
      software_status: nat$mdi_software_status,
      fill2: 0 .. 0ffffffff(16),
    recend;

  TYPE
    nat$mdi_status_flags = packed record
      general_error: boolean,
      hardware_error: boolean,
      channel_error: boolean,
      pp_error: boolean,
    recend;

  TYPE
    nat$mdi_software_status = packed record
      fill1: 0 .. 3ff(16),
      reached_error: boolean,
      pp_shutdown: boolean,
      local_fault: boolean,
      external_fault: boolean,
      upline_timeout: boolean,
      length_error: boolean,
    recend;

  TYPE
    nat$mdi_icb_status_register_1 = packed record
      itb_error: boolean,
      itb_parity_error: boolean,
      channel_timeout: boolean,
      input_truncated: boolean,
      pp_overrun: boolean,
      channel_parity_error: boolean,
      fill1: boolean,
      pp_master_clear: boolean,
    recend;

