APIs, concepts, guides, and more
|
Create motion and IO applications over a network using gRPC: a high performance, open source universal RPC framework. If you are using C++ or C# on Windows or INtime operating systems, you should use RapidCode, not RapidCodeRemote.
In gRPC, a client application can directly call a method on a server application on a different machine as if it were a local object, making it easier for you to create distributed applications and services. As in many RPC systems, gRPC is based around the idea of defining a service, specifying the methods (RPCs) that can be called remotely with their parameters and return types. On the server side, the server implements this interface and runs a gRPC server to handle client calls. On the client side, the client provides the same methods as the server. (source)
There is one RPC for each RapidCode object. If you need to operate on more than one object of particular type at one time, you can use the Batch RPC. A common use case is where you might want to get the status of several Axis objects with one RPC. Use AxisBatch in that case.
RPC | Batch |
---|---|
MotionController | n |
Axis | y |
MultiAxis | y |
Network | n |
NetworkNode | y |
UserLimit | y |
Recorder | y |
RTOS | y |
Every RapidCodeRemote RPC follows a common pattern. Each request takes optional configuration settings or actions, and each response contains the latest configurations, action details, read-only infomation and the latest status.
For example, here is the MotionController RPC definition:
Responses contain all the types of data mentioned below. The data is read in the following order:
If there are connection issues with the RapidServer, gRPC clients will throw exceptions with gRPC error codes.
Assuming there are no high-level gRPC errors, all RapidCodeRemote RPCs will report errors in the header of each response. Users are required to check the errors field, which contains details about any RapidCode errors encountered during the RPC execution. RapidCodeRemote response header:
To perform an RPC, you will have to create a gRPC Channel to connect to a server listening for requests at a specific IP address and port. That channel can then be used to create a client (C#) or a stub (C++ and Python). The client or stub will contain all of the RPCs provided by the RMPService as defined in rapicode.proto.
Topics | |
Enums | |
RPCs | |
Sample Apps | |