• Home
  • Raw
  • Download

Lines Matching refs:RPC

27 Creating an RPC
30 1. RPC service declaration
100 2. RPC code generation
116 For example, the generated RPC header for ``"foo_bar/the_service.proto"`` is
120 The generated header defines a base class for each RPC service declared in the
126 3. RPC service definition
128 The serivce class is implemented by inheriting from the generated RPC service
129 base class and defining a method for each RPC. The methods must match the name
135 The generated code includes RPC service implementation stubs. You can
141 #. Locate the generated RPC header in the build directory. For example:
147 #. Scroll to the bottom of the generated RPC header.
202 This example code sets up an RPC server with an :ref:`HDLC<module-pw_hdlc>`
244 application-layer routes used to tell the RPC system where a packet should go.
317 Pigweed RPC servers and clients communicate using ``pw_rpc`` packets. These
323 Pigweed RPC packets consist of a type and a set of fields. The packets are
331 The packet type and RPC type determine which fields are present in a Pigweed RPC
340 | REQUEST | RPC request |
383 it did not request. If the RPC is a streaming RPC, the server should abort it.
388 server: aborting the RPC.
400 | RESPONSE | RPC response |
411 | SERVER_STREAM_END | Server stream and RPC finished |
433 process. The client should abort any RPC for which it receives an error. The
437 * ``FAILED_PRECONDITION`` -- Attempted to cancel an RPC that is not pending.
440 * ``INTERNAL`` -- The server was unable to respond to an RPC due to an
445 Calling an RPC requires a specific sequence of packets. This section describes
449 Unary RPC
451 In a unary RPC, the client sends a single request and the server sends a single
471 Server streaming RPC
473 In a server streaming RPC, the client sends a single request and the server
500 ``CANCEL_SERVER_STREAM`` packet to terminate the RPC.
531 Client streaming RPC
533 In a client streaming RPC, the client sends any number of RPC requests followed
536 The first client-to-server RPC packet does not include a payload.
571 The server may terminate a client streaming RPC at any time by sending its
597 Bidirectional streaming RPC
599 In a bidirectional streaming RPC, the client sends any number of requests and
605 The first client-to-server RPC packet does not include a payload.
645 rightnote = "PacketType.RPC\nchannel ID\nservice ID\nmethod ID\npayload"
654 The server may terminate the RPC at any time by sending a ``SERVER_STREAM_END``
656 client may cancel the RPC at any time by sending a ``CANCEL_SERVER_STREAM``
667 leftnote = "PacketType.RPC\nchannel ID\nservice ID\nmethod ID"
673 leftnote = "PacketType.RPC\nchannel ID\nservice ID\nmethod ID\npayload"
679 rightnote = "PacketType.RPC\nchannel ID\nservice ID\nmethod ID\npayload"
694 RPC server
704 The following size report showcases the memory usage of the core RPC server. It
713 RPC server implementation
718 The RPC Server depends on the ``pw::rpc::internal::Method`` class. ``Method``
720 RPC functions. Each supported protobuf implementation extends ``Method`` to
785 RPC client
787 The RPC client is used to send requests to a server and manages the contexts of
796 To send incoming RPC packets from the transport layer to be processed by a
811 // Called when the transport layer receives an RPC packet.
818 Making RPC calls
820 RPC calls are not made directly through the client, but using one of its
822 file for each selected protobuf library, which is then used to send RPC requests
830 This object tracks the ongoing RPC call, and can be used to manage it. An RPC
842 ``ClientCall`` stores the context of an active RPC, and serves as the user's
843 interface to the RPC client. The core RPC library provides a base ``ClientCall``
844 class with common functionality, which is then extended for RPC client
848 The RPC server stores a list of all of active ``ClientCall`` objects. When an
859 an RPC client and server with the same set of channels.