
{    DECK:  RFC$PP_INTERFACE_DEFS
{
{    The purpose of this deck is to define the CYBIL constants for
{    the RHFAM/VE CPU to PP interface.
{
{    Most of the definitions here correspond to definitions in the NAD
{    pp driver (deck rfm$nad_pp_driver).  Changes here will require assembly
{    language equivalent changes in the driver.


{    The following is a list of the supported logical_commands.

    CONST
        rfc$min_logical_command = 0a0(16),
        rfc$lc_request_connection = 0a0(16),
        rfc$lc_obtain_connect_request = 0a1(16),
        rfc$lc_accept_connect_request = 0a2(16),
        rfc$lc_reject_connect_request = 0a3(16),
        rfc$lc_send_data = 0a4(16),
        rfc$lc_receive_data = 0a5(16),
        rfc$lc_status_nad = 0a6(16),
        rfc$lc_send_control_message = 0a7(16),
        rfc$lc_receive_control_message = 0a8(16),
        rfc$lc_disconnect_paths = 0a9(16),
        rfc$lc_read_path_status_table = 0aa(16),
        rfc$lc_obtain_nad_general_stat = 0ab(16),
        rfc$lc_process_physical_command = 0ac(16),
        rfc$max_logical_command = 0ac(16);

{    The following are the supported physical commands.

    CONST
        rfc$min_physical_command = 20(16),
        rfc$pc_function_nad = 20(16),
        rfc$pc_output_8_in_8_mode = 23(16),
        rfc$pc_input_8_in_8_mode = 25(16),
        rfc$pc_set_addr_and_length = 28(16),
        rfc$pc_hardware_status = 29(16),
        rfc$pc_microcode_status = 2a(16),
        rfc$max_physical_command = 2a(16);

{    The following are the supported PP commands.

    CONST
        rfc$min_pp_command = 4,
        rfc$pp_idle = 4,
        rfc$pp_resume = 5,
        rfc$max_pp_command = 5;

{    The following determines the maximum peripheral request buffer
{    size.  One must understand the type definitions specified
{    in RFT$PP_INTERFACE_DEFS prior to changing this constant.
{    Specifically, the buffer cannot exceed 1024 bytes.

    CONST
        rfc$command_buffer_size = 80;  {  640 bytes }

{    The following is a list of functions that are sent to the NAD by the
{    PP driver.

    CONST
        rfc$nf_purge_all_paths = 0,
        rfc$nf_nad_general_status = 1,
        rfc$nf_abort_transaction = 3,
        rfc$nf_send_control_message = 4,
        rfc$nf_connect_path = 5,
        rfc$nf_ready = 10(8),
        rfc$nf_accept_connect_request = 11(8),
        rfc$nf_reject_connect_request = 12(8),
        rfc$nf_receive_control_message = 14(8),
        rfc$nf_get_rejected_ctrl_mess = 17(8),
        rfc$nf_normal_disconnect = 21(8),
        rfc$nf_abnormal_disconnect = 22(8),
        rfc$nf_transmit_data = 23(8),
        rfc$nf_read_path_status = 35(8),
        rfc$nf_receive_rej_control_mess = 36(8),
        rfc$nf_connect_maintenance_path = 40(8),
        rfc$nf_maintenance_path_input = 42(8),
        rfc$nf_read_remote_status = 46(8),
        rfc$nf_reset_transaction = 50(8),
        rfc$nf_univeral_command = 53(8),
        rfc$nf_local_nad_status = 54(8),
        rfc$nf_select_path = 200(8),
        rfc$nf_flag_function = 400(8);

{    The following is a list of the universal command sub-functions.

    CONST
        rfc$uc_read_binary_data = 5,
        rfc$uc_write_binary_data = 6,
        rfc$uc_obtain_connect_request = 7;

{    The following is a list of functions that are sent to the
{    S0 ICI/C170 converter by the PP driver.

    CONST
        rfc$s0c_set_conversion_mode = 110000(8),
        rfc$s0c_set_12_bit_mode = 120000(8),
        rfc$s0c_select_c170_converter = 170000(8);

{    The following is a list of the NAD DI functions.

    CONST
        rfc$di_input_bit_string = 0,
        rfc$di_input_8_in_12 = 2,
        rfc$di_output_bit_string = 10(8),
        rfc$di_output_12_to_8 = 12(8),
        rfc$di_obtain_hardware_status = 200(8),
        rfc$di_obtain_microcode_stat = 201(8),
        rfc$di_set_addr_and_length = 202(8)+ rfc$s0c_set_12_bit_mode,
        rfc$di_clear_parity_error = 204(8),
        rfc$di_interface_master_clear = 277(8) + rfc$s0c_select_c170_converter,
        rfc$di_step_processor = 301(8),
        rfc$di_go_nad = 302(8),
        rfc$di_processor_master_clear = 304(8);

{    The following is a list of nad response codes.

    CONST
        rfc$nad_response_mask = 37(8),
        rfc$nr_acknowledge = 1,
        rfc$nr_negative_acknowledge = 2,
        rfc$nr_universal_acknowledge = 5,
        rfc$nr_routing_error = 15(8),
        rfc$nr_initializing_to_rnad = 16(8),
        rfc$nr_transfer_not_ready = 17(8),
        rfc$nr_connect_in_progress = 21(8),
        rfc$nr_disconnected = 22(8),
        rfc$nr_abort = 23(8),
        rfc$nr_undefined_command = 24(8),
        rfc$nr_illegal_command = 25(8),
        rfc$nr_buffer_terminated = 26(8),
        rfc$nr_flush = 27(8);


    CONST
        rfc$min_pf_criteria = 0,
        rfc$pf_match_both_characters = 0,
        rfc$pf_match_first_character = 1,
        rfc$pf_match_second_character = 2,
        rfc$pf_unconditional_match = 3,
        rfc$max_pf_criteria = 3;

{    The following constants are used to index into the command
{    buffer for the PP requests.

    CONST

        rfc$cbi_pp_request = 1,
        rfc$cbi_unit_request_1 = 1,
        rfc$cbi_unit_request_2 = 2,
        rfc$cbi_general_buffer = 3,
        rfc$cbi_in_pointer = 3,
        rfc$cbi_out_pointer = 4,
        rfc$cbi_first_io_entry = 5,
        rfc$cbi_last_io_entry = 60,
        rfc$cbi_limit_pointer = 61,
        rfc$cbi_first_indirect_pva = 61,
        rfc$cbi_last_command_entry = rfc$command_buffer_size;


