Voice API Programming Guide — June 2005 143
Cached Prompt Management
If the combined length of data specified in the series of DX_IOTT data structures exceeds the
available on-board memory, this results in the EDX_NOTENOUGHBRDMEM error. If this
error occurs, none of the series of DX_IOTT is downloaded to the board.
To avoid this situation, be sure to determine that there is sufficient on-board memory available
for the cached prompt using dx_getcachesize() before issuing a play function.
For any other reason (including firmware) if the prompt cannot be downloaded, then
EDX_SYSTEM is generated.
On Linux, if ATDV_LASTERR( ) returns EDX_SYSTEM error, check the global variable
errno contained in errno.h. On Windows, if ATDV_LASTERR() returns EDX_SYSTEM
error, call dx_fileerrno() to obtain the error value.
The following are some errors that may occur while playing a cached prompt:
If you specify an invalid cached prompt handle, this results in EDX_BADIOTT.
If you specify an invalid board handle, this results in EDX_BADPARM.
If there is an error in the underlying components (such as firmware) while playing a cached
prompt, then EDX_SYSTEM is generated.
12.2.5 Cached Prompt Management Hints and Tips
This section provides hints and tips on using cached prompt management.
A cached prompt will be deleted or flushed from on-board cache memory upon calling dx_close()
on the physical board device.
Unlike disk or host memory resident prompts, cached prompts on an individual board are lost when
a board is hot swapped. Since the application is aware of board insertion and removal through the
Operations, Administration, and Maintenance (OA&M) API, it is responsible for re-initiating the
cached prompt download sequence when the BRD_APP_RDY event is received through the event
service.
The following rules govern the application’s treatment of cached prompts during hot swap
operations.
Upon a hot swap removal, the application must consider all cached prompt IDs and also the
physical board handle for the board to be invalid. Play operations to the board will fail.
Upon a hot swap insertion, the application must re-download the cached prompts for the new
board.
For more information on the OA&M API, on Linux, see the OA&M API for Linux Library
Reference and OA&M API for Linux Programming Guide; on Windows, see the Event Service API
for Windows Operating Systems Library Reference and Event Service API for Windows Operating
Systems Programming Guide.