ADIC Server Server User Manual


 
4-8 DAS ACI Functions
601626-B
The cancel request cancels the command in the DAS server
and the AML. If the request is being acted upon in the AML,
DAS attempts to cancel it, however this is unlikely to succeed.
Once the robotics are in motion, the request may not be
canceled. DAS reports that the cancel was successful while the
canceled request completes.
For additional information, Refer to aci_list on page 4-84.
Return Values
0: The call was successful.
-1: The call failed.
The external variable d_errno is set to one of the following DAS
error codes:
ERPC
EINVALID
ENOREQ
EDASINT
ERETRYL
ECANCELED
EDASINT
ETIMEOUT
ESWITCHINPROG
EHICAPINUSE
See Figure 4-4 for an example of the aci_cancel function.
Figure 4-4 Example of the aci_cancel Function
/* Cancel first client request for a client */
int rc = 0;
char *pszthis_client = "clientname";
struct req_entry *prequest = NULL;
rc = aci_list( pszthis_client, prequest );
if( !rc )
{
rc = aci_cancel( prequest[0].request_id );
if( rc )
{
aci_perror( "Command failed:" );
}
}