NMS_GR303Initialize

Loads and initializes the NMS GR303 library.

Prototype

NMS_GR303_RESULT_T NMS_GR303Initialize ( NMS_GR303_BOARD_FAMILY_T board_family, void *init_parms)

Argument

Description

board_family

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

typedef enum _NMS_GR303_BOARD_FAMILY_T
{
  NMSGR303_BOARD_FAMILY_CG = 0x01
 /* CG board family*/
} NMS_GR303_BOARD_FAMILY_T;

init_parms

Pointer to board-specific initialization parameters. For CG 6000 or 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

NMSGR303_SUCCESS

 

NMSGR303_ALREADY_INITIALIZED

NMS GR303 library is already initialized.

NMSGR303_FAILED_LOAD_LIB

Failed to load the library.

NMSGR303_INTERNAL_FAILURE

Failed to initialize internal structures, connections or processes.

NMSGR303_NO_MEMORY

Failed to allocate memory.


Details

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

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

When invoking NMS_GR303Initialize 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 is opened. When CG 6100C or CG 6500C boards reside in the system, applications must perform the following Natural Access operations before initializing the NMS GR303 library:

ctaOpenServices returns a context handle that the application passes to the NMS GR303 library when invoking NMS_GR303Initialize.

If the application wants the NMS GR303 library to return trace information, it should invoke NMS_GR303SetTrace immediately after invoking NMS_GR303Initialize.

See also

NMS_GR303Exit, NMS_GR303StartInterface

Example

void  Initialize( void* InitParms )
{
      NMS_GR303_RESULT_T     NmsResult;

      printf("NMS_GR303Initialize:\n");

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