| gclib 1.34.15 Communications API for Galil controllers and PLCs |

Remote_Server.cs
Go to the documentation of this file.
1
10 using System;
11
12 namespace examples
13 {
14 public static partial class Examples
15 {
31
32 public static int Remote_Server(string server_name)
33 {
34 gclib gclib = new gclib();
35
36 bool loop = true;
37
38 Console.WriteLine("<p> Publish this server to the network\n" +
39 "<r> Remove this server from the network\n" +
40 "<q> Quit");
41
42 while (loop)
43 {
44 switch (Console.ReadKey(true).Key)
45 {
46 case ConsoleKey.Q:
47 loop = false;
48 break;
49 case ConsoleKey.P:
50 gclib.GPublishServer(server_name, true, false);
51 Console.WriteLine("Published Server");
52 break;
53 case ConsoleKey.R:
54 gclib.GPublishServer(server_name, false, false);
55 Console.WriteLine("Removed Server");
56 break;
57 }
58 }
59
60 return GALIL_EXAMPLE_OK;
61 }
63 }
64 }
examples.Examples.GALIL_EXAMPLE_OK
const int GALIL_EXAMPLE_OK
Examples success code.
Definition: examples.cs:29
examples.Examples.Remote_Server
static int Remote_Server(string server_name)
Accepts user input to publish or remove local gcaps server from the network.
Definition: Remote_Server.cs:32
examples
Definition: commands.cs:14