User`s guide

Dialogic
®
System Release 6.0 PCI for Windows
®
Release Update, Rev 62 — January 30, 2008 240
Dialogic Corporation
MSMM_CS_IDLE
Station interface online; sent when cable is reconnected, alarm is cleared, or station is
powered up.
MSMM_CS_OUT_OF_SERVICE
Loop current to station interface disabled, e.g., for maintenance purposes.
The MSEV_CHANSTATE event is disabled by default. Use the ms_setevtmsk( ) function
to enable events, for example, ms_setevtmsk(msiB#C#, MSEV_CHANSTATE,
MSMM_CS_ALARM | MSMM_CS_IDLE | MSMM_CS_OUT_OF_SERVICE,
DTA_SETMSK).
Note: The enabling/disabling of the event is local to a process. If multiple processes are running
on the same board, the event has to be enabled for each process.
Alarms are provided on a per station basis as opposed to a per link basis. This means that
if a communication link is disconnected on an HDSI Board, for example, 30 alarms
corresponding to the 30 stations on that link would be sent. It is up to the application to
enable/mask the appropriate alarms to arrive at the desired number of alarms per link.
The number of stations per link depends on the board you are using; for example, on the
HDSI/960 Station Interface Board, link 1 = stations 1-30, link 2 = stations 31-60, link 3 =
stations 61-90, and link 4 = stations 91-96.
Example
This example shows how to use the ms_setevtmsk( ) function to enable a station to
receive all three channel state events.
#include <msilib.h>
/* Enable channel state event */
void EnableCSEvents(int a_DevHdl)
{
unsigned short t_SetBitMsk = MSMM_CS_ALARM | MSMM_CS_IDLE | MSMM_CS_OUT_OF_SERVICE;
int t_Action = DTA_ADDMSK;
unsigned short t_GetBitMsk = 0;
if ( ms_setevtmsk(a_DevHdl, MSEV_CHANSTATE, t_SetBitMsk, t_Action) == -1 )
{
printf("ms_setevtmsk(dvh:%d, MSEV_CHANSTATE, bitmsk:0x%X, action:%d) failed \n",
a_DevHdl, t_SetBitMsk, t_Action);
printf("Error Message = %s\n",ATDV_ERRMSGP(a_DevHdl) );
}
else
{
printf("ms_setevtmsk(dvh:%d, MSEV_CHANSTATE, bitmsk:0x%X, action:%d) success \n",
a_DevHdl, t_SetBitMsk, t_Action);
}
/* Verify the setting */
if ( ms_getevtmsk(a_DevHdl, MSEV_CHANSTATE, &t_GetBitMsk) == -1 )
{
printf("ms_getevtmsk(dvh:%d, MSEV_CHANSTATE, bitmsk:0x%X) failed \n", a_DevHdl,
t_GetBitMsk);
printf("Error Message = %s\n",ATDV_ERRMSGP(a_DevHdl) );
}
else
{
if ( (t_GetBitMsk & MSMM_CS_ALARM) == MSMM_CS_ALARM )
printf("ms_getevtmsk(dvh:%d, MSEV_CHANSTATE, bitmsk:0x%X) - MSMM_CS_ALARM is
set\n", a_DevHdl, t_GetBitMsk);