Prosody data communications: API: smdc_tx_config_v34

Prototype Definition

int smdc_tx_config_v34(struct smdc_tx_config_v34_parms *configp)

Parameters

*configp
a structure of the following type:
typedef struct smdc_tx_config_v34_parms {
	tSMChannelId channel;					/* in */
	enum kSMDCV34Mode {
		kSMDCV34ModeOriginating,
		kSMDCV34ModeAnswering,
	} mode;							/* in */
	enum kSMDCV34Polling {
		kSMDCV34ModeNormal,
		kSMDCV34ModePolling,
	} polling;						/* in */
	enum kSMDCV34Duplex duplex;				/* in */
	tSM_INT min_bitrate;					/* in */
	tSM_INT max_bitrate;					/* in */
} SMDC_TX_CONFIG_V34_PARMS;

Description

Configures a channel's output 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 input half must also be configured using smdc_rx_config_v34().

The channel output 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 output half of a channel is configured for data communications, a write event associated with this channel using sm_channel_set_event() will be set while the channel is ready to accept more data or there may be a status change to report. See smdc_tx_control() for details of how this works. When an application discovers that this event is set, it may check the status using smdc_tx_status(). However, an application may simply try smdc_tx_data() immediately and check status when it refuses to accept data.

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.
mode
The negotiation procedure for V.34 modems requires that one modem be nominated as the originator and the other is the answerer. In half-duplex mode the originating modem is the one which can transmit on the primary channel. One of these values:
kSMDCV34ModeOriginating
This modem is the originating modem.
kSMDCV34ModeAnswering
This modem is the answering modem.
polling
V.34 half-duplex mode can only transmit data on the primary channel in one direction. There is no turnaround procedure, so to reverse the data flow the modem must be destroyed and a new modem created. One of these values:
kSMDCV34ModeNormal
Primary channel data is transferred from the originating modem to the answering modem.
kSMDCV34ModePolling
Primary channel data is transferred from the answering modem to the originating modem.
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 transmitting data, in bits/second.
max_bitrate
The maximum bitrate to negotiate for the primary channel when it is transmitting data, in bits/second.

Returns

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


This function is part of the Prosody data communications API.