Prosody I.460 Mux: API

The following functions are provided by the Prosody I.460 Mux API:

API call W Description
sm_i460mux_create()   Create an I.460 Mux
sm_i460mux_datafeed_connect()   Connect a datafeed to an input of an I.460 MUX.
sm_i460mux_datafeed_disconnect()   Disconnect a datafeed to an I.460 MUX.
sm_i460mux_destroy()   Destroy an I.460 Mux
sm_i460mux_get_datafeed()   Get datafeed from I.460 MUX.
sm_i460mux_get_event()   Get an event for the I.460 mux
sm_i460mux_status()   Fetch status info on I.460 mux

This document is also available as separate pages for each function.


Prosody I.460 Mux: API: sm_i460mux_create

Prototype Definition

int sm_i460mux_create(struct sm_i460mux_create_parms *createp)

Parameters

*createp
a structure of the following type:
typedef struct sm_i460mux_create_parms {
	tSMI460muxId i460mux;					/* out */
	tSMModuleId module;					/* in */
} SM_I460MUX_CREATE_PARMS;

Description

Creates an I.460 Mux.

Fields

i460mux
The created mux.
module
A value obtained from sm_open_module() which indicates the module on which the mux is to be created.

Returns

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


Prosody I.460 Mux: API: sm_i460mux_datafeed_connect

Prototype Definition

int sm_i460mux_datafeed_connect(struct sm_i460mux_datafeed_connect_parms *datafeedp)

Parameters

*datafeedp
a structure of the following type:
typedef struct sm_i460mux_datafeed_connect_parms {
	tSMDatafeedId data_source;				/* in */
	tSMI460muxId i460mux;					/* in */
	tSMI460InputId input_id;				/* out */
} SM_I460MUX_DATAFEED_CONNECT_PARMS;

Description

Connect a datafeed to one of the inputs of the I.460 mux. Up to eight datafeeds may be connected to a single I.460 mux. The datafeed is assumed to be carrying a datastream that has already been uprated by being masked into the correct bit(s) of each octet. This can be achieved by using the datatx firmware module, configured with an appropriate i460_mask. It is up to the user to ensure that the masks used by different datafeeds connected to the same I.460 mux do not overlap.

Fields

data_source
The datafeed object to be connected.
i460mux
The mux to connect the datafeed to.
input_id
The mux input to which the datafeed has been connected.

Returns

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


Prosody I.460 Mux: API: sm_i460mux_datafeed_disconnect

Prototype Definition

int sm_i460mux_datafeed_disconnect(struct sm_i460mux_datafeed_disconnect_parms *datafeedp)

Parameters

*datafeedp
a structure of the following type:
typedef struct sm_i460mux_datafeed_disconnect_parms {
	tSMI460muxId i460mux;					/* in */
	tSMI460InputId input_id;				/* in */
} SM_I460MUX_DATAFEED_DISCONNECT_PARMS;

Description

Disconnect a datafeed on one of the inputs of the I.460 mux.

Fields

i460mux
The mux to disconnect the datafeed from.
input_id
The input of the mux to be disconnected.

Returns

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


Prosody I.460 Mux: API: sm_i460mux_destroy

Prototype Definition

int sm_i460mux_destroy(tSMI460muxId mux)

Parameters

mux
The mux to destroy. Must have been previously created by a call to sm_i460mux_create() .

Description

Destroys an I.460 Mux.

Returns

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


Prosody I.460 Mux: API: sm_i460mux_get_datafeed

Prototype Definition

int sm_i460mux_get_datafeed(struct sm_i460mux_datafeed_parms *datafeedp)

Parameters

*datafeedp
a structure of the following type:
typedef struct sm_i460mux_datafeed_parms {
	tSMI460muxId i460mux;					/* in */
	tSMDatafeedId datafeed;					/* out */
} SM_I460MUX_DATAFEED_PARMS;

Description

Request a datafeed identifier from an I.460 mux. This identifier can subsequently used in a call to sm_tdmtx_datafeed_connect() or sm_channel_datafeed_connect().

Fields

i460mux
The mux from which to obtain a datafeed.
datafeed
The datafeed object associated with the I.460 mux.

Returns

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


Prosody I.460 Mux: API: sm_i460mux_get_event

Prototype Definition

int sm_i460mux_get_event(struct sm_i460mux_event_parms *eventp)

Parameters

*eventp
a structure of the following type:
typedef struct sm_i460mux_event_parms {
	tSMI460muxId i460mux;					/* in */
	tSMEventId event;					/* out */
} SM_I460MUX_EVENT_PARMS;

Description

The event will be signalled when a status change occurs on the mux.

Fields

i460mux
The mux.
event
The event identifier

Returns

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


Prosody I.460 Mux: API: sm_i460mux_status

Prototype Definition

int sm_i460mux_status(struct sm_i460mux_status_parms *statusp)

Parameters

*statusp
a structure of the following type:
typedef struct sm_i460mux_status_parms {
	tSMI460muxId i460mux;					/* in */
	enum kSMI460muxStatus {
		kSMI460muxStatusRunning,
		kSMI460muxStatusStopped,
	} status;						/* out */
} SM_I460MUX_STATUS_PARMS;

Description

returns the status of the I.460 mux.

Fields

i460mux
The mux.
status
The status. One of these values:
kSMI460muxStatusRunning
The mux is running
kSMI460muxStatusStopped
The mux is not running

Returns

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


These functions constitute the Prosody I.460 Mux API.