| gclib 450 Communications API for Galil controllers and PLCs |

## ◆ GCmdT()

GCLIB_DLL_EXPORTED 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.

Parameters

  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.

Returns
  The success status or error code of the function. See gclib_errors.h for possible values.

See x_gcommand.cpp for an example.

Definition at line 116 of file gclibo.c.

References G_NO_ERROR, and GCommand().

Referenced by GArrayUploadFile(), and GRecordRate().