gclib 2.0.9
Communications API for Galil controllers and PLCs
 
Loading...
Searching...
No Matches
remote_server_example.cs
Go to the documentation of this file.
1
11using System;
12using System.Linq;
13
14namespace examples
15{
23
25 {
32 public static int Main(string[] args)
33 {
35
36 try
37 {
38 string server_name;
39
40 if (args.Count() < 1)
41 {
42 Console.Write("Enter server name: ");
43 server_name = Console.ReadLine();
44 }
45 else
46 {
47 server_name = args[0];
48 }
49
51 }
52 catch (Exception ex)
53 {
54 Console.WriteLine(ex.Message);
56 }
57
58 Console.Write("\nPress any key to close the example");
59 Console.ReadKey();
60
61 return rc;
62 }
63 }
65}
const int GALIL_EXAMPLE_OK
Examples success code.
Definition examples.cs:29
const int GALIL_EXAMPLE_ERROR
Examples error code.
Definition examples.cs:30
Provides a class of shared constants and methods for gclib's example projects.
Definition commands.cs:16
static int Main(string[] args)
Main function for the Remote Server example.
Demonstrates various uses of GPublishServer()
GReturn vector(GCon g, char *file)
Puts controller into Vector Mode and accepts a file defining vector points.
Definition vector.cpp:36
static int Remote_Server(string server_name)
Accepts user input to publish or remove local gcaps server from the network.