beautypg.com

Comtrol API (6508) for the MS-DOS User Manual

Page 3

background image

3

Before You Begin
Scope ...........................................................................................2
Purpose........................................................................................2
Audience......................................................................................2
Prerequisites...............................................................................2
Suggestions .................................................................................2
Organization ...............................................................................2
Software or Document Changes ................................................2
Table of Contents
Examples.....................................................................................3
Flowchart ....................................................................................4
Tables ..........................................................................................4
Section 1. Installing RocketPort Systems
1.1.

Product Introduction.........................................................5

1.2.

Software and Hardware Installation Procedures............5

1.3.

Installing the Software .....................................................5

1.4.

Installing the Controller ...................................................7

1.5.

Running the Sample Application .....................................8

Section 2. Developing Applications
2.1.

API

Features ......................................................................9

2.2.

API

Functions ....................................................................9

2.3.

Writing the Configuration File.......................................10

2.4.

Flowchart for Using the

API

...........................................11

2.5.

Application Example .......................................................11

2.6.

Include Files (Step 3) ......................................................12

2.7.

Configuring RocketPort Controllers (Step 4).................12

2.8.

Using

API

Calls (Step 5)..................................................12

2.8.1. Understanding Device Numbers.........................13
2.8.2. Configuration Parameters for Serial Devices ....13

2.8.2.1. Open Type Parameter ...........................13
2.8.2.2. Baud Parameter ....................................14
2.8.2.3. Parity Parameter ...................................14
2.8.2.4. Data Bits Parameter .............................14
2.8.2.5. Stop Bits Parameter ..............................14
2.8.2.6. Flow Control Parameter........................14
2.8.2.7. Detection Enable Parameter.................15
2.8.2.8. Modem Control Parameter ...................15

2.9.

Writing Serial Data.........................................................15

2.10. Exiting the Application ...................................................15
2.11. Reading Serial Data ........................................................15
2.12. Installing and Detecting Events.....................................15
2.13. Double Buffering Transmit and Receive Data .............17

2.14. Building Applications (Step 6) ....................................... 17
Section 3. Troubleshooting and Technical Support
3.1.

Resolving Installation Problems .................................... 18

3.2.

Placing a Support Call.................................................... 19

3.3.

Retrieving Future Software Updates ............................ 20

Appendix A.

API

Functions

aaChangeModemState .................................... 22
aaClose ............................................................. 22
aaEnPeriodicEvent.......................................... 23
aaExit ............................................................... 23
aaFlush ............................................................ 24
aaGetCtlStatus ................................................ 24
aaGetModemStatus......................................... 25
aaGetRxCount ................................................. 25
aaGetRxStatus ................................................ 26
aaGetTxCount ................................................. 26
aaInit................................................................ 27
aaInstallCtrlCHandler.................................... 27
aaInstallMdmChgEvent.................................. 28
aaInstallPeriodicEvent ................................... 28
aaInstallRxEvent ............................................ 29
aaOpen ............................................................. 29
aaRead ............................................................. 30
aaReadWithStatus .......................................... 31
aaReconfigure .................................................. 31
aaSendBreak ................................................... 32
aaSetCloseDelay.............................................. 33
aaWrite ........................................................... 33
EvModemChange ............................................ 34
EvPeriodic ........................................................ 35
EvRxData......................................................... 35

Appendix B. Double Buffering Example

Examples

Example 2-1. Sample Event Function .................................... 16

Table of Contents