Prosody generic: API: sm_get_module_info
Prototype Definition
int sm_get_module_info(struct sm_module_info_parms *moduleinfop)
Parameters
- *moduleinfop
-
a structure of the following type:
typedef struct sm_module_info_parms {
tSMModuleId module; /* in */
tSM_INT firmware_running; /* out */
tSM_INT firmware_id; /* out */
tSM_INT average_loading; /* out */
tSM_INT max_loading; /* out */
/* Only in Prosody version 2 (TiNG) */
tSM_INT module_slot; /* out */
tSM_INT min_stream; /* out */
/* End of part only in Prosody version 2 (TiNG) */
} SM_MODULE_INFO_PARMS;
Description
Fetches information about a module.
Note that fields apart from
module_slot
and
min_stream
are undefined for Prosody S and for Prosody X.
Fields
- module
- A value obtained from
sm_open_module()
which indicates the module on which information is required.
- firmware_running
- Indicator of whether or not firmware is running on this module.
Zero if firmware is not running.
Note that this refers to the kernel, not individual software
modules.
- firmware_id
- The id field passed to the last call to
sm_download_fmw()
if the firmware is running, otherwise zero.
Note that this refers to the kernel, not individual software
modules, so it is always zero.
- average_loading
- The percentage (0..100) average work load of the module over the last
second.
- max_loading
- The percentage (0..100) peak work load of the module over the
last second.
- module_slot (Only in Prosody version 2 (TiNG))
- The position of the module on its carrier card.
- min_stream (Only in Prosody version 2 (TiNG))
- The number of the first stream accessible to this module.
Returns
0
if call completed successfully, otherwise a standard error such as:
- ERR_SM_DEVERR - device error
- ERR_SM_NO_SUCH_MODULE - if no such module exists
This function is part of the Prosody generic API.