Simpact, Inc.9210 Sky Park CourtSan Diego, CA 92123 DDCMPProgrammer’s Guide DC 900-1343D April 1999
10 DC 900-1343D DDCMP Programmer’s Guide
DC 900-1343D 11 Preface Purpose of Document This document describes the operation and programming interface required to useSimpact’s Digital Data Com
12 DC 900-1343D DDCMP Programmer’s Guide Required Equipment The DDCMP product requires the following major hardware components to operate: • a Freewa
Preface DC 900-1343D 13 Simpact References The following documents provide useful supporting information, depending on thecustomer’s particular hardw
14 DC 900-1343D DDCMP Programmer’s Guide Embedded ICP Installation and Programming Support • ICP2432 User’s Guide for Digital UNIX DC 900-1513 • ICP2
PrefaceDC 900-1343D 15Document ConventionsThis document follows the most significant byte first (MSB) and most significant wordfirst (MSW) conventions for
16 DC 900-1343DDDCMP Programmer’s GuideCustomer SupportIf you are having trouble with any Simpact product, call us at 1-800-275-3889 Mondaythrough Fri
DC 900-1343D 17Chapter1Introduction1.1 Product OverviewSimpact provides a variety of wide-area network (WAN) connectivity solutions forreal-time financ
18 DC 900-1343DDDCMP Programmer’s GuideTo maintain high data throughput, Freeway uses a multi-processor architecture to sup-port the LAN and WAN servi
1: IntroductionDC 900-1343D 191.1.2 Embedded ICPThe embedded ICP connects your client computer directly to the WAN (for example,using Simpact’s ICP243
Simpact, Inc.9210 Sky Park CourtSan Diego, CA 92123(619) 565-1865DDCMP Programmer’s Guide© 1996 through 1999 Simpact, Inc. All rights reservedPrinted
20 DC 900-1343DDDCMP Programmer’s GuideSummary of product features:• Provision of WAN connectivity either through a LAN-based Freeway server ordirectl
1: IntroductionDC 900-1343D 211.2 Freeway Client-Server EnvironmentThe Freeway server acts as a gateway that connects a client on a local-area network
22 DC 900-1343DDDCMP Programmer’s Guide1.3 Embedded ICP EnvironmentRefer to the user’s guide for your embedded ICP and operating system (for example,
1: IntroductionDC 900-1343D 231.4.2 Opening a SessionAfter the DLI and TSI configurations are properly defined, your client application usesthe dlOpen f
24 DC 900-1343DDDCMP Programmer’s Guide• DLI library for linking with client applications• Test program (ddcmpalp.c) to check product installationFor
DC 900-1343D 25Chapter2DDCMP DLI FunctionsNoteIn this document, the term “Freeway” can mean either a Freewayserver or an embedded ICP. For the embedde
26 DC 900-1343DDDCMP Programmer’s Guide• The Freeway Data Link Interface Reference Guide shows a generic code examplewhich can guide your application
2: DDCMP DLI FunctionsDC 900-1343D 27• transport subsystem interface (TSI) connection configuration• protocol-specific ICP link configuration The Freeway
28 DC 900-1343DDDCMP Programmer’s GuideIn the Freeway environment, the term blocking I/O indicates that the dlOpen, dlClose,dlRead and dlWrite functio
2: DDCMP DLI FunctionsDC 900-1343D 292.2.1 Initializing the DLIThe client application calls dlInit to initialize its interface to Freeway. This call s
DC 900-1343D 3 Contents List of Figures 7List of Tables 9Preface 111 Introduction 17 1.1 Product Overview... 171.1.1 Freew
30 DC 900-1343DDDCMP Programmer’s Guidemain // DLI “main” section: //{asyncIO = “yes”; // Use non-blocking I/O //tsiCfgName = “ddcmpaltcfg.bin”; // T
2: DDCMP DLI FunctionsDC 900-1343D 31For an embedded ICP using the DLITE interface, Figure 2–2 shows the “main” sectionand two DDCMP sessions. You nee
32 DC 900-1343DDDCMP Programmer’s Guide2.2.3 Opening and Attaching DLI SessionsAfter DLI initialization, the client calls dlOpen to open each DLI sess
2: DDCMP DLI FunctionsDC 900-1343D 332.3 Example DDCMP Call SequencesTable 2–2 shows the sequence of DLI function calls to send and receive data using
34 DC 900-1343DDDCMP Programmer’s GuideCautionWhen using non-blocking I/O, a dlRead request must always bequeued to avoid loss of data or responses fr
2: DDCMP DLI FunctionsDC 900-1343D 352.4 Overview of DLI Functions for DDCMPAfter the DDCMP software is downloaded to the Freeway ICP, the client and
36 DC 900-1343DDDCMP Programmer’s Guidea It is critical for the client application to receive the dlOpen completion status before making anyother DLI
2: DDCMP DLI FunctionsDC 900-1343D 372.4.1 DLI Optional ArgumentsSection 2.5 and Section 2.6 describe the dlWrite and dlRead functions for a DDCMPappl
38 DC 900-1343DDDCMP Programmer’s GuideTable 2–5: Required dlWrite Optional Arguments FieldsdlWrite Optional Arguments Field Value UsageusFWPacketType
2: DDCMP DLI FunctionsDC 900-1343D 39Table 2–6: Relevant dlRead Optional Arguments FieldsdlRead Optional Arguments Field Value UsageusFWPacketType FW_
4 DC 900-1343D DDCMP Programmer’s Guide 2.1.4 Buffer Management ... 282.2 Using the DLI in the Freeway DDCMP Environment ...
40 DC 900-1343DDDCMP Programmer’s Guide2.5 Overview of DDCMP Requests using Raw dlWriteFor DDCMP the dlWrite function supports three dlWrite categorie
2: DDCMP DLI FunctionsDC 900-1343D 412.5.1 Commands using Raw dlWriteSection 2.5.1.2 through Section 2.5.1.4 explain how to issue specific commands to
42 DC 900-1343DDDCMP Programmer’s GuideTable 3–1 on page 56 lists the available link configuration options and values for theDDCMP protocol. The link s
2: DDCMP DLI FunctionsDC 900-1343D 432.5.1.4 Stop Link CommandUse the dlWrite function with the pOptArgs.usProtCommand field set toDLI_PROT_SEND_UNBIND
44 DC 900-1343DDDCMP Programmer’s Guide2.5.2 Information Requests using Raw dlWriteSection 2.5.2.1 through Section 2.5.2.3 explain how to issue protoc
2: DDCMP DLI FunctionsDC 900-1343D 452.5.2.2 Request Link Statistics ReportUse the dlWrite function with the pOptArgs.usProtCommand field set toDLI_PRO
46 DC 900-1343DDDCMP Programmer’s Guide2.5.2.3 Request Link Status ReportUse the dlWrite function with the pOptArgs.usProtCommand field set toDLI_PROT_
2: DDCMP DLI FunctionsDC 900-1343D 472.5.3 Data Transfer using Raw dlWrite For the DDCMP software to properly handle data transfer, the localAck DLI c
48 DC 900-1343DDDCMP Programmer’s Guide2.6 Overview of DDCMP Responses using Raw dlReadTable 2–11 shows the valid DDCMP codes sent to your application
2: DDCMP DLI FunctionsDC 900-1343D 492.6.1 Received DataThe DDCMP software provides the DLI_PROT_RECV_DATA dlRead response code fordata reception. The
Contents DC 900-1343D 5 2.6.2.8 DDCMP Maintenance Message Received [140] ... 532.6.2.9 Control Message Received in Maintenance Mode [200] ... 5
50 DC 900-1343DDDCMP Programmer’s GuidepOptArgs.iProtModifier field set to 7. The Final Acknowledge of Data Transmitted tellsthe client writing DDCMP
2: DDCMP DLI FunctionsDC 900-1343D 51defines the type of circuit exception received as shown in Table 2–13. Section 2.6.2.2through Section 2.6.2.10 gi
52 DC 900-1343DDDCMP Programmer’s Guide2.6.2.2 Receiving Computer not Responding [131]This exception is generated each seventh time that a reply (REP)
2: DDCMP DLI FunctionsDC 900-1343D 532.6.2.8 DDCMP Maintenance Message Received [140]This exception is caused by the reception of a DDCMP maintenance
54 DC 900-1343DDDCMP Programmer’s Guide
DC 900-1343D 55Chapter3DDCMP Link Configuration OptionsThis chapter describes the various link configuration options that can be set using thedlWrite Co
56 DC 900-1343DDDCMP Programmer’s GuideTable 3–1: DDCMP Link Configuration Options and Settings OptionValue (hex)Default (✓) SettingData Rate (bits/sec
3: DDCMP Link Configuration OptionsDC 900-1343D 573.2 Clock Source OptionThe clock source option determines the source of the data clock signals for a
58 DC 900-1343DDDCMP Programmer’s Guide3.4 Line Mode OptionThis option selects the mode of serial communications, either synchronous or asynchro-nous.
DC 900-1343D 59AppendixAError CodesThere are several methods used by the DLI and DDCMP software to report errors(Table A–1 lists the DDCMP errors). Th
6 DC 900-1343D DDCMP Programmer’s Guide C.15 stats-rpt-ack-packet ... 85C.16 status-rpt-packet ...
60 DC 900-1343DDDCMP Programmer’s GuideTable A–1: DDCMP Error Codes Code DLI Constant Name Meaning0 DLI_ICP_ERR_NO_ERR A data block has been successfu
DC 900-1343D 61AppendixBDLI and TSI Configuration ProcessNoteIn this document, the term “Freeway” can mean either a Freewayserver or an embedded ICP. F
62 DC 900-1343DDDCMP Programmer’s GuideThe DLI and TSI configuration files provided with the product are listed in Table B–1. The DLI and TSI configurati
B: DLI and TSI Configuration ProcessDC 900-1343D 63uration file in the same directory as the location of the text file (unless a differentpath is supplie
64 DC 900-1343DDDCMP Programmer’s Guide6. If you have a UNIX system, move the binary configuration files that you createdin Step 4 and Step 5 into the a
B: DLI and TSI Configuration ProcessDC 900-1343D 65Figure B–1: DLI and TSI Configuration ProcessApplicationDLITSI(Freeway Server Only)TransportEnvironme
66 DC 900-1343DDDCMP Programmer’s Guide
DC 900-1343D 67AppendixCPacket Exchange Quick ReferenceThis appendix is intended for programmers writing an application program under oneof the follow
68 DC 900-1343DDDCMP Programmer’s GuideC.2 Command Sequences1. Sequence of packet exchanges for establishing a connection and starting a link Se
C: Packet Exchange Quick ReferenceDC 900-1343D 69C.3 attach-packet Packet DescriptionThis packet is used to attach an application to the protocol and
DC 900-1343D 7 List of Figures Figure 1–1: Freeway Configuration... 18Figure 1–2: Embedded ICP Configuration...
70 DC 900-1343DDDCMP Programmer’s GuideC.4 link-config-packet Packet DescriptionThis packet is used to configure a link. The data field consists of a dat
C: Packet Exchange Quick ReferenceDC 900-1343D 71NoteThe Freeway header is used only with DLI (it is not applicable forDLITE), and the usLength field o
72 DC 900-1343DDDCMP Programmer’s GuideC.5 start-link-packet Packet DescriptionThis packet is used to start or enable a link. Packet Header
C: Packet Exchange Quick ReferenceDC 900-1343D 73C.6 write-data-packet Packet DescriptionThis packet is used to send data to a remote application. Pac
74 DC 900-1343DDDCMP Programmer’s GuideC.7 receive-data-packet Packet DescriptionThis packet is received for data from a remote application, for ackno
C: Packet Exchange Quick ReferenceDC 900-1343D 75Packet Exchanges usProtCommand sent usProtCommand received --------------
76 DC 900-1343DDDCMP Programmer’s GuideC.8 stop-link-packet Packet DescriptionThis packet is used to stop or disable a link. Packet Header
C: Packet Exchange Quick ReferenceDC 900-1343D 77C.9 detach-packet Packet DescriptionThis packet is used to detach an application from the protocol. P
78 DC 900-1343DDDCMP Programmer’s GuideC.10 clr-stats-packet Packet DescriptionThis packet is used to clear a links statistics. Packet Header
C: Packet Exchange Quick ReferenceDC 900-1343D 79C.11 clr-stats-ack-packet Packet DescriptionThis packet is received in response to a “clr-stats-packe
8 DC 900-1343D DDCMP Programmer’s Guide
80 DC 900-1343DDDCMP Programmer’s GuidePacket Exchanges usProtCommand sent usProtCommand received ------------------
C: Packet Exchange Quick ReferenceDC 900-1343D 81C.12 buf-report-packet Packet DescriptionThis packet is used to request a buffer report. Packet Heade
82 DC 900-1343DDDCMP Programmer’s GuideC.13 buf-report-ack-packet Packet DescriptionThis packet is received in response to a “buf-report-packet”. Pac
C: Packet Exchange Quick ReferenceDC 900-1343D 83Packet Exchanges usProtCommand sent usProtCommand received --------------
84 DC 900-1343DDDCMP Programmer’s GuideC.14 stats-rpt-packet Packet DescriptionThis packet is used to request a links statistics report. Packet Header
C: Packet Exchange Quick ReferenceDC 900-1343D 85C.15 stats-rpt-ack-packet Packet DescriptionThis packet is received in response to a “stats-rpt-packe
86 DC 900-1343DDDCMP Programmer’s GuidePacket Exchanges usProtCommand sent usProtCommand received ------------------
C: Packet Exchange Quick ReferenceDC 900-1343D 87C.16 status-rpt-packet Packet DescriptionThis packet is used to request a link’s status report. Packe
88 DC 900-1343DDDCMP Programmer’s GuideC.17 status-rpt-ack-packet Packet DescriptionThis packet is received in response to a “status-rpt-ack-packet”.
C: Packet Exchange Quick ReferenceDC 900-1343D 89Packet Exchanges usProtCommand sent usProtCommand received --------------
DC 900-1343D 9 List of Tables Table 2–1: Include Files ... 26Table 2–2: DLI Call Sequence for DDCMP (Blocking I/O) ...
90 DC 900-1343DDDCMP Programmer’s Guide
DC 900-1343D 91IndexAAcknowledgmentsattach 39data transmitfinal acknowledgment 47, 49detach 39start link 39, 42, 50final acknowledgment 42stop link 39,
92 DC 900-1343DDDCMP Programmer’s Guidesee Data codessee Error codessee Information codessee Response codesCommand codes 40DLI_PROT_CFG_LINK 41DLI_PRO
IndexDC 900-1343D 93configuration 26see also Configuration, DLIconfiguration process 61initialization 29normal vs raw operation 27session configuration 29
94 DC 900-1343DDDCMP Programmer’s GuideFeaturesproduct 20Filesbinary configuration 27, 29, 33, 34, 62configuration file names 62dlicperr.h include file 59
IndexDC 900-1343D 95OOpening DLI sessions 32Operating systemSimpact’s real-time 18, 19Operationnormal vs raw 27Optional arguments 32dlRead relevant 39
96 DC 900-1343DDDCMP Programmer’s Guidecomponents 23download 21, 55Start linkacknowledgment 39, 42command 38, 42final acknowledge 50final acknowledgment
DDCMP Programmer’s GuideDC 900-1343DCustomer Report FormWe are constantly improving our products. If you have suggestions or problems you wouldlike to
Simpact, Inc.Customer Service9210 Sky Park CourtSan Diego, CA 92123
Kommentare zu diesen Handbüchern