Prosody data communications: API: smdc_line_control_v34

Prototype Definition

int smdc_line_control_v34(struct smdc_line_control_v34_parms *controlp)

Parameters

*controlp
a structure of the following type:
typedef struct smdc_line_control_v34_parms {
	tSMChannelId channel;					/* in */
	enum kSMDCV34LineCtlCmd {
		kSMDCV34LineCtlCmdRetrain,
		kSMDCV34LineCtlCmdRenegotiateUp,
		kSMDCV34LineCtlCmdRenegotiateDown,
		kSMDCV34LineCtlCmdEnablePrimary,
		kSMDCV34LineCtlCmdEnableControl,
		kSMDCV34LineCtlCmdBitrateTx,
		kSMDCV34LineCtlCmdBitrateRx,
	} cmd;							/* in */
	union {
		struct {
			tSM_INT min_bitrate;			/* in */
			tSM_INT max_bitrate;			/* in */
		} bitrate;					/* in */
	} u;							/* in */
} SMDC_LINE_CONTROL_V34_PARMS;

Description

Perform a command on a channel which has been configured for V.34 data communications.

Fields

channel
The channel which has been configured for data communications.
cmd
The control operation to perform. One of these values:
kSMDCV34LineCtlCmdRetrain
Initiate a full retrain procedure on the line, negotiating the best new data rate for the primary channel.
kSMDCV34LineCtlCmdRenegotiateUp
Performs a short renegotiation procedure to increase the data rate on the primary channel. This is typically done when the snr_status parameter of smdc_line_status_v34() is greater than zero.
kSMDCV34LineCtlCmdRenegotiateDown
Performs a short renegotiation procedure to decrease the data rate on the primary channel. This is typically done when the snr_status parameter of smdc_line_status_v34() is less than zero.
kSMDCV34LineCtlCmdEnablePrimary
Switches the modem to transmit on the primary channel. Both originating and answering modem must send this command at the appropriate time, as negotiated by a higher-level protocol. This message is only available on the half-duplex V.34 modem; the full-duplex modem always runs on the primary channel.
kSMDCV34LineCtlCmdEnableControl
Switches the modem to transmit on the control channel. Both originating and answering modem must send this command at the appropriate time, as negotiated by a higher-level protocol. This message is only available on the half-duplex V.34 modem; the full-duplex modem always runs on the primary channel. The half-duplex modem is using the control channel when it first returns control to the user after negotiation.
kSMDCV34LineCtlCmdBitrateTx
Change the bitrate limits on the transmitter.
kSMDCV34LineCtlCmdBitrateRx
Change the bitrate limits on the receiver.
u
bitrate
This field is only valid if the cmd is kSMDCV34LineCtlCmdBitrateTx or kSMDCV34LineCtlCmdBitrateRx.
min_bitrate
The minimum bitrate to negotiate for the primary channel, in bits/second.
max_bitrate
The maximum bitrate to negotiate for the primary channel, 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.