Initializing NMS OAM client applications

To access NMS OAM service functions, a client application must:

  1. Initialize Natural Access.

  2. Create event queues.

  3. Create contexts.

  4. Open NMS OAM service instances on the context, or attach to an existing shared context if one exists.

  5. Register for NMS OAM alert notification messages (if the application needs to receive NMS OAM events).

Initializing Natural Access

Use ctaInitialize to initialize Natural Access applications. When you initialize Natural Access applications you register the services that are available to the application.

Applications must invoke ctaInitialize before calling any other Natural Access functions. For general information about ctaInitialize, refer to the Natural Access Developer's Reference Manual.

Registering the NMS OAM service

You can register services in one of the following ways:

Service = oam, oammgr

Creating event queues

After initializing Natural Access, invoke ctaCreateQueue to create one or more event queues. In the function invocation, specify the service managers to be attached to each queue.

Creating contexts

Invoke ctaCreateContext or ctaCreateContextEx (for shared contexts) to create a context. Provide the queue handle (ctaqueuehd) that was returned from ctaCreateQueue. All events for services on the context are received in the specified event queue.

Use the descriptor string argument passed with ctaCreateContext or ctaCreateContextEx to specify the resource host on which the context will be created. descriptor has the following format:

[cta://]host_address[:port]

ctaCreateContext and ctaCreateContextEx each return a context handle (ctahd). The context handle is supplied by the application when invoking service functions. Events communicated back to the application are also associated with the context.

Refer to the Natural Access Developer's Reference Manual for details on the programming models created by the use of contexts and event queues.

Opening services

Invoke ctaOpenServices to open services on a context. When opening a service on a context, you must specify the service and the service manager, and the resources to attach to the context. Specify this information in substructures of the CTA_SERVICE_DESC structure that you pass in the function invocation. NMS OAM functions are available only to contexts on which the NMS OAM service is opened.

For more information, refer to the Natural Access Developer's Reference Manual.

To receive events from the NMS OAM service and from installed EMCs (such as Hot Swap and Clock Management), a client application must register with the NMS OAM service using oamAlertNotify.