Prosody generic: API: sm_tdmrx_create

Prototype Definition

int sm_tdmrx_create(struct sm_tdmrx_create_parms *tdmrxp)

Parameters

*tdmrxp
a structure of the following type:
typedef struct sm_tdmrx_create_parms {
	tSMTDMrxId tdmrx;					/* out */
	tSMModuleId module;					/* in */
	tSM_INT stream;						/* in */
	tSM_INT timeslot;					/* in */
	enum kSMTimeslotType type;				/* in */
} SM_TDMRX_CREATE_PARMS;

Description

Allocates, on a specific module, a new TDM[rx] to receive incoming TDM data. The TDM[rx] will receive it's data from the specified stream and timeslot. The streams which can be used with this call depend on the type of Prosody carrier card being used. They are special internal streams which are only accessible to Prosody and the switch driver. All data received by the tdmrx can be read from its datafeed. The datafeed may be obtained using sm_tdmrx_get_datafeed().

If the call completes successfully, the parameter tdmrx will be set to the identifier for that tdmrx.

On Prosody X this function requires the module datafeed to have been downloaded.

Fields

tdmrx
The newly created TDM[rx].
module
A value obtained from sm_open_module() which indicates the module where the TDM[rx] is to be allocated.
stream
The TDM stream to which the TDM[rx] will be attached
timeslot
The TDM timeslot to which the TDM[rx] will be attached
type
The data encoding used on this timeslot. One of these values:
kSMTimeslotTypeALaw
Signals encoded with A-law companding.
kSMTimeslotTypeMuLaw
Signals encoded with mu-law companding.
kSMTimeslotTypeData
Digital data - no companding used.

Returns

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


This function is part of the Prosody generic API.