(Page 57 of 80 in this chapter)
adiStartSendingFSK
Description
- Sends Frequency Shift Key (FSK) data.
Prototype
- DWORD adiStartSendingFSK( CTAHD ctahd,
void *buffer,
unsigned bufsize,
ADI_FSKSEND_PARMS *parms)
- ctahd Context handle returned by adiOpenPort.
- 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 Requirement
- This function requires that adsix.dsp has been loaded by agmon.
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 )
{
ADI_EVENT event;
if( adiStartSendingFSK( ctahd, buffer, bufsize, NULL ) != SUCCESS )
return MYFAILURE;
do
{
myGetEvent( &event ); /* see adiFetchAndProcess 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( IS_ADI_ERROR( event.value ) )
return MYFAILURE;
}
return MYFAILURE;
}
(Page 57 of 80 in this chapter)
Tech_Support@nmss.com
Copyright © 1996, Natural MicroSystems, Inc. All rights
reserved.