2 ''' Demonstrates various uses of
GCommand() And basic controller queries.
4 ''' <remarks>The first argument should be the IP Address of a
Galil controller.</remarks>
5 Module Commands_Example
10 ''' <returns>The success status Or
error code of the function.</returns>
11 ''' <remarks>The first argument should be the IP Address of a
Galil controller.</remarks>
12 Function
Main() As Integer
13 Dim rc As Integer =
Examples.GALIL_EXAMPLE_OK
14 Dim
gclib As Gclib = New Gclib()
15 Dim args() As String = Environment.GetCommandLineArgs()
17 If args.Count() <> 2 Then
18 Console.WriteLine("Incorrect number of arguments provided")
19 Console.WriteLine("Usage: commands_example.exe <ADDRESS>")
21 Console.Write(vbCrLf + "Press any key to close the example.")
26 Dim address As String = args(1)
38 Console.Write(vbCrLf + "Press any key to close the example.")
Provides a class of shared constants and methods for gclib's example projects.
Provides a class that binds to gclib's unmanaged dll. Wraps each call and provides a more user-friend...
GCLIB_DLL_EXPORTED GReturn GCALL GClose(GCon g)
Closes a connection to a Galil Controller.
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.
GCLIB_DLL_EXPORTED GReturn GCALL GOpen(GCStringIn address, GCon *g)
Open a connection to a Galil Controller.
GReturn commands(GCon g)
Demonstrates various uses of GCommand() and GUtility().
void error(GCon g, GReturn rc)
An example of error handling and debugging information.
int Commands(Gclib gclib)
Demonstrates various uses of GCommand() And basic controller queries.
void PrintError(Gclib gclib, Exception ex)
Prints the exception to the console And queries the controller for the most recent error message.