EasyManua.ls Logo

SMH Technologies FlashRunner Cube Series - Execommand()

SMH Technologies FlashRunner Cube Series
68 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
FR CUBE API
5
46
FR_ExeCommand()
Prototype
FR_COMM_ERR WINAPI FR_ExeCommandA (FR_COMM_HANDLE handle, const
char *command, char *answer, unsigned long maxlen, unsigned long timeout_ms,
FR_ANSWER_TYPE *type);
FR_COMM_ERR WINAPI FR_ExeCommandW (FR_COMM_HANDLE handle, const
wchar_t *command, wchar_t *answer, unsigned long maxlen, unsigned long timeout_
ms, FR_ANSWER_TYPE *type);
Description
Executes a FR CUBE command. This function automatically sends a
command to the instrument and returns the answer read back from the
instrument. This function combines the FR_SendFrame() and FR_GetFrame()
function in a single call.
Return Value
0 The function call was successful.
!=0 The function call was unsuccessful.
Call the FR_GetLastErrorMessage() function to get error
information.
Parameters
handle Communication handle returned by the
FR_OpenCommPort() function.
command A valid FR CUBE command.
answer The answer read back from the instrument in response
to the command sent.
maxlen Maximum length, in characters, of the answer buffer.
timeout_ms Time (in milliseconds) before the function times out.
type Type of answer received: can be:
FR_ANSWER_ACK (an OK frame was received);
FR_ANSWER_NACK (an ERR frame was received);
FR_ANSWER_TOUT (command timed out before an
answer could be received).
http://smh-tech.com.cn sales@smh-tech.com.cn +86-15250087885