GReturn GCALL GCmdT | ( | GCon | g, |
GCStringIn | command, | ||
GCStringOut | trimmed_response, | ||
GSize | response_len, | ||
GCStringOut * | front | ||
) |
Wrapper around GCommand that trims the response.
For use when the return value is desired, is ASCII (not binary), and the response should be trimmed of trailing colon, whitespace, and optionally leading space.
g | Connection's handle. |
command | Null-terminated command string to send to the controller. |
trimmed_response | The trimmed response from the controller. Trailing space is trimmed by null terminating any trailing spaces, carriage returns, or line feeds. |
response_len | The length of the trimmed_response buffer. |
front | If non-null, upon return *front will point to the first non-space character in trimmed_response. This allows trimming the front of the string without modifying the user's buffer pointer, which may be allocated on the heap. |
See x_gcommand.cpp for an example.
Definition at line 243 of file gclibo.c.
References G_NO_ERROR, GCommand(), and vector().
Referenced by commands(), GArrayUploadFile(), GRecordRate(), motion_complete(), x_gcommand(), x_ginterrupt(), x_gmotioncomplete(), and x_grecord().