(Page 3 of 3 in this chapter)
1.2 Setting Up the CT Access Environment
- Before you can call functions from the Switching library, the application must initialize CT Access and open the Switching service. Application setup for CT Access consists of the following steps:
- Initializing CT Access for the process.
- Creating event queues.
- Creating CTA contexts and attaching them to an event queue.
- Opening services on each CTA context.
1.2.1 Initializing CT Access
- You register services in the call to ctaInitialize by specifying the service name (SWI) and service manager name (SWIMGR). Only the services initialized in the call to ctaInitialize may be opened by the application. Service managers are dynamic link libraries (DLL) in Windows NT and OS/2 and shared libraries in UNIX which are linked to the application.
1.2.2 Creating Event Queues and CTA Contexts
- After initializing CT Access, create the event queues and CTA contexts.
- Create one or more event queues by calling ctaCreateQueue. You specify which service managers will be attached to each queue. The Switching service's service manager is SWIMGR. When you attach or bind a service manager to a queue, you make that service manager available to the queue.
- Create a CTA context by calling ctaCreateContext. You provide the queue handle (ctaqueuehd) that was returned from ctaCreateQueue. All events for services on the CTA context will be received in the specified event queue.
- ctaCreateContext returns a CTA context handle (ctahd). The CTA context handle is supplied by the application when invoking swiOpenSwitch.
- Refer to the CT Access Developer's Reference Manual for details on the programming models created by the use of CTA contexts and queues.
1.2.3 Opening Services
- Services are opened on a CTA context by calling ctaOpenServices, passing a CTA context handle and a list of service descriptors. The service descriptor specifies the name of the service, service manager, and service-specific arguments.
(Page 3 of 3 in this chapter)
tech_support@nmss.com
Copyright © 1997, Natural MicroSystems, Inc. All rights
reserved.