gclib
2.0.9
Communications API for Galil controllers and PLCs
Loading...
Searching...
No Matches
Remote_Server_Example.vb
Go to the documentation of this file.
1
'''
<
summary
>
2
'''
Demonstrates
various
uses
of
GPublishServer
().
3
'''
</
summary
>
4
'''
<
remarks
>
The
first
argument
is
optional
and
defines
the
name
to
publish
the
server
under
.</
remarks
>
5
Module
Remote_Server_Example
6
7
'''
<
summary
>
8
'''
Main
function
for
the
Remote
Server
example.
9
'''
</
summary
>
10
'''
<
returns
>
The
success
status
Or
error
code
of
the
function
.</
returns
>
11
'''
<
remarks
>
The
first
argument
is
optional
and
defines
the
name
to
publish
the
server
under
.</
remarks
>
12
Function
Main
()
As
Integer
13
Dim
rc
As
Integer
= Examples.GALIL_EXAMPLE_OK
14
Dim
args
()
As
String
=
Environment
.
GetCommandLineArgs
()
15
Try
16
Dim
server_name
As
String
17
18
If
args
.
Count
() <> 2
Then
19
Console
.
Write
("
Enter
Server
Name
: ")
20
server_name
=
Console
.
ReadLine
()
21
Else
22
server_name
=
args
(1)
23
End
If
24
25
rc
= Examples.Remote_Server(
server_name
)
26
Catch
ex
As
Exception
27
Console
.
WriteLine
(
ex
.Message)
28
rc
= Examples.GALIL_EXAMPLE_ERROR
29
End
Try
30
31
Console
.
Write
(
vbCrLf
+ "
Press
any
key
to
close
the
example.")
32
Console
.
ReadKey
()
33
34
Return
rc
35
End
Function
36
37
End
Module
GPublishServer
GCLIB_DLL_EXPORTED GReturn GCALL GPublishServer(GCStringIn name, GOption publish, GOption save)
Uses GUtility(), G_UTIL_GCAPS_PUBLISH_SERVER to publish local gcaps server to the local network.
Definition
gclibo.c:189
error
void error(GCon g, GReturn rc)
An example of error handling and debugging information.
Definition
examples.h:40
vector
GReturn vector(GCon g, char *file)
Puts controller into Vector Mode and accepts a file defining vector points.
Definition
vector.cpp:36
examples.Main
int Main()
Main function for the commands example.
examples
Definition
commands.cs:14
examples
vb
examples
examples
Remote_Server_Example.vb
Generated by
Galil Motion Control