DataMuseum.dk

Presents historical artifacts from the history of:

DANOSI

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DANOSI

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦3a93b1db4⟧ TextFile

    Length: 11409 (0x2c91)
    Types: TextFile
    Names: »HDLC.ENV«

Derivation

└─⟦5bf9983c6⟧ Bits:30010496 DANOSI SW50070 Disk 2/2 MegaSwitch Development Toolset Rel. 1.1 PN: 798-66-79 DVBS1.SW50070.rel.1.1.2/2
    └─⟦this⟧ »PAXENV\HDLC.ENV« 

TextFile

hdlcenv;

(***************************************)
(*   environment to the hdlc3 system   *)
(*   as described in                   *)
(*     RC3502 HDLC3 Adaptor            *)
(*     Reference Manual                *)
(*     RCSL: 99 0 01330                *)
(*     september 1990                  *)
(*     Inger Bohlbro                   *)
(*                                     *)
(*   release 1                         *)
(*   version 0, 20/10 87 inb           *)
(*   version 1, 27/3 87 inb            *)
(*   version 2,  3/9 87 inb            *)
(*     - connect extended              *)
(*     - disconnect immediate inserted *)
(*   version 3,  1/2 90 bb             *)
(*     - compiler switch fln controls  *)
(*     - first, last, next             *)
(*   version 4,  4/4 90 bb             *)
(*     - f,l,n was not hidden in con-  *)
(*     - stant expressions             *)
(*   version 5,  1/5 90 inb            *)
(*     - extended with HDLC2 specific  *)
(*     - parameters                    *)
(*     - name changed to hdlcenv       *)
(*   version 6,  10/6 90 inb           *)
(*     - new controller types          *)
(*     - hdlc events added             *)
(*     - all names prefixed with hdlc  *)
(*   version 7,  11/9 90 inb           *)
(*     - new u1 values                 *)
(*     - hdlc_protocol_type added      *)
(*   version 8,  1/10 90 inb           *)
(*     - packed -> packed3502          *)
(*   version 9,  13/12 90 inb          *)
(*     - new event numbers added       *)
(*     - frmr type removed             *)
(*   version 10, 31/1 91 inb           *)
(*     - hdlc_reset_link added         *)
(*     - hdlc_ev_reset_by_user         *)
(*   version 11, 8/11 91 inb           *)
(*     - u1 values updated             *)
(*     - event numbers from Mega added *)
(*     - u2 result from Mega added     *)
(*   version 12, 12/2 93 bb            *)
(*     - switch rc5000 changed to TA   *)
(***************************************)

const
(* u1 values in user messages *)

   hdlc_lineid             = 13*4 + 0; 
   hdlc_mem_layout         = 14*4 + 0; 
   hdlc_connect            =  1*4 + 0;  
   hdlc_connect2           = 12*4 +0;
   hdlc_disconnect         =  2*4 + 0;  
   hdlc_disconnect_immediate=28*4 + 0;
   hdlc_return_all         =  3*4 + 0;  
   hdlc_return_unused_buf  =  4*4 + 0;  
   hdlc_modem_control      =  6*4 + 0;  
   hdlc_sense_status       =    0 + 0;  
   hdlc_sense_version      =  5*4 + 0;  
   hdlc_sense_linespeed    =  9*4 + 0;  
   hdlc_get_last_FRMR      = 17*4 + 0;  
   hdlc_read_statistics    =  7*4 + 0;  
   hdlc_read_clear_stat    =  8*4 + 0;  
   hdlc_event              = 10*4 + 0;  
   hdlc_control_event      = 25*4 + 0;  
   hdlc_FCS_control        = 26*4 + 0;  
   hdlc_exchange_lcpid     = 27*4 + 0;  
   hdlc_exchange_lcpid2    = 155;
   hdlc_busy_control       = 18*4 + 0;
   hdlc_halt               = 29*4 + 0;
   hdlc_continue           = 30*4 + 0;
   hdlc_reset_link         = 31*4 + 0;
   hdlc_check_restart      = 62*4 + 0;
   hdlc_receive            =    0 + 1;  
   hdlc_transmit           =    0 + 2;  
   -- u1 = 251  is reserved for LineConnector
   
(* u2 return values to user messages *)

   hdlc_ok                   =    0 + 0; 
   hdlc_already_connected    =  1*8 + 0;
   hdlc_not_processed        =    0 + 1;
   hdlc_xmit_not_processed   =  1*8 + 1;
   hdlc_reserved_by_another  =        2;
   hdlc_too_large_mem_request=    0 + 3;
   hdlc_em_init_trouble      =  2*8 + 3;
   hdlc_no_free_memory       =  3*8 + 3;
   hdlc_chio_init_problem    =  4*8 + 3;
   hdlc_mbx_pointer_nil      =  5*8 + 3;
   hdlc_lapb_exception       =  6*8 + 3;
   hdlc_chio_exception       =  7*8 + 3;
   hdlc_adaptor_init_trouble = 10*8 + 3; 
   hdlc_lapb_init_trouble    = 11*8 + 3; 
   hdlc_adapter_exception    = 12*8 + 3; 
   hdlc_driver_exception     = 13*8 + 3; 
   hdlc_illegal_opcode       =    0 + 4;
   hdlc_illegal_size         =    0 + 4;
   hdlc_invalid_param        =    0 + 4;
   hdlc_illegal_priority     =    0 + 4;
   hdlc_illegal_state        =  1*8 + 4;
   hdlc_protocol_not_implemented = 2*8 + 4; 

(* constant values *)
 
   hdlc_framing_length     = 4;
   hdlc_ext_framing_length = 5;
 
   hdlc_com204_controller = 3;
   hdlc_com205_controller = 16;
   hdlc_com206_controller = 19;
   hdlc_mega_controller   = 50;
   
   hdlc_v24_interface = 0;
   hdlc_x21_interface = 1;
   
   hdlc_connected_state     = 0;
   hdlc_connecting_state    = 1;
   hdlc_disconnecting_state = 2;
   hdlc_disconnected_state  = 3;
   hdlc_passive_state       = 4;

(* event numbers *)
 
   hdlc_ev_connected           = 0;
   hdlc_ev_RNR_timeout         = 1;
   hdlc_ev_reset               = 2;
   hdlc_ev_disconnected_mess   = 3;
   hdlc_ev_discon_by_other_end = 4;
   hdlc_ev_unsol_U             = 5;
   hdlc_ev_rec_FRMR            = 6;
   hdlc_ev_undef_frame         = 7;
   hdlc_ev_unsol_S             = 8;
   hdlc_ev_ill_I_length        = 9;
   hdlc_ev_invalid_NR          = 10;
   hdlc_ev_timeout_connected   = 11;
   hdlc_ev_timeout_connecting  = 12;
   hdlc_ev_rec_error           = 13;
   hdlc_ev_line_error          = 14;
   hdlc_ev_parity_error        = 15;
   hdlc_ev_modem_clock         = 18;
   hdlc_ev_idle_channel        = 19;
   hdlc_ev_port_closed         = 20;
   hdlc_ev_disconnected        = 21;
   hdlc_ev_unsol_DM            = 22;
   hdlc_ev_ill_S_U_length      = 23;
   hdlc_ev_con_by_user         = 26;
   hdlc_ev_con_by_nmc          = 27;
   hdlc_ev_disc_by_user        = 28;
   hdlc_ev_disc_by_nmc         = 29;
   hdlc_ev_nnp_crc_error       = 30;
   hdlc_ev_hs_timeout          = 31;
   hdlc_ev_linespeed_changed   = 32;
   hdlc_ev_message_lost        = 33;
   hdlc_ev_rv_seq_error        = 34;
   hdlc_ev_rv_error            = 35;
   hdlc_ev_reset_by_user       = 36;
   hdlc_ev_too_long_packet     = 37;
   hdlc_ev_ill_line_resistance = 38;
   hdlc_ev_ill_nnp_version     = 39;
   hdlc_ev_start               = 40;
   hdlc_ev_stop                = 41;
   hdlc_ev_release             = 42;
   hdlc_ev_nmc_reset           = 43;
   hdlc_ev_unknown            = 255;

type   
(* types to lock on databuffers *)       

   hdlc_protocol_type =
$if target <> TA
     packed record
$else
     packed3502 record
$endif
       d7, empty_I, d5, d4, 
       x75, mlp, year, modulo : boolean;
     end;
   hdlc_mem_layout_type =
     record
$if fln > 0
       FIRST, LAST, NEXT : integer;
$endif
       REC_N1,
       REC_BUFS,
       XMIT_BUFS,
       REC_TEST_ELEM_PR_BUF,
       XMIT_TEST_ELEM_PR_BUF,
       CNTRL_TEST_ELEM_PR_BUF,
       TEST_BUFS         : integer;
       PROTOCOL          : hdlc_protocol_type;
       LINEID            : byte;
       XMIT_N1,
       T3                : integer;
     end;
const
   hdlc_default_protocol = 
     hdlc_protocol_type(:false, true, false, false, false, false, true, false :);
   hdlc_default_mem_layout =
     hdlc_mem_layout_type(:
$if fln > 0
       ?,?,?,
$endif
       256, 7, 7, 16,16,16,6, hdlc_default_protocol, 0, 256, 0:); 
 
type 
   hdlc_connect_mode_type =
$if target <> TA
     packed record
$else
     packed3502 record
$endif
       RNR_DISC,
       AUTO_RETURN,
       NO_S_COMMANDS,
       NO_POLL,
       DELAY_INF,
       EXTENDED_MESSAGE,
       FINAL_ALARM,
       AUTO_CONNECT  : boolean;
     end;
   hdlc_fill_type = array(1..5) of integer;
   hdlc_connect_type =
     record
$if fln > 0
       FIRST, LAST, NEXT : integer;
$endif
       MODE : hdlc_connect_mode_type;
       CONNECT_IDENT,
       T1,
       N2,
       K,
       FRAMESPACE,
       ABORTSPACE,
       N_POLL      : integer;
       FILL        : hdlc_fill_type;
     end; 
const
   hdlc_default_connect_mode =
     hdlc_connect_mode_type (:false,true,false,false,false,true,false,false:);
   hdlc_default_fill = hdlc_fill_type (:0,0,0,0,0:);
   hdlc_default_connect =
     hdlc_connect_type (:
$if fln > 0
       ?,?,?,
$endif
       hdlc_default_connect_mode,1,1600,10,7,0,0,10,hdlc_default_fill:);
type
   hdlc_modem_control_type =
     record
$if fln > 0
       FIRST, LAST, NEXT : integer;
$endif
       UPDATE_RTS,
       RTS,
       UPDATE_DTR,
       DTR        : boolean;
     end;

   hdlc_sense_status_result_type =
$if target <> TA
     packed record
$else
     packed3502 record
$endif
       LINE_STATE,
       CI,
       CTS,             -- SQD for COM204
       DCD,
       DSR           : bit;
       RESULT_FIELD  : 0..7;
     end;
   hdlc_sense_status_type =
     record
$if fln > 0
       FIRST, LAST, NEXT : integer;
$endif
       LINE_STATE        : byte;
     end;

   hdlc_sense_version_type =
     record
$if fln > 0
       FIRST, LAST, NEXT : integer;
$endif
       COM_ID,
       INTERFACE,
       ADAPTOR_VERSION,
       ADAPTOR_RELEASE,
       LAPB_VERSION,
       LAPB_RELEASE      : byte;
     end;
   hdlc_sense_version204_type =
     record
$if fln > 0
       FIRST, LAST, NEXT : integer;
$endif
       COM_ID,
       DRIVER_VERSION,
       ROM88_VERSION,
       ROM89_VERSION,
       RAMSIZE,
       ROM88_SUBVERSION,
       ROM89_SUBVERSION  : byte;
     end;

   hdlc_sense_linespeed_type =
     record
$if fln > 0
       FIRST, LAST, NEXT : integer;
$endif
       COUNT,
       TIME   : integer;
     end;
     (*  bps = 80 * COUNT/TIME  *)
       
   hdlc_last_FRMR_type =
     record
$if fln > 0
       FIRST, LAST, NEXT : integer;
$endif
       INF_FIELD  : array(1..5) of byte;
     end;

   hdlc_v24_signals_type =
     record
       CTS_OFF,
       DSR_OFF,
       DCD_OFF,
       CI_ON,
       SQD_OFF   : integer;
     end;
   hdlc_frmr_inf_type =  
$if target <> TA
     packed record
$else
     packed3502 record
$endif
       REJ_C_FIELD : byte;
       VR          : 0..7;
       RESPONSE    : boolean;
       VS          : 0..7;
       D0,
       D1, D2, D3, D4 : bit;
       Z, Y, X, W  : boolean;
     end;
const
   hdlc_zero_frmr_inf = hdlc_frmr_inf_type(:0,0,false,0,0,0,0,0,0,false,false,false,false:);
type
   hdlc_stat_type =
     record
$if fln > 0
       FIRST, LAST, NEXT : integer;
$endif
       RECEIVED,
       TRANSMITTED,
       SKIPPED,
       RETRANSMITTED     : double;
       REC_RNR,
       XMIT_RNR,
       REC_REJ,
       XMIT_REJ,
       ACK_TIMEOUTS      : integer;
       MODEM_SIGNALS     : hdlc_v24_signals_type;
       LAST_FRMR_DATA    : hdlc_frmr_inf_type;
       REC_OVERRUN,
       XMIT_UNDERRUN,
       REC_ABORT,
       REC_ERRORS,
       ZERO_INF,
       REC_INVALID       : integer;
       NO_REC_BUFFER     : byte;
       COM_ID            : byte;
       REC_SABM,
       XMIT_SABM         : integer;
       REC_BYTES,
       XMIT_BYTES,
       REC_DATA_BYTES,
       XMIT_DATA_BYTES   : double;
     end;
   
   hdlc_event_result_type =
$if target <> TA
     packed record
$else
     packed3502 record
$endif
       EVENT_LOST   : boolean;
       CAUSE        : 0..15;
       RESULT_FIELD : 0..7;
     end;
   hdlc_event_type =
     record
$if fln > 0
       FIRST, LAST, NEXT : integer;
$endif
       EXT_CAUSE,
       LOST_EVENTS,
       LINE_STATE       : byte;
     end;

   hdlc_event_control_type =
     record
$if fln > 0
       FIRST, LAST, NEXT : integer;
$endif
       EXT_EVENTS,
       NOT_REPEATED   : boolean;
       CLEAR_BUFFER   : byte;
     end;
   
   hdlc_exchange_lcpid_type =
     record
$if fln > 0
       FIRST, LAST, NEXT : integer;
$endif
       USER_INDEX,
       USER_LCPID,
       SERVER_LCPID : integer;
     end;

.  (* end of hdlcenv *)