GCLIB_DLL_EXPORTED GReturn GCALL GCommand | ( | GCon | g, |
GCStringIn | command, | ||
GBufOut | buffer, | ||
GSize | buffer_len, | ||
GSize * | bytes_returned | ||
) |
Performs a command-and-response transaction on the connection.
g | Connection's handle. |
command | Null-terminated command string to send to the controller. The library will append a carriage return to the command string. |
buffer | Buffer for the response. Will be filled with the response from the controller. The data will be null terminated unless the function returns G_BAD_LOST_DATA due to the buffer being too small to hold the data. |
buffer_len | The size of the response buffer. |
bytes_returned | The size of the data returned from the controller. This does not include null termination. This argument may be null if the value is not desired. |
See x_gcommand.cpp for an example.