Version

Description
Releases a buffer after the application has finished processing it.
Prototype
DWORD imgtReleaseBuffer (CTAHD ctahd,
void *buffer)
ctahd Context handle returned by ctaCreateContext.
buffer Pointer to buffer to be released.
Return Values
SUCCESS
CTAERR_INVALID_HANDLE
IMGTERR_INVALID_BUFFER
Events
None.
Details
This function sends an indication to the IMGT manager that the application has finished processing an event buffer (described by the CTA_EVENT buffer and size fields) and is returning that buffer to the IMGT service.
Note: The application must return every event buffer to the IMGT service as soon as possible, or the API will run out of buffers and stop passing events to the application.
Example
void MyEventHandler( CTAHD ctahd )
{
DWORD ret;
CTA_EVENT event;
char *errortext="";
while( 1 )
{
ret = ctaWaitEvent( ctahd, &event, 100 );
switch( event.id )
{
case CTAEVN_WAIT_TIMEOUT:
break;
case IMGTEVN_STARTED:
printf( "imgt started\n" );
break;
case IMGTEVN_STOPPED:
printf( "imgt stopped\n" );
break;
case IMGTEVN_RCV_MESSAGE:
/* process the buffer */
...
ret = imgtReleaseBuffer( ctahd, event.buffer );
if (ret != SUCCESS)
{
ctaGetText( ctahd, ret, (char *) errortext, 40);
printf( "imgtReleaseBuffer failure: %s\n",errortext );
exit( 1 );
}
break;
} /* end of switch */
}/* end of while */
}
imgtSendMessage
Description
Sends a message to the management manager with attached data.
Prototype
DWORD imgtSendMessage (CTAHD ctahd,
unsigned size,
ctahd Context handle returned by ctaCreateContext.
pmessage Pointer to IMGT_MESSAGE structure.
size Size of data block.
pbuff Pointer to the primitive-specific data structure (as specified in Section 4.2.3).
on a board */
This return value means any of the following:
The specified context handle is invalid.
A management session has not been initialized.
The event value field contains one of the following:
The size of the buffer is too large.
Example
unsigned nai,
IMGT_CONFIG *pconfig)
duplicate NAI values on a board */
The specified context handle is invalid.
The IMGT_CONFIG data structure contains invalid fields
(Invalid fields are those that are not currently implemented).
The event value field contains one of the following:
The management manager has been properly configured. The user can now expect to receive only the events that have been configured.
The network access identifier (NAI) in the message structure is not valid.
The IMGT manager has already been started on this NAI.
The ISDN stack has not been started for this NAI.
For Natural Access 3.x, configured NAI values must be unique on a board. Also, a different structure is pointed to by pconfig:
imgtStop
Prototype
The specified context handle is invalid.
The event value field can contain only the following:
The management session has been stopped.
Version