- Applications can use lineDevSpecific to set specific NMS board environment parameters. When using lineDevSpecific, applications must specify the command CMD_SET_PARAM_BY_NAME in the NMSDEVSPECPARAM structure. Applications use CMD_SET_PARAM_BY_NAME to specify parameter values by name.
- In addition, applications must fill in the PARAM_VALUE
structure shown below:
typedef struct _PARAM_VALUE
{
DWORD dwSize; /* Size of this structure */
CHAR szName[MAX_PARAM_NAME_LEN]; /* Parameter name */
DWORD dwValue; /* Memory area for value */
UINT cValSize; /* Size of value(<= sizeof(DWORD)) */
} PARAM_VALUE;
- The following code fragment illustrates using lineDevSpecific to change the connectmask field in the ADI_PLACECALL_PARMS. This structure is used to define when a line is considered Connected in the call setup process.
/* Change the connectmask so that a call made on this line will */
/* transition to the connected state once the call is placed. */
NMSDEVSPECPARAM devSpecParms;
devSpecParms.dwCommand = CMD_SET_PARAM_BY_NAME;
devSpecParms.paramValue.dwSize = sizeof( PARAM_VALUE );
sprintf( devSpecParms.paramValue.szName,"adi.placecall.connectmask" );
devSpecParms.paramValue.dwValue=(DWORD)0x8000; /*Connect Immediately*/
devSpecParms.paramValue.cValSize = sizeof( DWORD );
lineDevSpecific(
mhLine, /* Line handle */
(DWORD)0, /* Address ID */
(HCALL)0, /* Call handle */
&devSpecParms,
sizeof( NMSDEVSPECPARAM )
);