PREV TOC HOME INDEX NEXT


NCM_QueryTimeslots( )


Description | Cautions | Example | Error Codes | See Also

Name:

NCMRetCode NCM_QueryTimeslots(pDeviceName, nStartTimeSlotNum, ePersistent, pnNumOfBlocks, pNCMTSBlock)

Inputs:

NCMDevice *pDeviceName
  • pointer to a third party device name
int nStartTimeSlotNum
  • starting time slot number of the block to be queried
NCMTSReserveType ePersistent
  • type of time slots to be queried (persistent, transient or all)
int *pnNumOfBlocks
  • pointer to the number of time slot blocks to be returned
NCM_TS_BLOCK_STRUCT *pNCMTSBlock
  • pointer to the data structure containing the time slots being queried

Returns:

NCM_SUCCESS if success NCM error code if failure

Includes:

NCMApi.h

Mode:

synchronous

Description

The NCM_QueryTimeslots( ) function allows you to query either the entire Intel® Dialogic system for reserved time slots or a specific third party device for its associated time slots. The ePersistent parameter determines whether the query returns persistent time slots only, transient time slots only or all time slots (i.e both persistent and transient types).

The function parameters are defined as follows:

Parameter

Description

pDeviceName pointer to the data structure containing the name of the third party device that you are querying. The device name must be the same name you used to add the third party device to the system configuration with the NCM_AddThirdPartyDevice( ) function A device name for this parameter is optional. Set this parameter to NULL to return all reserved third party device time slots within the Intel® Dialogic system.
nStartTimeSlotNum indicates the starting time slot for the block of time slots that is to be queried. This parameter can either be set to a valid integer or NO_UNIQUE_ID (if you are not associating the query with a specific block of time slots).
ePersistent determines whether the query will return persistent time slots only, transient time slots only or all time slots (i.e both transient and persistent). Valid values are as follows:
  • NCM_TIME_SLOT_PERSISTENT - only persistent time slots are returned
  • NCM_TIME_SLOT_TRANSIENT - only transient time slots are returned
  • NCM_TIME_SLOT_ALL - all time slots are returned (i.e. both transient and persistent)
pnNumOfBlocks points to the number of time slot blocks to be returned
pNCMTSBlock points to the NCM_TS_BLOCK_STRUCT data structure that is returned by the function

The following table summarizes the supported parameter combinations for the NCM_QueryTimeslots( ) function:

pDeviceName

nStartTimeSlotNum

ePersistent

Result

NULL set to a valid value NCM_TIMESLOT_ALL returns all reserved time slots associated with the block that starts with the nStartTimeSlotNum value
NULL NO_UNIQUE_ID NCM_TIMESLOT_PERSISTENT returns all reserved time slots in the system that are persistent
NULL NO_UNIQUE_ID NCM_TIMESLOT_TRANSIENT returns all reserved time slots in the system that are transient
NULL NO_UNIQUE_ID NCM_TIMESLOT_ALL returns all time slots that have been reserved for third party devices (i.e. persistent and transient time slots for all third party devices are returned)
device name set NO_UNIQUE_ID NCM_TIMESLOT_PERSISTENT returns all reserved time slots that are persistent and associated with the third party device indicated by the pDeviceName parameter
device name set set to a valid value NCM_TIMESLOT_PERSISTENT returns reserved time slots within the block that starts with the nStartTimeSlotNum parameter, are associated with the third party device indicated by the pDeviceName parameter and are persistent

Cautions

None

Example

#include "NCMApi.h" 
NCMDevice device.Name;
char DeviceString[] = "ThirdPartyDevice-XYZ#1";
deviceName.name = (char *) DeviceString;
deviceName.next = NULL; 
NCMRetCode ncmRc = NCM_SUCCESS;
NCMTSReserveType reserveType = NCM_TIMESLOT_PERSISTENT;
DWORD numBlocks = 1;
NCM_TS_BLOCK_STRUCT *pTimeslotBlock = NULL; 
int nStartTimeSlotNum = 10; 
ncmRc = NCM_QueryTimeslots(&deviceName, nStartTimeSlotNum, reserveType, &numBlocks, pTimeslotBlock); 
if (ncmRc != NCM_SUCCESS)
{
   //process error
}
 

Error Codes

Equate

Returned When

NCME_NO_TIMESLOT specified time slots queried do not exist
NCME_INVALID_THIRDPARTY_DEVICE specified third party device does not exist
NCME_DATA_NOT_FOUND data not found
NCME_BUFFER_TOO_SMALL allocated buffer is too small
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