User`s guide

2: DDCMP DLI Functions
DC 900-1343D 41
2.5.1 Commands using Raw dlWrite
Section 2.5.1.2 through Section 2.5.1.4 explain how to issue specific commands to the
DDCMP software using the
dlWrite function. Call dlRead to receive the command con-
firmation response (the
dlRead pOptArgs.usProtCommand field is set by the DLI).
2.5.1.1 Configure Link Command
Caution
In order for the client application to perform link configuration,
both the
cfgLink and enable DLI configuration parameters must
be set to “no for each link (see Figure 2–1 on page 30).
Use the
dlWrite function with the pOptArgs.usProtCommand field set to
DLI_PROT_CFG_LINK to set the link configuration options. The buffer pointed to by the
pBuf parameter contains 16 empty bytes followed by the CONFIG_TYPE data structure
shown in Figure 2–4. The
dlWrite iBufLen parameter equals the size of the CONFIG_TYPE
data structure (in bytes) + 16.
/* 16 empty bytes are required immediately preceding CONFIG_TYPE. */
/* These are reserved for DDCMP use. */
struct CONFIG_TYPE
{
bit16 baud_rate; /* Baud rate */
bit16 clock_source; /* Clock source */
bit16 reply_tmr_sec; /* Timer (seconds) */
bit16 line_mode; /* Synchronous/Asynchronous mode */
bit16 duplex; /* Not used (DDCMP is full duplex) */
bit16 half_duplex; /* Not used */
bit16 version; /* Baud rate */
bit16 eia; /* Electrical interface (Freeway 1000) */
bit16 maint_state; /* Maintenance mode state */
};
Figure 2–4: Configure Link Command CONFIG_TYPE Data Structure