Avaya Logo

Previous Topic

Next Topic

Book Contents

Book Index

Hardcoded DIPs

startup

The startup function is called once to post a hardcoded DIP to the BB. As shown in the following example, startup takes the Qkey and slot_offset as arguments.

#include "spp.h"

int startup (qkey,slot_offset)
int qkey; /* Message qkey of calling process */
int slot_offset; /* used to get slot for posting */

In startup, the DIP tells the voice system what Qkey the DIP will be using. Hardcoded DIP Qkeys range from DIP0 to DIP34 and, using one of these Qkeys, makes the DIP a message-sending DIP to TSM.

The slot_offset argument is used by startup to post the DIP in a specific slot in the BB. The slot_offset argument is the responsibility of the DIP writer, as it must be known what slots are available for posting hardcoded DIPs. With the increased use of hardcoded DIPs by the voice system, the chance of clashing with other DIPs is possible.

Note:
Be aware that other applications may utilize the same hardcoded DIPs causing a clash of resources.

Startup computes the slot to post the DIP from the slot_offset argument in the following manner:

slot = slot_offset + DIPSTART

DIPSTART is defined in the file shmemtab.h as 32. Slots reserved for hardcoded DIPs in the range 32-66, so that the slot_offset given should range from 0-34 (the range of DIP numbers). The voice system DIPs use the following convention to compute their corresponding slot_offset :

slot_offset = Qkey - DIP0 (where DIP0 is defined as 20 in mesg.h)

By this point, your DIP should be posted in the BB, and, in the case of a DynaDIP, you should also know the assigned message queue key.

© 2006 Avaya Inc. All Rights Reserved.