NMS_V5Initialize

Loads and initializes the NMS V5 library.

Prototype

NMS_V5_RESULT_T NMS_V5Initialize ( NMS_V5_BOARD_FAMILY_T board_family, void *init_parms)

Argument

Description

board_family

Specifies the board family used on the system. The NMS_V5_BOARD_FAMILY_T type is defined in the following structure:

typedef enum _NMS_V5_BOARD_FAMILY_T
{
    NMSV5_BOARD_FAMILY_CG = 0x01
} NMS_V5_BOARD_FAMILY_T;

init_parms

Pointer to board-specific initialization parameters. For CG 6000 and CG 6000C boards, the application passes NULL. For CG 6100C and CG 6500C boards, the application passes a CTA context handle on which the Switching (SWI) service has been opened.


Return values

Return value

Description

NMSV5_SUCCESS

 

NMSV5_ALREADY_INITIALIZED

NMS V5 library is already initialized.

NMSV5_FAILED_LOAD_LIB

Failed to load board specific implementation library.

NMSV5_INTERNAL_FAILURE

Failed to initialize internal tasks.

NMSV5_INVALID_PARMS

Invalid function arguments.

NMSV5_NO_MEMORY

Failed to allocate memory.


Details

NMS_V5Initialize loads and initializes the NMS V5 library. Applications invoke this function only once at start-up time, and before invoking any other NMS V5 library functions.

If the system uses CG 6000 or CG 6000C boards, the application passes NULL as the init_parms argument.

When invoking NMS_V5Initialize on systems that use CG 6100C or CG 6500C boards, applications use the init_parms argument to pass a pointer to a CTA context handle on which the Switching service has been opened. When CG 6100C or CG 6500C boards reside on the system, applications must perform the following Natural Access operations before initializing the NMS V5 library:

ctaOpenServices returns a context handle that the application passes to the NMS V5 library when invoking NMS_V5Initialize.

If the application wants to receive tracing information from the NMS V5 library, it must invoke NMS_V5SetTrace immediately after invoking NMS_V5Initialize.

See also

NMS_V5Exit, NMS_V5ProvisionInterface

Example

void  Initialize( void* InitParms )
{
    NMS_V5_RESULT_T  NmsResult;

    printf("NMS_V5Initialize:\n");

    NmsResult = NMS_V5Initialize( g_BoardFamily, InitParms );
    printf ("NMS_V5Initialize: Result=%s\n",PRINT_RESULT(NmsResult));
}