(Page 3 of 13 in this chapter)
TxApiGetRsp
Description
- Enters a polling loop waiting (for up to 3 seconds) for a response to a specified TX API request packet (cpi_get_data).
Prototype
- short TxApiGetRsp (TXAPIHNDL *handle,
TXMNGPKT *req,
TXMNGPKT *rsp )
- handle TX API Management handle (from previous TxApiOpen).
- req Packet used for previous TxApiSendReq for which the response is expected.
- rsp Packet to hold response.
Return Values
- TX API completion code or CP KERNEL completion code.
Details
- Whenever TxApiSendReq is used to issue a request, a unique identifier is assigned to the request. This value is placed in pktuskey of the IO packet area in the request, overwriting any value placed there by the application.
- TxApiGetRsp polls for any response. If no response is received within the polling interval, TXAPI_NO_RESPONSE is returned. If a response is received that is not the response associated with the given request, that response is ignored. Once the expected response is received, TxApiGetRsp returns TXAPI_SUCCESS.
- For applications that do not wish to ignore unexpected packets (received over the dual port RAM while polling for the expected response), TxApiGetRsp should not be used. These applications should perform their own polling (via the CPI handle provided in the TX API HANDLE structure). Determination of a response match can be performed by comparing pktuskey values (in the IO packet area of the request and response).
See Also
- TxApiSendReq
(Page 3 of 13 in this chapter)
tech_support@nmss.com
Copyright © 1998, Natural MicroSystems, Inc. All rights
reserved.