| gclib 1.35.5 Communications API for Galil controllers and PLCs |

## ◆ GCmdT()

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 243 of file gclibo.c.

References G_NO_ERROR, and GCommand().

Referenced by commands(), GArrayUploadFile(), GRecordRate(), and motion_complete().