Table of Contents NMS Glossary Previous Page Next Page Version


Chapter 9

Function Summary


9.1 Introduction
9.2 Dispatcher Functions
9.2.1 Registering Service Managers and Services
9.2.2 Controlling Event Queue Processing
9.2.3 Modifying Parameters
9.2.4 Queueing and Sending Service Commands
9.2.5 Managing Handles
9.2.6 Using Wait Objects
9.2.7 Logging Errors and Tracing
9.2.8 Retrieving Service Information
9.3 Service Manager Binding Functions
9.3.1 Life Cycle Binding Functions - Registration
9.3.2 Life Cycle Binding Functions - Event Handling
9.3.3 Life Cycle Binding Functions - Service Startup
9.3.4 Runtime Binding Functions - Command Processing
9.3.5 Runtime Binding Functions - Trace Handling
9.3.6 Runtime Binding Functions - Error Handling
9.3.7 Runtime Binding Functions - Event Processing

9.1 IntroductionTop of Page

This chapter provides an overview of the Natural Access functions by functional group:

Function Group

Description

Dispatcher

Dispatcher functions (disp prefix) are available to both services and service managers.

Service Manager Binding

Service manager binding functions (xxx prefix) provide the "glue code" that connects the service implementation to the Natural Access infrastructure.

9.2 Dispatcher FunctionsTop of Page

The Natural Access Dispatcher provides functions for:

9.2.1 Registering Service Managers and ServicesTop of Page

The following functions allow you to register service managers and services with the dispatcher:

Function

Description

dispRegisterService

Registers a service with the dispatcher at initialization time.

dispRegisterServiceManager

Registers a service manager with the dispatcher at initialization time.

9.2.2 Controlling Event Queue ProcessingTop of Page

The following functions are used to access the event queue:

Function

Description

dispGetQueueHandle

Gets the queue handle of the specified context.

dispMakeAndQueueEvent

Creates an event and sends it to the application event queue or to the dispatcher event queue.

dispQueueEvent

Queues events to other services or applications.

9.2.3 Modifying ParametersTop of Page

The characteristics for many Natural Access services can be altered by modifying associated parameters. The following functions allow you to obtain or change parameter information:

Function

Description

dispCheckParmByName

Verifies the existence and returns the value of a parameter field or structure.

dispGetParmByName

Retrieves the value of parameter field or structure specified by name.

dispGetParms

Returns parameter values for a specified parameter structure.

dispSetParmByName

Permanently modifies the value of a default parameter.

9.2.4 Queueing and Sending Service CommandsTop of Page

The dispSendCommand function is called by service SPI functions to send commands to the service implementation.

9.2.5 Managing HandlesTop of Page

The following functions allow you to create, modify, and destroy service API handles:

Function

Description

dispCreateHandle

Creates a handle and associates it with a service specific value.

dispDestroyHandle

Destroys the API handle and clears its associated value.

dispGetHandleValue

Retrieves the value associated with the given API handle.

dispSetHandleValue

Associates a value with a dispatcher created handle.

9.2.6 Using Wait ObjectsTop of Page

The following functions allow service managers or services to associate wait objects with Natural Access queues:

Function

Description

dispRegisterWaitObject

Registers wait objects and their processing functions with a Natural Access queue.

dispUnregisterWaitObject

Unregisters wait objects and their processing functions from a Natural Access queue.

9.2.7 Logging Errors and TracingTop of Page

The following functions allow you to control service error logging and tracing:

Function

Description

dispApiError

Invokes a user defined error handler, logs a trace message and returns the error code.

dispError

Logs an error to the Natural Access trace log.

dispGetTracePointer

Retrieves the address of the global trace mask at process initialization.

dispLogTrace

Logs a trace message and buffer to the Natural Access trace log.

9.2.8 Retrieving Service InformationTop of Page

dispGetText returns the text representation of errors, reasons, events and commands.

9.3 Service Manager Binding FunctionsTop of Page

The binding functions in the service manager are divided into two groups:

The life cycle binding functions are the service specific functions called by Natural Access to perform:

The runtime binding functions include functions for:

9.3.1 Life Cycle Binding Functions - RegistrationTop of Page

The following binding functions are used to register Natural Access services and service managers:

Function

Description

xxxInitializeManager

Acts as an entry point into service. Declares binding functions and version numbers and compatibility levels for service manager.

xxxDefineService

Declares version numbers, compatibility levels, and parameters for service.

9.3.2 Life Cycle Binding Functions - Event HandlingTop of Page

The following binding functions are used to initialize and shut down event handling:

Function

Description

xxxAttachServiceManager

Initializes communication with managed resource, may declare wait objects and allocate queuecontext data structure.

xxxDetachServiceManager

Deallocates data structures allocated with xxxAttachServiceManager.

9.3.3 Life Cycle Binding Functions - Service StartupTop of Page

The following binding functions are used during service startup and shutdown:

Function

Description

xxxOpenServiceManager

Allocates managed resource data structure which pertains to the specific context.

xxxOpenService

Initializes the managed resource.

xxxCloseServiceManager

De-allocates any data structures opened with xxxOpenServiceManager.

xxxCloseService

Shuts down the managed resource.

9.3.4 Runtime Binding Functions - Command ProcessingTop of Page

The xxxProcessCommand binding function allows you to process service commands.

9.3.5 Runtime Binding Functions - Trace HandlingTop of Page

The following binding functions allow you to control tracing for specific services:

Function

Description

xxxFormatTraceBuffer

Formats a service-specific trace buffer.

xxxSetTraceLevel

Sets the tracemask for a specific service on a per context basis.

9.3.6 Runtime Binding Functions - Error HandlingTop of Page

The following binding functions are used to convert binary codes and trace records to ASCII:

Function

Description

xxxFormatMessage

Formats a command or event that was generated by the service.

xxxGetText

Retrieves the service specific textual representation of an error, reason, event or command code.

9.3.7 Runtime Binding Functions - Event ProcessingTop of Page

The xxxProcessEvent binding function is used to process events from other services.



Table of Contents NMS Glossary Previous Page Next Page Version


Want to send us feedback on our documentation? Email: Tech_Pubs@nmss.com
Copyright © 2001, Natural MicroSystems, Inc. All rights reserved.