Previous PageTable Of Contents../index.htmlIndexNext Page

scx_setevtmsk( )

Description | Cautions | Example | Errors | See Also

Name:

int scx_setevtmsk(devh, mask)

Inputs:

int devh

  SCX160 SCxbus Adapter device handle

 

unsigned short mask

  Event mask

Returns:

0 on success
-1 on failure

Includes:

scxlib.h

Category:

Configuration

Mode:

synchronous

Top Of PageDescription

The scx_setevtmsk( ) function enables alarm events specified in the event mask. Calling this function may cause an immediate event reflecting the current state of the SCX160 SCxbus Adapter if that state is part of the message mask being enabled.

Parameter

Description

devh:

Specifies the SCX160 SCxbus Adapter device handle.

mask:

Specifies the event mask. Possible event masks may be any combination of the following event mask equates:

  SCXMM_EXT_CLOCK - external clock event mask

  SCXMM_FIFO - SCX160 FIFO event mask

  SCXMM_SC_CLOCK - SCbus clock event mask

  SCXMM_SC_DRIVER - SCbus driver event mask

  SCXMM_SCX_CLOCK - SCxbus clock event mask

  SCXMM_SCX_DRIVER - SCxbus driver event mask

The event code returned by the sr_getevttype( ) function is TSCX_ALARM. The data field returned by the sr_getevtdatap( ) function contains the event detected and is two bytes long. The first byte represents one of the following bitmask values:

Equate

Description

SCXEV_SCBUS_CLOCK

SCbus clock event

SCXEV_SCXBUS_CLOCK

SCxbus clock event

SCXEV_EXT_CLOCK

External clock event

SCXEV_SCBUS_DRIVER

SCbus driver event

SCXEV_SCXBUS_DRIVER

SCxbus driver event

SCXEV_FIFO

SCX160 FIFO event

The second byte provides additional details about the event reported by the first byte as follows. If any clock event is returned, then the second byte represents one of the following:

Equate

Description

SCXST_SCX_RCLOCK

SCxbus Right Clock failed/recovered

SCXST_SCX_LCLOCK

SCxbus Left Clock failed/recovered

SCXST_SC_CLOCK

SCbus Clock failed/recovered

SCXST_SC_CLOCK_FAIL_SIG

SCbus Clock Fail Signal failed/recovered

SCXST_EXTCLOCK

SCX160 External Clock failed/recovered

SCXST_PLL_REF

SCX160 PLL Reference failed/recovered

SCXST_INTCLOCK

SCX160 Internal Clock failed/recovered

SCXST_CLK_RECOVER

Recovery of Clock

If any driver event is returned, then the second byte represents one of the following:

Equate

Description

SCXBE_SC_BER

SCbus BER Threshold Exceeded

SCXBE_SCX_BER

SCxbus BER Threshold Exceeded

When a FIFO event is returned, then the second byte represents one of the following:

Equate

Description

SCXFS_SC_POS_SLIP

SCbus FIFO Positive Slip Threshold Exceeded

SCXFS_SC_NEG_SLIP

SCbus FIFO Negative Slip Threshold Exceeded

SCXFS_SCX_POS_SLIP

SCxbus FIFO Positive Slip Threshold Exceeded

SCXFS_SCX_NEG_SLIP

SCxbus FIFO Negative Slip Threshold Exceeded

SCXFS_SC_SKEW

SCbus FIFO Skew Threshold Exceeded

SCXFS_SCX_SKEW

SCxbus FIFO Skew Threshold Exceeded

See Section 9.2.  Handling Events for an example of handling unsolicited events.

Top Of PageCautions

This function enables notification only for the events specified. If notification for other events was enabled or disabled previously, the status of the notification will not change.

This function will fail if an invalid device handle is specified.

Top Of PageExample

Top Of PageErrors

If the function returns -1, use the SRL Standard Attribute function ATDV_LASTERR( ) to obtain the error code, or you can use the ATDV_ERRMSGP( ) function to obtain a descriptive error message. The error codes returned by ATDV_LASTERR( ) function are listed in Chapter 7.  Errors.

Top Of PageSee Also


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2001, Dialogic Corporation
All rights reserved
This page generated February, 2002