PREV TOC HOME INDEX NEXT


ms_stopfn( )


Cautions | Errors | Example | See Also

Name: int ms_stopfn (devh, funcid)
Inputs:

unsigned int devh

  • MSI station device handle

unsigned int funcid

  • ID of multitasking function
Returns:

0 on success

-1 on failure

Includes:

srllib.h

dtilib.h

msilib.h

Category:

Device Management

Mode:

synchronous

Platform:

DI, HDSI, Springware

Description

The ms_stopfn( ) function stops a multitasking function in progress for a station. Currently, ringing is the only type of multitasking function which can be stopped. However, ringing may be started by one of the three following functions: ms_genring( ), ms_genringCallerID( ), and ms_genringex( ).

Parameter

Description

devh the MSI station device handle
funcid the identification of the multitasking function that must be stopped. The valid value is:
  • MTF_RING
    Stops ringing on a station, if in progress.

Cautions

This function fails when:

Errors

If this function returns -1 to indicate failure, obtain the reason for the error by calling the SRL standard attribute function ATDV_LASTERR( ) or ATDV_ERRMSGP( ) to retrieve either the error code or a pointer to the error description, respectively.

Refer to the error type tables found in Chapter 5, "Error Codes". Error defines can be found in dtilib.h or msilib.h.

Example

#include <windows.h>         /* For Windows applications only */
#include <errno.h>
#include "srllib.h"
#include "dtilib.h"
#include "msilib.h"  
 int chdev1 ;  
/* Open board 1, station 2 device */
if ((chdev1 = ms_open("msiB1C2",0) == -1) {
    printf("Cannot open MSI B1, C2. errno = %d", errno);
    exit(1);
}  
/* ring the station 2 five times */
if (ms_genring(chdev1, 5, EV_ASYNC)== -1){
    printf("Error Message = %s",ATDV_ERRMSGP(chdev1));
    exit(1);
}  
/* 2 seconds later, ringing has not completed and station 2
 * has not gone off-hook. However, there is a need to abort the
 * ringing on station 2. Issue the abort command
 */  
if (ms_stopfn(chdev1,MTF_RING)== -1) {
    printf("Error Message = %s",ATDV_ERRMSGP(chdev1));
    exit(1);
}  

See Also


PREV TOC HOME INDEX NEXT

Click here to contact Telecom Support Resources

Copyright 2003, Intel Corporation
All rights reserved
This page generated January, 2003