Prosody generic: API: sm_tdmtx_create

Prototype Definition

int sm_tdmtx_create(struct sm_tdmtx_create_parms *tdmtxp)

Parameters

*tdmtxp
a structure of the following type:
typedef struct sm_tdmtx_create_parms {
	tSMTDMtxId tdmtx;					/* out */
	tSMModuleId module;					/* in */
	tSM_INT stream;						/* in */
	tSM_INT timeslot;					/* in */
	enum kSMTimeslotType type;				/* in */
} SM_TDMTX_CREATE_PARMS;

Description

Allocates, on a specific module, a new TDM[tx] to send TDM data. The TDM[tx] will send it's data to 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. The tdmtx will begin sending data when it has been succesfully connected to a valid datafeed using sm_tdmtx_datafeed_connect().

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

Fields

tdmtx
The newly created TDM[tx].
module
A value obtained from sm_open_module() which indicates the module where the TDM[tx] is to be allocated.
stream
The TDM stream to which the TDM[tx] will be attached
timeslot
The TDM timeslot to which the TDM[tx] 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.