A string containing the command to be sent.
A pointer to the buffer to receive the reply from the driver.
The length of the reply buffer in bytes.
The address of a string pointer. In case of error (non-zero return), the string pointer is set to the corresponding error description string. The error string is contained in a static buffer and remains valid only until the next API call. The parameter may be NULL if no error string is required.
The integer value 0 if the command exchange was successful, otherwise the following errors may be reported:
DR_API_STATUS_ERRORS
DR_API_IPC_ERRORSThis function sends an ASCII script command to the driver, returning the ASCII reply. You will need to interpret the response (see Driver Startup commands in the Device Driver for Hilscher Fieldbus Cards manual). This function provides an all-purpose interface to the driver and is required infrequently.
int result;
char data[1024];
char *error_str;
if (!(result = DR_ApCommand ("(apropos *)", data, 1024,
&error_str)))
printf (" Driver commands available:\n%s\n", data);
else
printf (" Error@ApCommand (%d, %s)\n",
result, error_str);