APIs, concepts, guides, and more
rapidserver

A command-line utility that enables access to the RMP from any operating system via Remote Procedure Call (RPC) using gRPC. It serves as a backend service for RapidCodeRemote, allowing remote interaction with the RMP Motion Controller.

rapidserver command-line tool

๐Ÿ”น Platforms

OS Executable
Windows rapidserver.exe
Linux rapidserver

๐Ÿ”น Starting a rapidserver Instance (Windows)

  • RapidSetupX

    Note: Launch feature only available in RapidSetupX 11.0.1 and above

    To start a local RapidServer that will be managed by RapidSetupX, use the following procedure:

    1. Launch RapidSetupX
    2. On the Servers page, find the Current RapidServer card
    3. If no RapidServer executable is found, use Browse to select one
    4. Use the "Launch" button to start and connect to a RapidServer

  • rapidserver.exe

    To start an independent local RapidServer, use the following procedure:

    1. Navigate to your RMP installation folder (e.g., C:\RSI\X.X.X)
    2. Find the file labeled rapidserver.exe and double click to run it
    3. In the new window verify that the "status" field says running & discoverable
    4. Take note of the numbers listed in the "server ip" and "grpc port" fields for future use

๐Ÿ”น Starting a rapidserver Instance (Linux)

When you install the RMP Debian package, the rapidserver systemd service is automatically enabled and started. You can manage it using standard systemctl commands:

Command Description
sudo systemctl status rapidserver Check if rapidserver is running
sudo systemctl start rapidserver Start the service
sudo systemctl stop rapidserver Stop the service
sudo systemctl restart rapidserver Restart the service
sudo systemctl enable rapidserver Enable auto-start on boot
sudo systemctl disable rapidserver Disable auto-start on boot

The service runs from /rsi/rapidserver and uses /rsi as its working directory.

To view the service logs:

journalctl -u rapidserver -f

๐Ÿ”น Windows Service

rapidserver can be installed as a Windows service so it starts automatically with the system.

Command Description
rapidserver --install Install as a Windows service then exit.
sc start RapidServer-50061 Start the service.
sc stop RapidServer-50061 Stop the service.
rapidserver --uninstall Uninstall the Windows service then exit.

The default service name is RapidServer-50061. Logs are written to the Windows Event Log under the source RapidServer-50061.

All install and uninstall commands require an elevated (Administrator) prompt.

๐Ÿ”น Which rapidserver Should I Connect To?

When a tool like RapidSetupX allows you to connect to multiple rapidservers:

  • On Windows, the IP address should match the one shown when starting your rapidserver (see above).
  • On Linux, the IP should match your device's loopback IP (e.g., 127.0.1.1).

๐Ÿ”น Local Connections (IPC)

In addition to TCP, rapidserver listens on a local IPC (Inter-Process Communication) endpoint. IPC bypasses the network stack entirely, providing lower latency when a client like RapidSetupX runs on the same machine as rapidserver.

Platform IPC Endpoint
Windows Named pipe at \\.\pipe\rapidserver-50061
Linux Unix domain socket at /tmp/rapidserver-50061.sock

The ipc: line in the startup banner shows the active path. Clients that support IPC can connect to this endpoint instead of http://localhost:50061 for lower latency.

๐Ÿ”น Usage

To interact with a rapidserver instance, users need the following:

  1. .proto files for the desired services, along with the Protoc compiler.
  2. The IP address of the server.
  3. The port number the server is listening on.

Once the .proto files are available, users can compile them using the Protocol Buffer compiler (protoc) to generate client code in their preferred programming language. This generated code enables:

  • Creating a gRPC channel using the serverโ€™s IP address and port number.
  • Initializing a client for each available service.
  • Making RPC calls to communicate with the rapidserver.

By establishing a gRPC connection, users can seamlessly interact with RapidCodeRemote and other services exposed by rapidserver.

๐Ÿ”น Command Line Arguments

Argument Description
-address IP address the server binds to.
-grpc_port TCP port number for gRPC calls.
-name Friendly name for the server.
-echo Echo request messages in the response header.
--log-level Log level: trace, debug, info, warn, error, critical, off.
--version Show version information.
-h, --help Show help and usage information.

Windows-only arguments:

Argument Description
--service Run as a Windows service under SCM.
--install Install as a Windows service then exit.
--uninstall Uninstall the Windows service then exit.