(Page 11 of 11 in this chapter)
Version
trauUnload
Description
Unloads an AG TRAU program from an NMS board DSP.
Prototype
DWORD
trauUnload
(
TRAUDSPID
dspid
,
unsigned
mode
)
dspid
Resource identifier returned by
trauLoad
.
mode
Method used to carry out the unload operation. Possible values are:
TRAU_UNLOAD_WAIT
TRAU_UNLOAD_IMMEDIATE
TRAU_UNLOAD_CANCEL
Return Values
SUCCESS
CTAERR_INVALID_CTAHD
CTAERR_INVALID_STATE
The AG TRAU program running on the specified
dspid
is not in an appropriate state.
TRAUERR_INVALID_DSPID
The specified
dspid
is not valid.
Events
TRAUEVN_UNLOAD_DONE
When
trauUnload
executes successfully, the event
value
field contains:
CTA_REASON_FINISHED
The AG TRAU was successfully unloaded.
Details
This function disassociates the specified AG TRAU program from a
loadhd,
so that the program is no longer reserved for AG TRAU processing. The TRAU event
TRAUEVN_UNLOAD_DONE
is posted to the queue used by the load handle for this
dspid
. When
trauUnload
finishes, the DSP can be loaded with another AG TRAU program, but the associated
dspid
cannot
be reused.
A
TRAUEVN_UNLOAD_DONE
event is not returned until all channels attached to the AG TRAU program are disabled and detached. If the
trauUnload
mode
is set to
TRAU_UNLOAD_WAIT
, the application is responsible for detaching and disabling attached channels. When all channels are detached, the AG TRAU program is unloaded.
Applications can unload AG TRAU programs in one of the following modes:
Mode
Description
TRAU_UNLOAD_WAIT
Waits until all associated channels are disabled and detached before unloading the AG TRAU program.
TRAU_UNLOAD_IMMEDIATE
Automatically disables and detaches any associated channels and unloads the AG TRAU program.
TRAU_UNLOAD_CANCEL
If the AG TRAU service is waiting to unload a particular AG TRAU program (in
TRAU_UNLOAD_WAIT
mode
),
this cancels the
trauLoad
call. In other words, the program will not be unloaded
.
Note:
Applications may cancel incomplete
trauUnload
calls (i.e, calls with
mode
set to
TRAU_UNLOAD_WAIT,
but waiting for channels to be disabled) by invoking
trauUnload
for the same
dspid
with
mode
set to
TRAU_UNLOAD_CANCEL
. If the command is successful in cancelling the unload process, no
DONE
event will be returned.
When the
trauUnload
mode
is set to
TRAU_UNLOAD_IMMEDIATE
, all attached channels are immediately disabled and detached. A
TRAUEVN_DETACH_DONE
event is returned for each closed channel.
See Also
trauDetach
,
trauDisable
,
trauLoad
(Page 11 of 11 in this chapter)
Version
Want to send us feedback on our documentation? Email:
Tech_Pubs@nmss.com
Copyright © 2000, Natural MicroSystems, Inc. All rights reserved.