Prosody data communications: API: smdc_rx_status_t38

Prototype Definition

int smdc_rx_status_t38(struct smdc_rx_status_t38_parms *statusp)

Parameters

*statusp
a structure of the following type:
typedef struct smdc_rx_status_t38_parms {
	tSMChannelId channel;					/* in */
	tSM_INT available_octets;				/* out */
	enum kSMDCRxT38Status {
		kSMDCRxT38StatusEmpty,
		kSMDCRxT38StatusTone,
		kSMDCRxT38StatusV34,
		kSMDCRxT38StatusData,
		kSMDCRxT38StatusOverrun,
		kSMDCRxT38StatusCarrier,
		kSMDCRxT38StatusFinished,
		kSMDCRxT38StatusProtocol,
		kSMDCRxT38StatusRate,
	} status;						/* out */
	tSM_INT flow;						/* out */
	union {
		struct {
			enum kSMDCT38ToneType tone_type;	/* out */
		} tone;						/* out */
		struct {
			enum kSMDCT38_V34Type {
				kSMDCT38_V34Type_V34_CC_1200,
				kSMDCT38_V34Type_V34_PRI_CHAN,
				kSMDCT38_V34Type_V34_CC_RETRAIN,
			} v34_type;				/* out */
		} v34;						/* out */
		struct {
			tSM_INT carrier;			/* out */
		} carrier;					/* out */
		struct {
			tSM_INT rate;				/* out */
		} rate;						/* out */
		struct {
			tSM_INT protocol;			/* out */
		} protocol;					/* out */
	} u;							/* out */
} SMDC_RX_STATUS_T38_PARMS;

Description

Reports the status of a channel whose input half has been configured for T.38 data communications.

Fields

channel
The T.38 data communication channel.
available_octets
The amount of data currently buffered in this channel. Only valid if the status field reports kSMDCRxT38StatusData.
status
The receiver status. One of these values:
kSMDCRxT38StatusEmpty
No data is available for reading.
kSMDCRxT38StatusTone
A T.38 tone indicator was received on this channel
kSMDCRxT38StatusV34
A T.38 v34 indicator was received on this channel
kSMDCRxT38StatusData
Some data is available for reading.
kSMDCRxT38StatusOverrun
Data has been lost because the buffer has overflowed.
kSMDCRxT38StatusCarrier
The input half is not receiving a meaningful signal.
kSMDCRxT38StatusFinished
The receiver has finished with data communications. When this status is reported, the channel's input half reverts to the idle state that it was in before smdc_rx_config_t38() was used. Therefore it can be re-configured or used for another purpose and a subsequent call to smdc_rx_status_t38() will report the error ERR_SM_WRONG_CHANNEL_STATE.
kSMDCRxT38StatusProtocol
The protocol of the data received has changed. This status is only possible when the channel has been configured to receive all protocols.
kSMDCRxT38StatusRate
v34 primary bit-rate in bits/s.
flow
Indicator of whether the receiver has stopped incoming data by using flow control (non-zero) or not (zero).
u
tone
This field is only valid if the status is kSMDCRxT38StatusTone
tone_type
The type of tone that was reported on this channel. One of these values:
kSMDCT38ToneTypeCNG
A CNG tone
kSMDCT38ToneTypeCED
A CED tone
kSMDCT38ToneTypeANSAM
An ANSAM tone
v34
This field is only valid if the status is kSMDCRxT38StatusV34
v34_type
The type of v34 action that was requested on this channel. This may be a switch from primary to control channel, or switch from control to primary channel or control channel retrain due to a synchronisation problem or a need for a new primary channel bitrate. One of these values:
kSMDCT38_V34Type_V34_CC_1200
A Control Channel
kSMDCT38_V34Type_V34_PRI_CHAN
A Primary Channel
kSMDCT38_V34Type_V34_CC_RETRAIN
A Control Channel Retrain
carrier
This field is only valid if the status is kSMDCRxT38StatusCarrier
carrier
The current carrier status: 0=off, 1=on.
rate
This field is only valid if the status is kSMDCRxT38StatusRate
rate
The primary bitrate value, anything from 2400 bps to 33600 bps.
protocol
This field is only valid if the status is kSMDCRxT38StatusProtocol
protocol
The protocol, from Table 4/T.38, of the data being received

Returns

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


This function is part of the Prosody data communications API.