Table of Contents Index NMS Glossary Previous Page Next Page (Page 46 of 69 in this chapter) Version


adiStartSendingFSK

Description

Sends Frequency Shift Key (FSK) data.

Prototype

DWORD adiStartSendingFSK ( CTAHD ctahd,
void *buffer,
unsigned bufsize,
ADI_FSKSEND_PARMS *parms)

ctahd CTA context handle returned by ctaCreateContext.

buffer Buffer to send.

bufsize Size of buffer to send.

parms Pointer to FSK send parameters, as follows (NULL designates default values):

typedef struct
{
DWORD size; /* Size of this structure */

DWORD noseizureflag; /* No channel seizure when set */

INT32 level; /* Transmit output scaling (dBm) */

DWORD seizetime; /* Length of channel seizure in (ms) */

DWORD marktime; /* Length of the initial mark signal in (ms) */

DWORD baudrate; /* Baud rate (only 1200 supported) */

} ADI_FSKSEND_PARMS;

Return Values

Events

DSP File

For most AG hardware, this function requires that adsix.dsp has been loaded. On AG 2000 boards and AG 4000/C boards, adsix.m54 must be loaded to the board before adiStartSendingFSK will work. On CG 6000C boards, adsix.f54 must be loaded to the board before adiStartSendingFSK will work. Refer to the board-specific installation and developer's manual for a table of MIPS usage for all functions.

For QX hardware, this function is supported in the standard DSP file. Refer to the QX Installation and Developer's Manual for a table of MIPS usage for all functions.

Details

This function initiates sending Frequency Shift Key (FSK) data. When parms is set to NULL, the default parameter values are used. A typical buffer size is 512 bytes. The buffer size is limited to half the value of the maxbufsize field in the ADI_CONTEXT_INFO structure. The only baud rate supported is 1200.

The function may be stopped by calling adiStopSendingFSK. An ADIEVN_FSK_SEND_DONE event is delivered when the send operation is complete.

See Also

adiStopSendingFSK

Example


#define MYSEND_STOPPED (-13)

int mySendFSK( CTAHD ctahd, void *buffer, unsigned bufsize )
{
 CTA_EVENT event;

    if( adiStartSendingFSK( ctahd, buffer, bufsize, NULL ) != SUCCESS )
        return MYFAILURE;

    do 
    {
        myGetEvent( &event );           /* see ctaWaitEvent example */
    } while( event.id !=- ADIEVN_FSK_SEND_DONE );

    switch( event.value )
    {
        case CTA_REASON_FINISHED:
            return SUCCESS;

        case CTA_REASON_RELEASED:
            return MYDISCONNECT;

        case CTA_REASON_STOPPED:
            /* Send was stopped by another application thread */
            return MYSEND_STOPPED;

        default:
            if( CTA_IS_ERROR( event.value ) )
                return MYFAILURE;
    }
    return MYFAILURE;
}


Table of Contents Index NMS Glossary Previous Page Next Page (Page 46 of 69 in this chapter) Version


Want to send us feedback on our documentation? Email: Tech_Pubs@nmss.com
Copyright © 2000, Natural MicroSystems, Inc. All rights reserved.