Prosody generic: API: sm_get_card_info

Prototype Definition

int sm_get_card_info(struct sm_card_info_parms *cardinfop)

Parameters

*cardinfop
a structure of the following type:
typedef struct sm_card_info_parms {
	tSMCardId card;						/* in */
	enum kSMCarrierCardType {
		kSMCarrierCardTypeYetUnknown,
		kSMCarrierCardTypeISAS2,
		kSMCarrierCardTypeBR4,
		kSMCarrierCardTypeBR8,
		kSMCarrierCardTypePCIP1,
		kSMCarrierCardTypePCIC1,
		kSMCarrierCardTypePS,
		kSMCarrierCardTypePX,
	} card_type;						/* out */
	tSM_INT card_detected;					/* out */
	tSM_INT module_count;					/* out */
	tSM_UT32 physical_address;				/* out */
	tSM_UT32 io_address;					/* out */
	tSM_UT32 physical_irq;					/* out */
	char serial_no[kSMMaxSerialNoText];			/* out */
} SM_CARD_INFO_PARMS;

Description

Retrieves information about card hosting Prosody modules installed in system.

On return, card_type will be set to one of the following values:

Card Type Use
kSMCarrierCardTypeYetUnknown Card type not yet determined by driver.
kSMCarrierCardTypeISAS2 Card is ISA (S2) Prosody carrier card.
kSMCarrierCardTypeBR4 Card is 4 port Basic Rate card.
kSMCarrierCardTypeBR8 Card is 8 port Basic Rate card.
kSMCarrierCardTypePCIP1 Prosody PCI card
kSMCarrierCardTypePCIC1 Prosody cPCI card
kSMCarrierCardTypePS Prosody S software 'card'
kSMCarrierCardTypePX Prosody X card

If the physical card presence has being established by the driver, card_detected will be set to a non-zero value.

The number of modules detected on the card is returned in module_count.

The 32 bit physical memory window that has been configured to address the card is returned in physical_address, the card's i/o address in io_address, and the interrupt invoked by the card in physical_irq. Only on Prosody version 2 (TiNG): These values are for indication only and may not be meaningful on every operating system. For PCI cards the io_address parameter contains the PCI device number for the card in the lower 8 bits, and the PCI bus number in the upper 8 bits.

Some carrier cards have a machine readable serial number. For such cards the serial number is returned as a zero terminated text string in the character array serial_no.

Fields

card
The card about which information is required
card_type
The type of the card One of these values:
kSMCarrierCardTypeYetUnknown
The card type has not been determined.
kSMCarrierCardTypeISAS2
An S2 card. This is an ISA card which has only Prosody (no switching or call control). It has two Prosody Processor modules mounted on the card and two module connectors to add up to two more on daughter cards.
kSMCarrierCardTypeBR4
A BR4 card. This is an ISA card which is capable of being connected to four ISDN Basic Rate lines. It has one Prosody Processor module.
kSMCarrierCardTypeBR8
A BR8 card. This is an ISA card which is capable of being connected to eight ISDN Basic Rate lines. It has one Prosody Processor module.
kSMCarrierCardTypePCIP1
A P1 card. This is a PCI card which can also carry a line interface module to connect to up to four trunks. It has two Prosody Processor modules mounted on the card and two module connectors to add up to two more on daughter cards.
kSMCarrierCardTypePCIC1
A C1 card. This is a CompactPCI card which can also carry a line interface module to connect to up to four trunks. It has four Prosody Processor modules mounted on the card.
kSMCarrierCardTypePS
A Prosody S software 'card'. This is a software entity which emulates a digital access card and provides a number of channels of telephony via the host's IP (Internet Protocol) communications.
kSMCarrierCardTypePX
A Prosody X card. This is a card which is controlled by IP (Internet Protocol).
card_detected
Indicator of whether or not this card has been detected.
module_count
The number of modules on this card.
physical_address
The physical memory address of this card.
io_address
The I/O address of this card.
physical_irq
The interrupt number being used by this card.
serial_no
The serial number of this card.

Returns

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


This function is part of the Prosody generic API.