PREV TOC HOME INDEX NEXT


NCM_DeallocateTimeslots( )


Description | Cautions | Example | Error Codes | See Also

Name:

NCMRetCode NCM_DeallocateTimeslots(pDeviceName, nStartTimeSlot, bPermanent)

Inputs:

NCMDevice *pDeviceName
  • pointer to a third party device name
int nStartTimeSlot
  • starting time slot number of the block to be released
bool bPermanent
  • determines whether or not the released time slots are persistent

Returns:

NCM_SUCCESS if success NCM error code if failure

Includes:

NCMApi.h

Mode:

synchronous

Description

The NCM_DeallocateTimeslots( ) function is used to release a single block of time slots that had been reserved for third party devices.

The function parameters are defined as follows:

Parameter

Description

pDeviceName pointer to the data structure containing the name of the third party device that was associated with the allocated block of time slots. The device name must be the same name you associated with the time slot block using the NCM_AllocateTimeslots( ) function. A device name for this parameter is optional. If the block of time slots you are deallocating was not associated with a third party device name, set this parameter to NULL.
nStartTimeSlot starting time slot for the block of time slots that is to be deallocated. You can set this parameter to a time slot number or to NO_UNIQUE_ID
bPermanent indicates whether or not the block of time slots will be permanently released. If the boolean is set to TRUE, then the block of time slots is permanently deallocated. If the boolean is set to FALSE then the deallocation will not be preserved when the system is rebooted (i.e. the time slot block will be automatically re-allocated when the system is rebooted.)

The following table summarizes the different parameter combinations for the NCM_DeallocateTimeslots( ) function:

pDeviceName

nStartTimeSlot

bPermanent

Result

NULL set to a valid value TRUE time slots within the block associated with the start time slot will be permanently released.
NULL set to a valid value FALSE all time slots will be released and available for use by other devices until the system is rebooted. After the system is rebooted, the time slots will be reclaimed.
NULL NO_UNIQUE_ID TRUE all time slots will be permanently released.
NULL NO_UNIQUE_ID FALSE all time slots will be released and available for use by other devices until the system is rebooted. After the system is rebooted, the time slots will be reclaimed.
device name set set to a valid value TRUE time slot block associated with the device and the starting time slot number will be permanently released.
device name set set to a valid value FALSE time slot block associated with the device and the starting time slot number will be released and available for use by other devices until the system is rebooted. After the system is rebooted, the time slots will be reclaimed.
device name set NO_UNIQUE_ID TRUE all time slots associated with the device will be permanently released.
device name set NO_UNIQUE_ID FALSE all time slots associated with the device will be released and available for use by other devices until the system is rebooted. After the system is rebooted, the time slots will be reclaimed.

Cautions

The function cannot partially release the time slot block(s) that are allocated by the NCM_AllocateTimeslots( ) function. You must deallocate a complete block of time slots each time the NCM_DeallocateTimeslots( ) function is called.

Example

#include "NCMApi.h" 
NCMRetCode   ncmRc=NCM_SUCCESS; 
int    start_timeslot = 10;
bool   bPermanent = true;
NCMDevice deviceName;
char DeviceString[] = "ThirdPartyDevice-XYZ#1";
deviceName.name = (char *) DeviceString;
deviceName.next = NULL; 
ncmRc = NCM_DeallocateTimeslots(NULL, start_timeslot, true); 
if (ncmRc != NCM_SUCCESS)
{
   //process error
}
ncmRc = NCM_DeallocateTimeslots(&deviceName, NO_UNIQUE_ID, true); 
if (ncmRc != NCM_SUCCESS)
{
   //process error
} 
... 

Error Codes

Equate

Returned When

NCME_RELEASE_TIMESLOT time slots could not be released
NCME_INVALID_THIRDPARTY_DEVICE specified third party device does not exist
NCME_CTBB_LIB CTBBFace.dll file is either not in the system or is the incorrect version
NCME_RELEASE_TIMESLOT failed to release the specified time slots
NCME_SYSTEMERROR specific system resources were not found

See Also


PREV TOC HOME INDEX NEXT

Click here to contact Telecom Support Resources

Copyright 2003, Intel Corporation
All rights reserved
This page generated January, 2003