Prosody data communications: API: smdc_rx_config_v34

Prototype Definition

int smdc_rx_config_v34(struct smdc_rx_config_v34_parms *configp)

Parameters

*configp
a structure of the following type:
typedef struct smdc_rx_config_v34_parms {
	tSMChannelId channel;					/* in */
	enum kSMDCV34Duplex {
		kSMDCV34HalfDuplex,
		kSMDCV34FullDuplex,
	} duplex;						/* in */
	tSM_INT min_bitrate;					/* in */
	tSM_INT max_bitrate;					/* in */
	tSM_INT v8fsk_metric;					/* in */
} SMDC_RX_CONFIG_V34_PARMS;

Description

Configures a channel's input for data communications using the V.34 protocol. The V.34 modem operates in a duplex manner (even when duplex is kSMDCV34HalfDuplex), so channel must be a full-duplex channel and its output half must also be configured using smdc_tx_config_v34().

The channel input is reserved for this data communications configuration until smdc_line_status_v34() returns the status kSMDCLinkStatusNotConnected. No other activity can take place on the channel during this time.

While the input half of a channel is configured for data communications, a read event associated with this channel using sm_channel_set_event() will be set while the channel is ready to allow data to be read or there may be a status change to report. See smdc_rx_control() for details of how this works. When an application discovers that this event is set, it should attempt to read data using smdc_rx_data(). See its description to see how this interacts with status changes.

Requires the module v34fdx to have been downloaded if configuring for full duplex operation.

Requires the module v34 to have been downloaded if configuring for half duplex operation.

Fields

channel
The channel to configure.
duplex
Selects full-duplex or half-duplex operation. The transmitter and receiver must both be configured with the same value for this parameter. One of these values:
kSMDCV34HalfDuplex
Configures the channel for half-duplex. Only one channel may transmit at the full modem speed at a time, or both may transmit on a much slower control channel.
kSMDCV34FullDuplex
Configures the channel for full-duplex. Both channels may transmit at the full modem speed simultaneously.
min_bitrate
The minimum bitrate to negotiate for the primary channel when it is receiving data, in bits/second.
max_bitrate
The maximum bitrate to negotiate for the primary channel when it is receiving data, in bits/second.
v8fsk_metric
A measure of expected peer signal power derived from prior V.8 FSK demodulation. Should be configured to a value obtained from FSK receiver, or zero if such information not available.

Returns

0 if call completed successfully, otherwise a standard error such as:


This function is part of the Prosody data communications API.