ADCCP NRM Programmer’s Guide DC 900-1317J Protogate, Inc.
Protogate, Inc. 12225 World Trade Drive, Suite R San Diego, CA 92128 (858) 451-0865 ADCCP NRM Programmer’s Guide © 2005 Protogate, Inc. All rights reserved Printed in the United States of America This document can change without notice. Protogate, Inc. accepts no liability for any errors this document might contain. Freeway® is a registered trademark of Protogate, Inc. All other trademarks and trade names are the properties of their respective holders.
Contents List of Figures 9 List of Tables 11 Preface 13 1 21 Introduction 1.1 Product Overview . . . . . . . . . . . . . . . . . . . 1.1.1 Freeway Server . . . . . . . . . . . . . . . . . . 1.1.2 Embedded ICP . . . . . . . . . . . . . . . . . . 1.2 Freeway Client-Server Environment . . . . . . . . . 1.2.1 Establishing Freeway Server Internet Addresses 1.3 Embedded ICP Environment . . . . . . . . . . . . . 1.4 Client Operations . . . . . . . . . . . . . . . . . . . 1.4.
ADCCP NRM Programmer’s Guide 2.7 2.8 2.9 3 Optional Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary of Frame Types . . . . . . . . . . . . . . . . . . . . . . . . . . Summary of NRM, ARM, and ABM . . . . . . . . . . . . . . . . . . . . ADCCP NRM DLI Functions 3.1 43 Summary of DLI Concepts . . . . . . . . . . . . . . . . . . . . . 3.1.1 Configuration in the Freeway Environment . . . . . . . . . . 3.1.2 Normal versus Raw Operation . . . . . . . . . . . . . . . . . 3.1.
Contents 3.4.21 3.4.22 3.4.23 3.4.24 3.4.25 3.4.26 3.4.27 3.4.28 3.4.29 3.4.30 3.4.31 3.4.32 3.4.33 3.4.34 4 DLI_PROT_RECV_STATION_RESET Packet . . . . DLI_PROT_SEND_STATION_RESET Packet . . . . DLI_PROT_RECV_STATION_RESET_CFM Packet. DLI_PROT_SEND_STATION_RESET_CFM Packet. DLI_PROT_RECV_LINK_EXCEPTION Packet . . . DLI_PROT_GET_STATISTICS_REPORT Packet . . DLI_PROT_RECV_STATISTICS_REPORT Packet. . DLI_PROT_RESP_ERROR Packet . . . . . . . . . . DLI_PROT_GET_BUF_REPORT Packet . . . . . . .
ADCCP NRM Programmer’s Guide 5 ADCCP NRM Link Configuration Using dlicfg 5.1 5.2 6 99 Configuration Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 DLI Session Configuration . . . . . . . . . . . . . . . . . . . . . . . . . 104 ADCCP NRM Line-Monitor Function 6.1 6.2 6.3 6.4 6.5 109 Opening and Attaching the Monitor Session . Configuring the Line-Monitor Function . . . Reporting Frames to the Client . . . . . . . . Detaching and Closing the Monitor Session .
Contents D.18 D.19 D.20 D.21 D.22 D.23 D.24 D.25 D.26 D.27 D.28 D.29 D.30 D.31 D.32 D.33 D.34 D.35 D.36 D.37 D.38 D.39 D.40 D.41 D.42 station-reset-packet . . . . . . . . . . . . . . . . . . . . . . . . . station-reset-ack-packet. . . . . . . . . . . . . . . . . . . . . . . recv-station-reset-packet . . . . . . . . . . . . . . . . . . . . . . recv-station-reset-ack-packet . . . . . . . . . . . . . . . . . . . . write-unform-data-packet (or write-unform-data-eom-packet) . receive-unform-data-packet . . . .
ADCCP NRM Programmer’s Guide 8 DC 900-1317J
List of Figures Figure 1–1: Freeway Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Figure 1–2: Embedded ICP Configuration. . . . . . . . . . . . . . . . . . . . . . . . . 23 Figure 1–3: A Typical Freeway Server Environment . . . . . . . . . . . . . . . . . . . . 25 Figure 2–1: Unbalanced Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Figure 2–2: Balanced Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ADCCP NRM Programmer’s Guide 10 DC 900-1317J
List of Tables Table 1–1: ADCCP NRM Data Rate and Number of Links . . . . . . . . . . . . . . . . 28 Table 2–1: ADCCP Frame Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Table 3–1: Include Files for ADCCP NRM . . . . . . . . . . . . . . . . . . . . . . . . 44 Table 3–2: DLI Call Sequence for ADCCP NRM (Blocking I/O). . . . . . . . . . . . . 47 Table 3–3: DLI Call Sequence for ADCCP NRM (Non-blocking I/O) . . . . . . . . . .
ADCCP NRM Programmer’s Guide 12 DC 900-1317J
Preface Purpose of Document This document contains information for the development of applications that use Protogate’s ADCCP NRM software product in a Freeway communications server or embedded ICP environment to establish communication with one or more remote stations. Note In this document, the term “Freeway” can mean either a Freeway server or an embedded ICP. For the embedded ICP, also refer to the user’s guide for your ICP and operating system (for example, the ICP2432 User’s Guide for Windows NT).
ADCCP NRM Programmer’s Guide • a client computer that runs the following: • TCP/IP (for a Freeway server) • Freeway data link interface (DLI) • the user application program Organization of Document Chapter 1 is an overview of Freeway and the ADCCP NRM product. Chapter 2 summarizes the ADCCP NRM communication protocol.
Preface Protogate References The following documents provide useful supporting information, depending on the customer’s particular hardware and software environments. Most documents are available on-line at Protogate’s web site, www.protogate.com.
ADCCP NRM Programmer’s Guide • • • • • Getting Started with Freeway 1200 DC 900-1536 Getting Started with Freeway 1300 DC 900-1538 Getting Started with Freeway 2000/4000 DC 900-1330 Getting Started with Freeway 8800 DC 900-1552 Loopback Test Procedures DC 900-1533 Embedded ICP Installation and Programming Support • • • • • ICP2432 User’s Guide for Digital UNIX DC 900-1513 ICP2432 User’s Guide for OpenVMS Alpha DC 900-1511 ICP2432 User’s Guide for OpenVMS Alpha (DLITE Interface) DC 900-151
Preface • • • • • • • • • DDCMP Programmer’s Guide DC 900-1343 FMP Programmer’s Guide DC 900-1339 Freeway AUTODIN Programmer’s Guide DC 908-1558 Freeway SIO STD-1300 Programmer’s Guide DC 908-1559 Military/Government Protocols Programmer’s Guide DC 900-1602 SIO STD-1200A (Rev. 1) Programmer’s Guide DC 908-1359 X.25 Call Service API Guide DC 900-1392 X.25/HDLC Configuration Guide DC 900-1345 X.
ADCCP NRM Programmer’s Guide Revision History The revision history of the ADCCP NRM Programmer’s Guide, Protogate document DC 900-1317J, is recorded below: Revision Release Date Description DC 900-1317A September 1994 Preliminary release DC 900-1317B November 1994 Full release: • Minor modifications and updated error codes • Updated file names for software release 2.
Preface Customer Support If you are having trouble with any Protogate product, call us at (858) 451-0865 Monday through Friday between 8 a.m. and 5 p.m. Pacific time. You can also fax your questions to us at (877) 473-0190 any time. Please include a cover sheet addressed to “Customer Service.” We are always interested in suggestions for improving our products. You can use the report form in the back of this manual to send us your recommendations.
ADCCP NRM Programmer’s Guide 20 DC 900-1317J
Chapter 1 Introduction 1.1 Product Overview Protogate provides a variety of wide-area network (WAN) connectivity solutions for real-time financial, defense, telecommunications, and process-control applications. Protogate’s Freeway server offers flexibility and ease of programming using a variety of LAN-based server hardware platforms.
ADCCP NRM Programmer’s Guide To maintain high data throughput, Freeway uses a multi-processor architecture to support the LAN and WAN services. The LAN interface is managed by a single-board computer, called the server processor. It uses a commercially available BSD Unix operating system (VxWorks on some older systems) to provide a full-featured base for the LAN interface and layered services needed by Freeway.
1: Introduction 1.1.2 Embedded ICP The embedded ICP connects your client computer directly to the WAN (for example, using Protogate’s ICP2432 PCIbus board). The embedded ICP provides client applications with the same WAN connectivity as the Freeway server, using the same data link interface (via the DLITE embedded interface). The ICP runs the communication protocol software using Protogate’s real-time operating system. Figure 1–2 shows the embedded ICP configuration.
ADCCP NRM Programmer’s Guide Summary of product features: • Provision of WAN connectivity either through a LAN-based Freeway server or directly using an embedded ICP • Elimination of difficult LAN and WAN programming and systems integration by providing a powerful and consistent data link interface • Variety of off-the-shelf communication protocols available from Protogate which are independent of the client operating system and hardware platform • Support for multiple WAN communication protocols s
1: Introduction 1.2 Freeway Client-Server Environment The Freeway server acts as a gateway that connects a client on a local-area network to a wide-area network. Through Freeway, a client application can exchange data with a remote data link application. Your client application must interact with the Freeway server and its resident ICPs before exchanging data with the remote data link application.
ADCCP NRM Programmer’s Guide 1.2.1 Establishing Freeway Server Internet Addresses The Freeway server must be addressable in order for a client application to communicate with it. In the Figure 1–3 example, the TCP/IP Freeway server name is freeway2, and its unique Internet address is 192.52.107.100. The client machine where the client application resides is client1, and its unique Internet address is 192.52.107.99.
1: Introduction 1.4.2 Opening a Session After the DLI and TSI configurations are properly defined, your client application uses the dlOpen function to establish a DLI session with an ICP link. As part of the session establishment process, the DLI establishes a TSI connection with the Freeway MsgMux through the TCP/IP BSD-style socket interface for the Freeway server, or directly to the client driver for the embedded ICP environment. 1.4.
ADCCP NRM Programmer’s Guide Each serial port (link) on the ICP operates independently of the other links on the same ICP and can be configured with different communication options. For example, each data link may be configured to run at its own baud rate, ranging from 1.2 kb/s to 122.9 kb/s with internal clock, or to 128 kb/s with external clock. Protogate’s ADCCP NRM Primary may be configured to poll up to 128 remote secondary stations.
1: Introduction 1.5.1 Software Description Protogate’s ADCCP NRM product includes the following major software components: • A group of communications software downloadable images: 1. Freeway server or embedded ICP software 2. Real-time operating system (OS/Impact) 3. ADCCP NRM communications software • DLI library for linking with client applications • Two loopback test programs (nrmalp.c nrmtest.c and nrmtest.c) for checking the product installation (see Appendix C) • A sample program (nrmmon.
ADCCP NRM Programmer’s Guide 30 DC 900-1317J
Chapter 2 ADCCP NRM Protocol Summary Protogate’s ADCCP NRM interface product is based on the American National Standard for Advanced Data Communication Control Procedures (ADCCP), which is a standard protocol (ANSI X3.66-1979) that helps computers exchange information. ADCCP defines link-level operation in several distinctly different configurations and operating modes. ADCCP also supports eleven optional features that modify link-level operation.
ADCCP NRM Programmer’s Guide In an unbalanced configuration (see Figure 2–1), the primary station transmits commands and the secondary stations transmit responses. Two modes of operation are defined in an unbalanced configuration: normal response mode and asynchronous response mode.
2: ADCCP NRM Protocol Summary 2.2 Balanced Configurations Some applications require two stations (one local and one remote) to exchange control and information. ADCCP achieves this by defining a set of procedures for balanced mode operation. A balanced configuration (see Figure 2–2) operates in asynchronous balanced mode, which functions much as if each station contained both a primary station and a secondary station operating in asynchronous response mode.
ADCCP NRM Programmer’s Guide defined. Although the configuration is symmetric, link communications may not be. The link between one primary station and its secondary station may be established, whereas the other primary/secondary link is not. Local Primary Station A Station A Commands Station B Responses Local Secondary Station C Station D Commands Station C Responses Remote Secondary Station B Remote Primary Station D DRWG-0528 Figure 2–3: Symmetric Configuration 2.
2: ADCCP NRM Protocol Summary between the primary function in one combined station and the secondary function in the other. Each dialog uses its own separate address. Theoretically, more than one pair of combined stations may be multiplexed on a single physical link, so long as the assigned addresses and the hardware prevent contention for transmission on the link. 2.5 Virtual Links and Multiplexing Each physical link supports multiple virtual links.
ADCCP NRM Programmer’s Guide 2.6 Operational States ADCCP link operation procedures define three fundamental states: logically disconnected state, initialization state, and information transfer state. Within each state, ADCCP defines valid link operation procedures. In the logically disconnected state, only unnumbered frames are valid. Information frames and supervisory frames are ignored. Consequently, no information is exchanged in this state.
2: ADCCP NRM Protocol Summary (or function) to issue a disconnect (DISC) command. This option is not normally used in ARM or ABM operation, but may be used in NRM operation in a multidrop unbalanced configuration. OPTION 2 This option improves error recovery by defining a reject (REJ) supervisory command/response frame that reports sequence number errors. An REJ response triggers sequential retransmission of information frames, beginning with the lost frame.
ADCCP NRM Programmer’s Guide OPTION 8 This option forbids the use of information response frames. This implies that a secondary station cannot send information frames to its primary station. This option is normally used during ABM operation, in which combined stations always send I-frames as command frames. OPTION 9 This option forbids the use of information command frames. This implies that a primary station cannot send information frames to any secondary stations.
2: ADCCP NRM Protocol Summary Table 2–1: ADCCP Frame Types Information Transfer Format Commands/Responses I Information Supervisory Format Commands/Responses RR Receive ready RNR Receive not ready REJ Reject SREJ Selective reject Unnumbered Format Commands SNRM Set normal response mode SARM Set asynchronous response mode SABM Set asynchronous balanced mode SNRME Set normal response mode extended SARME Set asynchronous response mode extended SABME Set asynchronous balanced mode extended
ADCCP NRM Programmer’s Guide Figure 2–4. The major areas of difference occur in the handling of polling, F-bit responses, checkpoint retransmission, and timers. This section describes these differences, and explains the reason for their existence.
2: ADCCP NRM Protocol Summary Because normal response mode (NRM) operation is usually used in a multidrop unbalanced configuration, primary station polling is necessary. For the secondary station to efficiently transmit information back to the primary station, the secondary station usually delays its F-bit response to the primary station’s P-bit poll. This lets the secondary station send several I-frames to the primary station before terminating the transmission with a frame containing an F-bit.
ADCCP NRM Programmer’s Guide F-bit checkpoint recovery occurs when the primary station receives a supervisory frame or I-frame with the F-bit set and finds that the N(R) field in the received frame does not acknowledge the N(S) field in the last I-frame the primary station sent with the P-bit set. Figure 2–4 shows that F-bit checkpoint recovery is shared by all three modes (NRM, ARM, and ABM).
Chapter 3 Note ADCCP NRM DLI Functions In this document, the term “Freeway” can mean either a Freeway server or an embedded ICP. For the embedded ICP, also refer to the user’s guide for your ICP and operating system (for example, the ICP2432 User’s Guide for Windows NT). This chapter describes how to use the data link interface (DLI) functions to write client applications interfacing to the Freeway ADCCP NRM protocol software.
ADCCP NRM Programmer’s Guide • The various mnemonic codes mentioned throughout this document are defined in the include files provided with this product, which are described in Table 3–1. Table 3–1: Include Files for ADCCP NRM Description Include File DLI_PROT_* codes dliprot.h DLI_ICP_ERR_* codes dlicperr.h DLI_ICP_CMD_* codes dliicp.h FW_* codes freeway.h 3.
3: ADCCP NRM DLI Functions The Freeway server is normally configured only once, during the installation procedures described in the Freeway User’s Guide. DLI session and TSI connection configurations are defined by modifying text configuration files and running the dlicfg and tsicfg preprocessor programs. Refer to Chapter 5 of this document, as well as the Freeway Data Link Interface Reference Guide and the Freeway Transport Subsystem Interface Reference Guide.
ADCCP NRM Programmer’s Guide exchange, Normal and Raw operation can be mixed. The client application session should be configured for Normal operation (allowing DLI to handle some of the headers), but the read and write requests can use Raw operation by including the optional arguments structure (Section 3.3) containing the protocol-specific information. 3.1.
3: ADCCP NRM DLI Functions 3.2 Example ADCCP NRM Call Sequences Table 3–2 shows the sequence of DLI function calls to send and receive data using blocking I/O. Table 3–3 is the non-blocking I/O example. The remainder of this chapter and the Freeway Data Link Interface Reference Guide give further information about each function call. Note The example call sequences assume that the cfgLink and enable DLI configuration parameters are both set to “yes” (the defaults).
ADCCP NRM Programmer’s Guide Note When using non-blocking I/O, a dlRead request must always be queued to avoid loss of data or responses from the ICP (see Step 5 of Table 3–3). Table 3–3: DLI Call Sequence for ADCCP NRM (Non-blocking I/O) 1. Call dlInit to initialize the DLI environment. The first parameter is your DLI binary configuration file name. 2. Call dlOpen for each required session (link) to get a session ID. 3. Call dlPoll to confirm the success of each session ID obtained in Step 2. 4.
3: ADCCP NRM DLI Functions 3.3 Overview of DLI Functions for ADCCP NRM This section summarizes the DLI functions used in writing a client application.
ADCCP NRM Programmer’s Guide Table 3–4: DLI Functions: Syntax and Parameters (Listed in Typical Call Order) DLI Function Parameter(s) Parameter Usage int dlInit (char *cfgFile, char *pUsrCb, int (*fUsrIOCH)(char *pUsrCb)); DLI binary configuration file name Optional I/O complete control block Optional IOCH and parameter int dlOpena (char *cSessionName, int (*fUsrIOCH) (char *pUsrCB, int iSessionID)); Session name in DLI config file Optional I/O completion handler Parameters for IOCH int dlPoll (i
3: ADCCP NRM DLI Functions 3.3.1 DLI Optional Arguments The dlWrite and dlRead functions handle the control packets for an ADCCP NRM application. Both functions can use the optional arguments parameter to provide the protocol-specific information required for Raw operation (Section 3.1.2). The “C” definition of the optional arguments structure is shown in Figure 3–1.
ADCCP NRM Programmer’s Guide 3.4 Client/ICP Control Packet Formats The ADCCP NRM protocol software running on an ICP is controlled by a set of control packets sent by the DLI or by the client application using Raw dlWrite and dlRead requests. This section describes all control packets in detail and lists the optional arguments fields required by each packet.
3: ADCCP NRM DLI Functions Table 3–5: Client Packet dlWrite usProtCommand and iProtModifier Fields dlWrite usProtCommand Field DLI_PROT_SEND_STATION_INIT dlWrite iProtModifier Field 0 = remote (SIM/RIM on line) 1 = local (no SIM/RIM) Reference Section Section 3.4.1 on page 55 DLI_PROT_SEND_UNFORMATTED_DATA Section 3.4.3 on page 57 DLI_PROT_SEND_UNFORMATTED_DATA_EOM Section 3.4.5 on page 58 DLI_PROT_SEND_EXCHANGE_ID Section 3.4.
ADCCP NRM Programmer’s Guide Table 3–6: ICP Packet dlRead usProtCommand and iProtModifier Fields dlRead usProtCommand Field dlRead iProtModifier Field Reference Section DLI_PROT_RECV_STATION_INIT 0 = remote (SIM/RIM on line) 1 = local (no SIM/RIM) Section 3.4.2 on page 56 DLI_PROT_RECV_UNFORMATTED_DATA Bit 0–6: Reserved Bit 7: Error indication Section 3.4.4 on page 58 DLI_PROT_RECV_EXCHANGE_ID Section 3.4.
3: ADCCP NRM DLI Functions The usProtXParms[0] field is used to specify the station ID. The station ID field is specified in most control packets. However, under some conditions, the client must specify station number zero.
ADCCP NRM Programmer’s Guide The client uses this packet to change station operation to the initialization state. The iProtModifier field indicates whether the initialization involves only the local station or the remote station as well. When the ICP receives a DLI_PROT_SEND_STATION_INIT packet with zero in the iProtModifier field, the ICP initiates an SIM/UA or RIM/SIM/UA exchange on the link for the specified station. This ensures that the remote station is also placed in initialization mode.
3: ADCCP NRM DLI Functions The ICP sends to the client a DLI_PROT_RECV_STATION_INIT packet with zero in the iProtModifier field following detection of a completed SIM/UA or RIM/SIM/UA exchange on the link. This indicates that both the local and remote stations are in initialization mode. The ICP sends to the client a DLI_PROT_RECV_STATION_INIT packet with one in the iProtModifier field following receipt of a DLI_PROT_SEND_STATION_INIT packet with one in the iProtModifier field.
ADCCP NRM Programmer’s Guide on the ICP, an application in the client attempting to write a control packet to the ICP experiences delayed I/O completion, but no packet is actually lost. 3.4.4 DLI_PROT_RECV_UNFORMATTED_DATA Packet This packet is valid only if the client has enabled ADCCP option 5 (see Section 3.4.20.2) for the specified station and the station is in the initialization state.
3: ADCCP NRM DLI Functions specify the usProtCommand field (DLI_PROT_SEND_EXCHANGE_ID), the usProtXParms[0] field (station ID), the usProtXParms[1] field (data size), and the data field contents. The data size may be zero because the data field is optional. The client sends an Exchange ID packet either to initiate an exchange of station identification on the link or to respond to a DLI_PROT_RECV_EXCHANGE_ID packet (see Section 3.4.7).
ADCCP NRM Programmer’s Guide stations unless the client has enabled ADCCP option 8 for the specified secondary station. The client must specify the usProtCommand field (DLI_PROT_SEND_NORM_DATA), the iProtModifier field, the usProtXParms[0] field (station ID), the usProtXParms[1] field (data size), and the data field contents. For NRM primary and secondary stations, bit 0 in the iProtModifier field indicates whether more data follows.
3: ADCCP NRM DLI Functions the ICP uses selective broadcast addressing. If bit 1 is reset to zero and bit 2 is set to one, the ICP uses general broadcast addressing. If both bits 1 and 2 are set to one, the ICP returns a DLI_PROT_RESP_ERROR packet to the client. When selective or global addressing is used, the client must specify the link ID and zero the station ID, since the data is intended for multiple stations on the link.
ADCCP NRM Programmer’s Guide broadcast addressing is indicated. If bit 1 is reset to zero and bit 2 is set to one, general broadcast addressing is indicated. Bit 0 and bits 3 through 7 in the iProtModifier field are zeroed. 3.4.10 DLI_PROT_SEND_UNNUMBERED_DATA Packet This packet is valid only if the client has enabled ADCCP option 4 (see Section 3.4.20.2) for the specified station.
3: ADCCP NRM DLI Functions NRM secondary station and the station’s transmit window is still open, the ICP transmits the data in a response I-frame with the F-bit reset to zero. For NRM primary stations, bits 1 and 2 in the iProtModifier field indicate the frame addressing mode requested by the client. If both bits 1 and 2 are reset to zero, the ICP uses normal individual station addressing. If bit 1 is set to one and bit 2 is reset to zero, the ICP uses selective broadcast addressing.
ADCCP NRM Programmer’s Guide addressing is indicated. If bit 1 is set to one and bit 2 is reset to zero, selective broadcast addressing is indicated. If bit 1 is reset to zero and bit 2 is set to one, general broadcast addressing is indicated. For all stations, bit 7 in the iProtModifier field is an error indicator. Bit 7 is set to one if the ICP detected an error during reception of the UI frame associated with the DLI_PROT_RECV_UNNUMBERED_DATA packet passed to the client.
3: ADCCP NRM DLI Functions The client specifies the usProtCommand field (DLI_PROT_SEND_SET_MULTIPNT_LIST), the link ID, the usProtXParms[1] field (data size), and the data field contents. The data field contains a list of secondary stations (specified by station ID) on the indicated link that support the multipoint (selective broadcast) addressing concept.
ADCCP NRM Programmer’s Guide • DLI_ICP_ERR_NO_ERR • DLI_ICP_ERR_XMIT_ABORTED • DLI_ICP_ERR_XMIT_TIMEOUT Packet type identifier codes that can appear in the iProtModifier field are: • DLI_PROT_SEND_UNFORMATTED_DATA_EOM • DLI_PROT_SEND_UNNUMBERED_DATA_EOM 3.4.15 DLI_PROT_RESP_NORMAL_ACK Packet The concept of a transmit window (which limits the number of DLI_PROT_SEND_NORM_DATA packets the client may send while awaiting acknowledgment) applies to each individual station.
3: ADCCP NRM DLI Functions 3.4.16 DLI_PROT_SEND_BIND Packet The client uses this packet to enable a physical link or to enable a station. When the ICP is initially downloaded, all physical links are disabled. After the client configures links and stations (see Section 4.1.2 on page 86), the client must enable a physical link prior to enabling stations on the link.
ADCCP NRM Programmer’s Guide The presence of the zeroed station ID tells the client that the control packet relates to the physical link, rather than to an assigned station. When reporting an active station on a link, the ICP specifies the usProtCommand field (DLI_PROT_RESP_BIND_ACK), the iProtModifier field, the link ID, and the usProtXParms[0] field (station ID). The iProtModifier field indicates the station’s operational mode (see Table 3–6).
3: ADCCP NRM DLI Functions ful for temporarily stopping the link without terminating the session (for example, to reconfigure the link using the DLI_PROT_CFG_LINK packet). The link is restarted by issuing a DLI_PROT_SEND_BIND packet. 3.4.19 DLI_PROT_RESP_UNBIND_ACK Packet The ICP uses this packet to report a physical link inactive or a station inactive on the link.
ADCCP NRM Programmer’s Guide 3.4.20.1 First Variant The first variant of the DLI_PROT_CFG_LINK packet allows the client to configure a physical link. The client must specify the usProtCommand field (DLI_PROT_CFG_LINK), iProtModifier field (0,) the link ID, usProtXParms[1] field (data size = 2 or 4), and the data area (see Table 3–7). Bits 0–3 in word 0 of the data area select the nominal baud rate. The client must specify the nominal baud rate even if the clock source is external.
3: ADCCP NRM DLI Functions Table 3–7: DLI_PROT_CFG_LINK Packet Data Area (First Variant) First Variant: Argument = 0 and Station = 0 (Size = 2 or 4) (Configures physical link) Word 0: Link parameters Bits 0–3: (Nominal baud rate in bits/second) 0 = reserved 1 = 1200 2 = 2400 3 = 4800 4 = 9600 5 = 19200 6 = 38400 7 = 56000 8 = 57600 9 = 64000 10 = 73728 11 = 76800 12 = 92160 13 = 115200 14 = 122880 Bits 4 and 5: must be zero Bit 6: clock source: 0 = internal 1 = external Bit 7–15: must be zero Word 1: (op
ADCCP NRM Programmer’s Guide usProtXParms[1] field (data size = 16), and the data area. The iProtModifier field value must be 1, which indicates that an NRM (or NRME) station is being configured. The C structure definition in Figure 3–2 shows how the data area is organized. Note that the data type short refers to a two-byte integer and sizeof (CONFIG_2) is 16.
3: ADCCP NRM DLI Functions rate, round-trip propagation delay time (as in satellite data links), and data frame size must all be considered to determine the optimal transmit window size. The srej_threshold variable identifies the SREJ threshold; this field is meaningful only when both ADCCP options 2 and 3 are enabled.
ADCCP NRM Programmer’s Guide The loc_size variable specifies the length of the local station address. The rem_size variable specifies the length of the remote station address. If an address length of zero is specified, the associated address field is undefined. If ADCCP option 7 is disabled, the maximum address length is 1 (octet). Basic addressing allows a theoretical maximum of 254 unique station addresses on the link (0 is an invalid address, and 255 is reserved as the global address).
3: ADCCP NRM DLI Functions the final address octet must be set to one. This requirement ensures that the basic and extended address field formats are compatible. 3.4.20.3 Third Variant The client must configure basic link and station parameters prior to enabling the link or station. However, the third variant of the DLI_PROT_CFG_LINK packet allows the client to adjust station timer and retry limit parameters whether or not a configured station is active.
ADCCP NRM Programmer’s Guide Word 2 in the data area contains the poll timer parameter value. This parameter is valid only for NRM secondary stations and specifies the maximum number of seconds the ICP waits to receive a constructive polling frame before reporting a station exception (data poll timeout).
3: ADCCP NRM DLI Functions Table 3–9: Timer and Retry Parameter Default Values Parameter Name Default Value Retry Limit 5 retries Retry Timer Length ((10 x Maxdata)/Data Rate) + 3 seconds Poll Timer Length 60 seconds (1 minute) Flags Timer Length 240 seconds (4 minutes) Poll Delay Length 0 milliseconds 3.4.21 DLI_PROT_RECV_STATION_RESET Packet The ICP uses this packet to report when an active station on the link is reset.
ADCCP NRM Programmer’s Guide remain unacknowledged and may have been lost in transit. The client is responsible for initiating recovery procedures at a higher level. 3.4.23 DLI_PROT_RECV_STATION_RESET_CFM Packet The ICP uses this packet to report the completion of a station reset requested by the client. The ICP specifies the usProtCommand field (DLI_PROT_RECV_STATION_RESET_CFM), the iProtModifier field, the link ID, and the usProtXParms[0] field (station ID).
3: ADCCP NRM DLI Functions A iProtModifier field value of one means that the indicated active NRM secondary station has received no polls from the primary station within the poll timer period configured by the client (see Table 3–8). This exception applies only to active NRM secondary stations (in the data transfer state). A iProtModifier field value of two means that normal polling operations have resumed for the indicated active NRM secondary station following a previous data poll timeout.
ADCCP NRM Programmer’s Guide Table 3–10: ICP Statistics Packet Data Area Content Word Definition Word 0: Invalid address fields received Word 1: Invalid control fields received Word 2: Receive FCS errors Word 3: Receive I-frames too long Word 4: Receive overrun errors Word 5: Transmit underrun errors Word 6: Transmit watchdog errors Word 7: Station reset errors This packet contains the following counters: • Invalid address and control fields received • FCS errors • I-frames exceedin
3: ADCCP NRM DLI Functions application. The ICP modifies the offending control packet to specify the usProtCommand field (DLI_PROT_RESP_ERROR) and uses the iProtModifier field to report the rejected command. It then sends the packet back to the client as a DLI_PROT_RESP_ERROR packet. 3.4.29 DLI_PROT_GET_BUF_REPORT Packet The client sends the DLI_PROT_GET_BUF_REPORT packet to request that the ICP respond with a DLI_PROT_RESP_BUF_REPORT packet.
ADCCP NRM Programmer’s Guide Table 3–11: Typical Arguments for the DLI_PROT_SET_BUF_SIZE Packet Argument Value Maximum ADCCP I-field Size 2 128 bytes (minimum) 4 256 bytes 8 512 bytes (default) 16 1024 bytes (typical) 32 2048 bytes 64 4096 bytes 127 8128 bytes (maximum) If your application must set the ICP message buffer size itself, you must set the cfgLink and enable DLI configuration parameters to “no” (Section 5.2 on page 104). 3.4.
3: ADCCP NRM DLI Functions in the usProtXParms[1] field, and ASCII text identifying the ICP software version in the data area.
ADCCP NRM Programmer’s Guide 84 DC 900-1317J
Chapter 4 ADCCP NRM Operations This chapter describes some of the ADCCP NRM operations using the control packets described in Chapter 3. Section 4.1 describes normal operational procedures. Section 4.2 and Section 4.3 describe special conditions and performance considerations. 4.1 Normal Operation of the Client/ICP Control Interface The following discussion emphasizes the normal sequence of events and resulting control packet exchanges between the client and the ICP.
ADCCP NRM Programmer’s Guide To change the default maximum buffer size, the client sends a DLI_PROT_SET_BUF_SIZE packet (see Section 3.4.31 on page 81) to the ICP. The control packet argument must specify the number of 64-byte pages allowed for the transparent data area within subsequent control packets. The actual buffer allocation on the ICP includes an additional 64 bytes to accommodate the buffer control header and other ICP buffer management requirements.
4: ADCCP NRM Operations Before attempting to reconfigure a link that has already been configured, the client must ensure that the link is disabled. When the client configures the link, all previously assigned stations are automatically disassociated from the link and are available for reassignment to that link or to any other inactive link. 4.1.2.2 Station Configuration The client assigns stations to a physical link (see Section 3.4.20.
ADCCP NRM Programmer’s Guide local station address field length and content. The existence of the primary station is implied; the client does not configure the primary station itself. The client configures a local secondary station by specifying the local station address field length and content, and zeroing the remote station address field length and content. The existence of a remote primary station is implied.
4: ADCCP NRM Operations The initialization state is supported only on stations configured to use ADCCP option 5. A transition from the logically disconnected state to the initialization state occurs in one of two ways: as a result of the exchange of an SIM command and a UA response on the link or when the client requests local station initialization. This change of state applies only to the specified station.
ADCCP NRM Programmer’s Guide level protocol transactions. The client transmits and receives frames as Unformatted Data packets and is responsible for conforming to the initialization mode requirements specified for its application and configuration. The ICP handles FCS generation and checking only and does not interpret the contents of any frame exchanged on the link. Theoretically, a primary station may download a data base or program to a secondary station while both are in the initialization state.
4: ADCCP NRM Operations 4.1.5 Information Transfer State Operation Once a station is in the information transfer state, data transfer is allowed. Selection of ADCCP option 8 or 9 for NRM operation changes data flow between primary and secondary stations so that it is in one direction only. In this state, the client transmits data by sending DLI_PROT_SEND_NORM_DATA packets to the ICP; the client receives data in the form of DLI_PROT_RECV_DATA packets.
ADCCP NRM Programmer’s Guide Unformatted data cannot be exchanged in the information transfer state. If the client attempts to send an Unformatted Data packet to the ICP while in this state, the ICP responds with a DLI_PROT_RESP_ERROR packet. Unformatted data can only be exchanged while a station is in the initialization state (see Section 4.1.4), which is supported only if ADCCP option 5 is selected.
4: ADCCP NRM Operations 4.2 User Application Design Criteria This section describes criteria to be considered when designing an application. It is important that you take the time necessary to familiarize yourself with these issues to ensure that your application functions as intended. Failure to properly consider all of the information presented in this section may result in decreased performance or may prevent your proposed design from working at all. 4.2.
ADCCP NRM Programmer’s Guide 4.2.2 More Data Indicator In normal response mode (NRM) operation, the primary station must intersperse polling operations among data transmissions and must wait for each station to respond before proceeding to poll the next secondary station on its list. The secondary station cannot respond until polled.
4: ADCCP NRM Operations On the other hand, if a primary station only periodically polls its secondary stations and withholds I-frame acknowledgment until after the secondary station sends its final frame, a maximum transmit window size of 7 may not be sufficient to utilize the link. If the application uses a satellite relay in a geosynchronous orbit, a 0.25-second propagation delay occurs each way, and acknowledgment of data reception is delayed at least 0.5 second.
ADCCP NRM Programmer’s Guide 4.3.2 ICP Station Reset Condition If the client application receives an DLI_PROT_RECV_STATION_RESET packet, the client application must send a DLI_PROT_SEND_STATION_RESET_CFM packet to the ICP. The client assumes that any unacknowledged data remains unacknowledged, and initiates higher level data recovery procedures. 4.3.3 ICP Exception Conditions Most of the exception conditions reported by the ICP are for information only.
4: ADCCP NRM Operations This practice ensures that the sequence number variables for all secondary stations receiving a broadcast remain aligned during the broadcast. When the client application sends more than one DLI_PROT_SEND_NORM_DATA packet with selective or global broadcast addressing indicated, it should also set the more data indicator in the iProtModifier field for each data packet (except the last). This prevents the ICP from reverting to normal polling procedures prematurely.
ADCCP NRM Programmer’s Guide 98 DC 900-1317J
Chapter 5 Note ADCCP NRM Link Configuration Using dlicfg In this document, the term “Freeway” can mean either a Freeway server or an embedded ICP. For the embedded ICP, also refer to the user’s guide for your ICP and operating system (for example, the ICP2432 User’s Guide for Windows NT). 5.1 Configuration Overview Section 3.1.1 on page 44 summarized your choices for performing ICP link configuration.
ADCCP NRM Programmer’s Guide The DLI and TSI configuration process is a part of the loopback testing procedure described in Appendix C and the installation procedure described in the Freeway User’s Guide. During your client application development and testing, you might need to perform DLI and TSI configuration repeatedly. The DLI and TSI procedures are summarized as follows: 1.
5: ADCCP NRM Link Configuration Using dlicfg UNIX example: freeway/client/op-sys/bin/tsicfg nrmaltcfg NT example: freeway\client\op-sys\bin\tsicfg nrmaltcfg 5. From the freeway/client/test/nrm directory, execute dlicfg with the text file from Step 2 as input. This creates the DLI binary configuration file in the same directory as the location of the text file (unless a different path is supplied with the optional filename).
ADCCP NRM Programmer’s Guide ration files you created in Step 4 and Step 5 into the bin directory for your particular TCP/IP package. @MOVE filename where filename is the name of the binary configuration file and is the TCP/IP package: MULTINET (for a Multinet system) TCPWARE (for TCPware system) UCX (for a UCX system) VMS example: @MOVE NRMALDCFG.BIN UCX 8.
5: ADCCP NRM Link Configuration Using dlicfg Application dlicfg DLI DLI Text Configuration File DLI Configuration Preprocessor DLI Binary Configuration File TSI 2836 tsicfg TSI Text Configuration File TSI Configuration Preprocessor TSI Binary Configuration File Transport Environment Figure 5–1: DLI and TSI Configuration Process DC 900-1317J 103
ADCCP NRM Programmer’s Guide 5.2 DLI Session Configuration The DLI text configuration file used by the dlicfg program consists of the following sections: • A “main” section which specifies the DLI configuration for non-session-specific operations (described in the Freeway Data Link Interface Reference Guide) • One or more additional sections, each specifying a protocol-specific session associated with a particular Freeway serial communication link (port).
5: ADCCP NRM Link Configuration Using dlicfg main { asyncIO = “no”; tsiCfgName = “nrmaltcfg.
ADCCP NRM Programmer’s Guide Table 5–1: ADCCP NRM ICP Link Configuration Parameters for Using dlicfg dlicfg Option Name circuitID Default 0 Valid Range 1–65535 a msgBufSize 512 dataRate 2400 1200, 2400, 4800, 9600, 19200, 38400, 56000, 57600, 64000, 73728, 76800, 92160, 115200 or 122880 bits/sec clockSource “external” “external” or “internal” encoding “nrzi” “nrz”, “nrzi” or “anrzi” elecinterface “eia232” “eia232”, “eia530”, “v35”, or “unbeia449” enableXIDRD “no” BOOLEAN enableREJ “no
5: ADCCP NRM Link Configuration Using dlicfg Table 5–1: ADCCP NRM ICP Link Configuration Parameters for Using dlicfg dlicfg Option Name Default Valid Range localAddress 0 0–07777 (the number of octal digits is given by localAddrSize) remoteAddress 0 0–07777 (the number of octal digits is given by remoteAddrSize) retryLimit 0 0–65535 retryTimer 0 0–65535 pollTimer 0 0–65535 flagTimer 0 0–65535 pollDelay 0 0–65535 The parameters and values shown in Table 5–1 are described in the follo
ADCCP NRM Programmer’s Guide 108 DC 900-1317J
Chapter 6 ADCCP NRM Line-Monitor Function This chapter describes the Line-Monitor function of the ADCCP NRM protocol. When selected, this function sends to the client, via a dedicated Monitor Session (distinct from any Link Session), a record of each incoming and outgoing SDLC frame as it is received or transmitted on those links that have been configured by the client for this purpose.
ADCCP NRM Programmer’s Guide 6.2 Configuring the Line-Monitor Function When the Monitor Session for an ICP becomes attached, monitoring is configured for none of the links. Any subset of them may be configured for monitoring with a Configure Monitor command to the Monitor Session (usProtCommand field set to DLI_PROT_START_LINK_TRACE). The set of links to be monitored is specified in the iProt- Modifier field, as a bit-mask. For example, links 0 and 2 are specified by setting bits 0 and 2 (i.e.
6: ADCCP NRM Line-Monitor Function The normal ICP response to the Configure Monitor command is the same command (usProtCommand field set to DLI_PROT_START_LINK_TRACE). However, if the command was sent to a Link Session, a DLI_PROT_RESP_ERROR response (Section 3.4.28 on page 80) is returned to the client. Apart from Attach and Detach, only the Configure Monitor command is valid for the Monitor Session.
ADCCP NRM Programmer’s Guide usTime: This field of the Monitor Data Notification header contains the time of the event, in terms of milliseconds elapsed since a base time. If the ICP is located in a Freeway server, or if it is embedded in a PCI-based host whose ICP driver supports Host Timing. then the base time is start-of-day. Otherwise the base time is the time of ICP startup. The reported time pertains to the completion of the transmission or reception of the frame.
6: ADCCP NRM Line-Monitor Function usFiller[2]: This field of the Monitor Data Notification header rounds out the first 12 bytes. It contains 0s. Abstract: This field of the Monitor Data Notification header contains a 12-byte abstract of the associated frame contents. The frame abstract is rendered as a “C”-language structure in Figure 6–2. Its fields are described next.
ADCCP NRM Programmer’s Guide usFrameID: This field of the Frame Abstract contains a code for the frame ID in the frame’s Control field. A code of 0 indicates that the Control field did not yield an recognized frame type; in this case, the usILen, usNS, usNR, and usPF are set to 0.
6: ADCCP NRM Line-Monitor Function 6.5 Line-Monitor Client Program (nrmmon) Protogate’s provides an ADCCP NRM Line-Monitor client program (nrmmon) for diagnostic purposes and as an example of the coding needed for accessing and controlling a Monitor Session and for displaying reported frames. The source file nrmmon.c and a makefile for building the executable nrmmon on the client system are included in the ADCCP NRM protocol software delivery.
ADCCP NRM Programmer’s Guide 116 DC 900-1317J
Appendix A Clock Signals The ADCCP NRM communication interface is designed to use either externally or internally generated clock signals. Clocking is selected through the clock source option (Section 3.4.20.1 on page 70). The ADCCP NRM software always uses receive clocking provided by the receive data source. Under external clocking, ADCCP NRM receives its transmit clocks from the remote device. Under internal clocking, the transmit clock is internally generated and also output to the remote device.
ADCCP NRM Programmer’s Guide 118 DC 900-1317J
Appendix B Error Codes There are several methods used by the DLI and ADCCP NRM software to report errors (Table B–1 lists the ADCCP NRM errors): 1. The error code can be returned directly by the DLI function call. Typical errors are those described in the Freeway Data Link Interface Reference Guide. 2. The ADCCP NRM errors shown in Table B–1 can be returned in the dlRead pOptArgs.iICPStatus field of the response. The DLI sets the dlRead pOptArgs.
ADCCP NRM Programmer’s Guide Table B–1: ADCCP NRM Error Codes Code Mnemonic Meaning DLI_ICP_ERR_NO_ERR A data block has been successfully transmitted or received on the line or a command has been successfully executed. –101 DLI_ICP_ERR_BAD_NODE DLI internal error. A bad node number was passed by the DLI. –102 DLI_ICP_ERR_BAD_LINK An illegal link number was passed to DLI. –103 DLI_ICP_ERR_NO_CLIENT ADCCP NRM has the maximum number of clients registered for that link.
Appendix C Note ADCCP NRM Loopback Test Programs In this document, the term “Freeway” can mean either a Freeway server or an embedded ICP. For the embedded ICP, also refer to the user’s guide for your ICP and operating system (for example, the ICP2432 User’s Guide for Windows NT). C.1 Loopback Test Programs (nrmalp and nrmtest) The ADCCP NRM loopback test programs and test directories are listed in Table C–1, according to operating system (UNIX, VMS, or Windows NT).
ADCCP NRM Programmer’s Guide Table C–1: Loopback Test Programs and Directories Operating System Loopback Programs UNIX nrmalp.c nrmtest.c VMS NRMALP.C Windows NT nrmalp.c nrmtest.c Test Directory usr/local/freeway/client/test/nrm SYS$SYSDEVICE:[FREEWAY.CLIENT.TEST.NRM] c:\freeway\client\test\nrm To run the test program, perform the following steps: 1. Make sure the server TSI configuration parameter is correctly defined in the TSI text configuration file for each TSI connection definition.
C: ADCCP NRM Loopback Test Programs (for an OSF1 system) osf1 UNIX example: make -f makefile.bsd all make -f makefile.test.bsd nrmtest For VMS: @MAKEVMS "" where is the TCP/IP package: MULTINET (for a Multinet system) TCPWARE (for TCPware system) (for a UCX system) UCX VMS example: @MAKEVMS "" UCX For NT: nmake -f makefile.nt all nmake -f makefile.test.nt nrmtest.
ADCCP NRM Programmer’s Guide UNIX example: freeway/client//bin VMS example: [FREEWAY.CLIENT._tcp-sys.BIN] where is VAX or AXP for example, [FREEWAY.CLIENT.VAX_UCX.BIN] NT example: • freeway\client\\bin Compiles and links the test programs and copies them to the same bin directory. 5. Boot the Freeway server and load the ADCCP NRM protocol software onto the ICP (refer to the Freeway User’s Guide). 6.
C: ADCCP NRM Loopback Test Programs • Before you run dlicfg and tsicfg, run the makefc.com command file to create the foreign commands used for dlicfg and tsicfg. @MAKEFC where is your TCP/IP package: MULTINET(for a Multinet system) TCPWARE (for TCPware system) UCX (for a UCX system) VMS example: @MAKEFC UCX • After you run dlicfg and tsicfg, run the move.com command file, to move the DLI and TSI binary configuration files to the bin directory for your TCP/IP package.
ADCCP NRM Programmer’s Guide makefile. It uses the same TSI configuration file as nrmalp, but it uses a unique DLI configuration file: nrmmondcfg. This program operates in DLI Raw mode. It uses nonblocking I/O, meaning that the asyncIO DLI configuration parameter (described in the Freeway Data Link Interface Reference Guide) must be set to “yes” (the default is “no” for blocking I/O).
Appendix D ADCCP NRM Detailed Command and Response Headers This appendix is intended as an aid to programmers writing an application program under one of the following conditions: 1. If you are writing to Protogate’s data link interface (DLI) using Raw operation, also refer to the Freeway Data Link Interface Reference Guide. If you are using the embedded DLITE interface, also refer to the user’s guide for your particular ICP and operating system; for example, the ICP2432 User’s Guide for Windows NT. 2.
ADCCP NRM Programmer’s Guide D.1 Application Sequence of Events 1. Establish a connection to a link • • Attach to the ICP • • • Configure the link Set buffer size (must be second command to board else error will be received) Start the link Start the station 2. Send optional commands • • • • • Set multipoint list Send station init command Send exchange id command Send station reset command Receive station reset command 3. Send and Receive data, get reports, etc.
D: ADCCP NRM Detailed Command and Response Headers D.2 Command sequences 1.
ADCCP NRM Programmer’s Guide Receive a resp_normal-ack-packet Receive a resp_local-ack-packet (DLI_PROT_RESP_NORMAL_ACK) (DLI_PROT_RESP_LOCAL_ACK) 9. Sequence of packet exchanges for getting reports Send a get-stats-packet Receive a get-stats-ack-packet Send a get-buf-rpt-packet Receive a get-buf-rpt-ack-packet (DLI_PROT_GET_STATISTICS_REPORT) (DLI_PROT_RECV_STATISTICS_REPORT) (DLI_PROT_GET_BUF_REPORT) (DLI_PROT_RESP_BUF_REPORT) 10.
D: ADCCP NRM Detailed Command and Response Headers D.3 attach-packet Packet Description This packet is used to attach an application to the protocol and retrieve the protocol’s session ID.
ADCCP NRM Programmer’s Guide D.4 set-buffer-size-packet Packet Description This packet is used to set an ICP Message buffer size. The iProtModifier field consists of the maximum data size (as the number of 64 byte pages). The valid range is - 8192.
D: ADCCP NRM Detailed Command and Response Headers D.5 set-buffer-size-ack-packet Packet Description This packet is used to receive an ack for the set-buf-size-packet (above). The usProtXParms[1] field contains the number of bytes contained in the data field (2-bytes always). The data field contains the number of buffers created.
ADCCP NRM Programmer’s Guide D.6 link-config-packet Packet Description This packet is used to configure a link.
D: ADCCP NRM Detailed Command and Response Headers usProtLinkID usProtCircuitID usProtSessionID usProtSequence usProtXparms[0] usProtXparms[1] Note = = = = = = port number 0 protocol session number from "attach-packet" 0 0 2 or 4 The Freeway header is used only with DLI (it is not applicable for DLITE), and the usLength field of the ICP header is used only without DLI. Data Data formatted as listed above in “Packet Description.
ADCCP NRM Programmer’s Guide D.7 station-config-packet Packet Description This packet is used to configure a station on a link.
D: ADCCP NRM Detailed Command and Response Headers Note The Freeway header is used only with DLI (it is not applicable for DLITE), and the usLength field of the ICP header is used only without DLI. Data Data formatted as listed above in “Packet Description.
ADCCP NRM Programmer’s Guide D.8 limit-config-packet Packet Description This packet is used to adjust station timer and retry limit whether or not a configured station is active.
D: ADCCP NRM Detailed Command and Response Headers D.9 start-link-packet Packet Description This packet is used to start or enable a link.
ADCCP NRM Programmer’s Guide D.10 start-link-ack-packet Packet Description This packet is used to receive a start link ack packet.
D: ADCCP NRM Detailed Command and Response Headers D.11 start-station-packet Packet Description This packet is used to start or enable a station on a link.
ADCCP NRM Programmer’s Guide D.12 start-station-ack-packet Packet Description This packet is used to receive a start station ack packet.
D: ADCCP NRM Detailed Command and Response Headers D.13 set-multipoint-list-packet (optional) Packet Description Valid only if option 7 (station-config-packet) is enabled on a station in nrm mode and each local or remote secondary station addresses are a single octet. This packet is used to set up the list of control units that the software polls. This packet is valid both in the disconnected state and in the information transfer state.
ADCCP NRM Programmer’s Guide Note Send a size of 0 if multi-point addressing for all stations on a physical link is to be suppressed.
D: ADCCP NRM Detailed Command and Response Headers D.14 station-init-packet (optional) Packet Description This packet is valid only if option 5 (station-config-packet) has been enabled. This packet is used to change station operation to the initialization state. Depending on the value in the iProtModifier field the local and remote station’s operation states can be changed or just the local station’s operation state can be changed. While in this state unformatted data may be sent or received.
ADCCP NRM Programmer’s Guide Packet Exchanges usProtCommand sent -----------------DLI_PROT_SEND_STATION_INIT 146 usProtCommand received ---------------------DLI_PROT_RECV_STATION_INIT (see "station-init-ack-packet" below) DC 900-1317J
D: ADCCP NRM Detailed Command and Response Headers D.15 station-init-ack-packet (optional) Packet Description This packet is used to acknowledge the completion of the link-level exchange when the iProtModifier field is 0 or the receipt of the station init packet if the iProtModifier field is 1.
ADCCP NRM Programmer’s Guide D.16 send-exchange-id-packet (optional) Packet Description This packet is only valid if option 1 (station-config-packet) is enabled for the specified station and the station is not in initialization state. This packet is sent to initiate an exchange of station identification or in response to a recv-exchange-id-packet. A primary station initiates the exchange and the secondary station replies.
D: ADCCP NRM Detailed Command and Response Headers D.17 recv-exchange-id-packet (optional) Packet Description This packet is valid only if option 1 (station_config_packet) for the specified station and the station is not in initialization state. This packet may be received as a response to a send-exchange-id-packet or as an unsolicited ICP packet. If it is in response the fills in the remote station’s identification.
ADCCP NRM Programmer’s Guide D.18 station-reset-packet Packet Description This packet is used to reset an active NRM remote secondary (primary) station. When received by the ICP, the ICP discards all transmit buffers for the affected station. The client is responsible for the recovery of the procedures at a higher level.
D: ADCCP NRM Detailed Command and Response Headers D.19 station-reset-ack-packet Packet Description The ICP uses this packet to report the completion of a station reset command sent by the client. After receipt of this packet the client should initiate higher level data transfer recovery procedures.
ADCCP NRM Programmer’s Guide D.20 recv-station-reset-packet Packet Description The ICP uses this packet to report when an active station on the link is reset. When an ICP reports a station reset it discards all transmit buffers for the affected station.
D: ADCCP NRM Detailed Command and Response Headers D.21 recv-station-reset-ack-packet Packet Description The client uses this packet to reply to a received recv-station-reset-packet. After sending this packet to the ICP the client should initiate higher level data transfer recovery procedures.
ADCCP NRM Programmer’s Guide D.22 write-unform-data-packet (or write-unform-data-eom-packet) Packet Description This packet is valid only if option 5 (station-config-packet) is enabled on the specified station and the station is in the initialization state. Used to send unformatted data to a remote application.
D: ADCCP NRM Detailed Command and Response Headers Packet Exchanges usProtCommand sent -----------------DLI_PROT_SEND_UNFORMATTED_DATA usProtCommand received ---------------------none or DLI_PROT_SEND_UNFORMATTED_DATA_EOM DC 900-1317J DLI_PROT_RESP_LOCAL_ACK ("receive-local-ack-packet") 155
ADCCP NRM Programmer’s Guide D.23 receive-unform-data-packet Packet Description This packet is valid only if option 5 (station-config-packet) is enabled for the specified station and the station is in initialization state. The client has total responsibility for handling all initialization protocol requirements.
D: ADCCP NRM Detailed Command and Response Headers D.24 write-unnum-data-packet (or write-unnum-eom-data-packet) Packet Description This packet is valid only if the client has enabled option 4 (station-config-packet) for the specified station. For NRM stations bit 0 in the iProtModifier field indicates whether more data packets follow.
ADCCP NRM Programmer’s Guide Data Data to be sent to remote application.
D: ADCCP NRM Detailed Command and Response Headers D.25 receive-unnum-data-packet Packet Description This packet is valid only if option 4 (station-config-packet) for the specified station is enabled. For NRM secondary stations bits 1 and 2 in the iProtModifier field indicate the frame addressing mode used. For all stations bit 7 in the iProtModifier field is an error indicator.
ADCCP NRM Programmer’s Guide D.26 write-data-packet Packet Description This packet is valid only if the client has not enabled option 9 (station-config-packet) for the specified primary station. For NRM stations bit 0 in the iProtModifier field indicates whether more data packets follow.
D: ADCCP NRM Detailed Command and Response Headers Data Data to be sent to remote application.
ADCCP NRM Programmer’s Guide D.27 receive-data-packet Packet Description This packet is valid for primary stations if option 8 (station-config-packet) is disabled for the specified primary station. It is valid for secondary stations if option 9 (stationconfig-packet) is disabled. This packet receives data from a remote application.
D: ADCCP NRM Detailed Command and Response Headers D.28 resp-normal-ack-packet Packet Description This packet is used to acknowledge one or more (limited by the window size) DLI_PROT_SEND_NORM_DATA packets for a particular station. The client is then cleared to send the specified number (limited to the window size minus the number of packets acked by this packet) of additional packets for the indicated station.
ADCCP NRM Programmer’s Guide D.29 resp-local-ack-packet Packet Description This packet is used by the ICP to acknowledge a DLI_PROT_SEND_UNFORMATTED_DATA_EOM or DLI_PROT_SEND_UNNUMBERED_DATA_EOM packet.
D: ADCCP NRM Detailed Command and Response Headers D.30 buffer-rpt-packet Packet Description This packet is used to request a buffer report from the ICP. It uses “expedited” write command codes.
ADCCP NRM Programmer’s Guide D.31 buffer-rpt-ack-packet Packet Description This packet is received in response to a "buffer-rpt-packet".
D: ADCCP NRM Detailed Command and Response Headers typedef int INT32; typedef struct sdlc_port_buffers { INT32 RcvbufPrealloc; INT32 RcvbufReceivePending; INT32 RcvbufReportPending; INT32 XmtbufCommandPending; INT32 XmtbufBroadcastPending; INT32 XmtbufUnicastPending; } SDLC_PORT_BUFFERS; typedef struct sdlc_station_buffers { INT32 RcvbufReceivePending; INT32 RcvbufReportPending; INT32 XmtbufCommandPending; INT32 XmtbufUnicastPending; } SDLC_STATION_BUFFERS; typedef struct sdlc_buffer_report { /* ICP buffer
ADCCP NRM Programmer’s Guide D.32 stats-rpt-packet Packet Description This packet is used to request a link’s statistics report. This command also clears the statistics for that link.
D: ADCCP NRM Detailed Command and Response Headers D.33 stats-rpt-ack-packet Packet Description This packet is received in response to a "stats-rpt-packet". Once received the ICP clears the local statistics variables for that link.
ADCCP NRM Programmer’s Guide D.34 version-rpt-packet Packet Description This packet is used to request the ICP software versions.
D: ADCCP NRM Detailed Command and Response Headers D.35 version-rpt-ack-packet Packet Description This packet is received in response to a "version-rpt-packet".
ADCCP NRM Programmer’s Guide D.36 recv-link-except-packet Packet Description The ICP uses this packet to report operational exceptions on the link or station.
D: ADCCP NRM Detailed Command and Response Headers D.37 resp-error-packet Packet Description The ICP uses this packet to report receipt of invalid or inappropriate client control packets.
ADCCP NRM Programmer’s Guide D.38 stop-station-packet Packet Description This packet is used to stop a station on a link.
D: ADCCP NRM Detailed Command and Response Headers D.39 stop-station-ack-packet Packet Description This packet is used to acknowledge stop-station-packet.
ADCCP NRM Programmer’s Guide D.40 stop-link-packet Packet Description This packet is used to stop or disable a link and all active sessions on the link.
D: ADCCP NRM Detailed Command and Response Headers D.41 stop-link-ack-packet Packet Description This packet is used to acknowledge a stop link packet link.
ADCCP NRM Programmer’s Guide D.42 detach-packet Packet Description This packet is used to detach an application from the protocol.
Index A ABM 38 ADCCP NRM error codes 119 hardware description 29 overview 27 protocol summary 31 software description 29 Addressing frame 34 Internet 26 ARM 38 Asynchronous balanced mode see ABM Asynchronous response mode see ARM Audience 13 B Binary configuration files 26, 100 Bit numbering 17 Blocking I/O 46 call sequence 47 Buffer size maximum 85 Byte ordering 17 C Caution data loss 48, 49 Client operations 26 Client-server environment 25 establishing Internet address 26 Clock signals 117 Commands forei
ADCCP NRM Programmer’s Guide symmetric 33 unbalanced 31 third variant 75 Configure link command 99, 104 Control packets 52 client DLI_PROT_CFG_LINK 69, 86, 87, 88 DLI_PROT_GET_SOFTWARE_VER 82 DLI_PROT_GET_STATISTICS_REPORT 79 DLI_PROT_SEND_BIND 67, 88, 90 DLI_PROT_SEND_EXCHANGE_ID 58, 89, 91 DLI_PROT_SEND_NORM_DATA 59, 66, 77, 91, 93, 97 DLI_PROT_SEND_SET_MULTIPNT_LIST 64 DLI_PROT_SEND_STATION_INIT 55, 89, 92 DLI_PROT_SEND_STATION_RESET 77 DLI_PROT_SEND_STATION_RESET_CFM 78, 96 DLI_PROT_SEND_UNBIND 68, 90,
Index dlRead function see Control packets dlRead (see also Functions) 50 dlTerm (see also Functions) 50 dlWrite function see Control packets dlWrite (see also Functions) 50 Documents reference 15 Download software 26 E Embedded ICP environment 26 overview 23 Enable link 88 Error codes dlerrno global variable 50 list of codes 119 optArgs.
ADCCP NRM Programmer’s Guide Maximum data buffer size 85 see also Control packets More data indication 60, 62, 94, 97 move.
Index Transport subsystem interface (TSI) 26 TSI configuration see Configuration, TSI tsicfg preprocessor program 100 U UNIX configuration process 100 loopback test 122 V Virtual links 35 VMS configuration process 100 loopback test 122 TCP/IP package 123 W WAN interface processor 22 Windows NT configuration process 100 loopback test 122 DC 900-1317J 183
ADCCP NRM Programmer’s Guide 184 DC 900-1317J
ADCCP NRM Programmer’s Guide DC 900-1317J Customer Report Form We are constantly improving our products. If you have suggestions or problems you would like to report regarding the hardware, software or documentation, please complete this form and mail it to Protogate at 12225 World Trade Drive, Suite R, San Diego, CA 92128, or fax it to (877) 473-0190. If you are reporting errors in the documentation, please enter the section and page number.
Protogate, Inc.