Download PGRemote User`s Manual

Transcript
The Moving Pixel Company PGRemote User’s Manual – Doc. Rev. 1.34 -- 5/6/13
4 PGRemote RPC (Remote Procedure Calls)
To facilitate automated testing, PGRemote supports incoming RPC requests from other
applications via a Microsoft .NET TCP server port. This section describes details of the
communication interface, supported commands, and example client code provided with
installation of the PGRemote application. It is assumed that the user is conversant with
programming in the .NET environment or otherwise knowledgeable about interfacing
between his preferred programming environment (e.g. LabView) and .NET.
Before skipping this chapter entirely, please note that RPC commands can be embedded
in a text script file and run from the PGRemote GUI. In this case, no external
programming is required. You will find script files are a very powerful tool to configure
and control PGRemote. Please see section 4.4 for more details.
4.1 Using PGRemote as an RPC Server
To enable PGRemote as an RPC server, simply select the “Enable RPC” menu option in
the Connect menu. If this option is not already checked, a simple dialog will appear
requesting the port number to use for incoming RPC requests. You will need to use a
port number that is not already in use by your system and other applications. This
number should be between 1024 and 65525, though the top end of that range (greater
than 49152) is best as there are no registered ports. For more information, go to the
following link:
http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers
To disable PGRemote as an RPC server, uncheck the “Enable RPC” menu option.
When PGRemote is enabled as an RPC server, the user can interact with the GUI as
normal. In addition, RPC calls from other applications can interact with the application
as well, able to perform many of the functions programmatically that the user can
perform using the GUI.
Notes:
 Currently there is no access control to prevent multiple applications from
connecting and making RPC calls simultaneously to the PGRemote server even as
the user is using the application, which, of course, may cause confusing behavior.
 Where a user initiated action would normally elicit a message box on PGRemote,
usually a warning or a confirmation, the equivalent RPC call will not do so.
Instead, the operation proceeds as if the user had responded affirmative to the
message.
 RPC calls block until PGRemote has completed processing them. In some cases,
this can take many seconds, especially when reconfiguring the PG and probes or
sending a MIPI command, especially video frames. For client applications that
require a responsive interface, RPC calls should be made from a separate thread.
- Page 55 -