1*61c4878aSAndroid Build Coastguard Worker.. _module-pw_rpc-libraries: 2*61c4878aSAndroid Build Coastguard Worker 3*61c4878aSAndroid Build Coastguard Worker====================================== 4*61c4878aSAndroid Build Coastguard WorkerClient, server, and protobuf libraries 5*61c4878aSAndroid Build Coastguard Worker====================================== 6*61c4878aSAndroid Build Coastguard Worker.. pigweed-module-subpage:: 7*61c4878aSAndroid Build Coastguard Worker :name: pw_rpc 8*61c4878aSAndroid Build Coastguard Worker 9*61c4878aSAndroid Build Coastguard Worker.. grid:: 1 10*61c4878aSAndroid Build Coastguard Worker 11*61c4878aSAndroid Build Coastguard Worker .. grid-item-card:: :octicon:`code-square` C++ server and client 12*61c4878aSAndroid Build Coastguard Worker :link: module-pw_rpc-cpp 13*61c4878aSAndroid Build Coastguard Worker :link-type: ref 14*61c4878aSAndroid Build Coastguard Worker :class-item: sales-pitch-cta-primary 15*61c4878aSAndroid Build Coastguard Worker 16*61c4878aSAndroid Build Coastguard Worker C++ server and client library API guides. Server, client, and 17*61c4878aSAndroid Build Coastguard Worker server/client libraries are available. Sharing code between 18*61c4878aSAndroid Build Coastguard Worker servers and clients is possible. RPC calls are represented through 19*61c4878aSAndroid Build Coastguard Worker a call class; both servers and clients use the same base call class. 20*61c4878aSAndroid Build Coastguard Worker RPCs can be invoked asynchronously through callbacks or synchronously 21*61c4878aSAndroid Build Coastguard Worker through a blocking API. RPC calls can be introspected to obtain 22*61c4878aSAndroid Build Coastguard Worker information that was generated during compilation. 23*61c4878aSAndroid Build Coastguard Worker 24*61c4878aSAndroid Build Coastguard Worker.. grid:: 2 25*61c4878aSAndroid Build Coastguard Worker 26*61c4878aSAndroid Build Coastguard Worker .. grid-item-card:: :octicon:`code-square` Python client 27*61c4878aSAndroid Build Coastguard Worker :link: module-pw_rpc-py 28*61c4878aSAndroid Build Coastguard Worker :link-type: ref 29*61c4878aSAndroid Build Coastguard Worker :class-item: sales-pitch-cta-secondary 30*61c4878aSAndroid Build Coastguard Worker 31*61c4878aSAndroid Build Coastguard Worker Python client library API reference. The Python client can 32*61c4878aSAndroid Build Coastguard Worker send requests and handle responses for a set of channels. 33*61c4878aSAndroid Build Coastguard Worker The callback-based API supports invoking RPCs asynchronously. 34*61c4878aSAndroid Build Coastguard Worker There's also an utilities API for extending ``pw_console`` to 35*61c4878aSAndroid Build Coastguard Worker interact with RPCs. 36*61c4878aSAndroid Build Coastguard Worker 37*61c4878aSAndroid Build Coastguard Worker .. grid-item-card:: :octicon:`code-square` TypeScript client 38*61c4878aSAndroid Build Coastguard Worker :link: module-pw_rpc-ts 39*61c4878aSAndroid Build Coastguard Worker :link-type: ref 40*61c4878aSAndroid Build Coastguard Worker :class-item: sales-pitch-cta-secondary 41*61c4878aSAndroid Build Coastguard Worker 42*61c4878aSAndroid Build Coastguard Worker TypeScript client library API guide. Unary-streaming, server-streaming, 43*61c4878aSAndroid Build Coastguard Worker client-streaming, and bi-directional streaming are supported. 44*61c4878aSAndroid Build Coastguard Worker RPCs can be invoked asynchronously through callbacks or 45*61c4878aSAndroid Build Coastguard Worker synchronously through promises. 46*61c4878aSAndroid Build Coastguard Worker 47*61c4878aSAndroid Build Coastguard Worker.. grid:: 2 48*61c4878aSAndroid Build Coastguard Worker 49*61c4878aSAndroid Build Coastguard Worker .. grid-item-card:: :octicon:`code-square` Nanopb codegen 50*61c4878aSAndroid Build Coastguard Worker :link: module-pw_rpc_nanopb 51*61c4878aSAndroid Build Coastguard Worker :link-type: ref 52*61c4878aSAndroid Build Coastguard Worker :class-item: sales-pitch-cta-secondary 53*61c4878aSAndroid Build Coastguard Worker 54*61c4878aSAndroid Build Coastguard Worker Nanopb codegen library API guide. Generates services which 55*61c4878aSAndroid Build Coastguard Worker encode and decode RPC requests and responses as Nanopb message 56*61c4878aSAndroid Build Coastguard Worker structs. 57*61c4878aSAndroid Build Coastguard Worker 58*61c4878aSAndroid Build Coastguard Worker .. grid-item-card:: :octicon:`code-square` pw_protobuf codegen 59*61c4878aSAndroid Build Coastguard Worker :link: module-pw_rpc_pw_protobuf 60*61c4878aSAndroid Build Coastguard Worker :link-type: ref 61*61c4878aSAndroid Build Coastguard Worker :class-item: sales-pitch-cta-secondary 62*61c4878aSAndroid Build Coastguard Worker 63*61c4878aSAndroid Build Coastguard Worker ``pw_protobuf`` codegen library API guide. Generates services which 64*61c4878aSAndroid Build Coastguard Worker encode and decode RPC requests and responses as ``pw_protobuf`` 65*61c4878aSAndroid Build Coastguard Worker message structs. 66*61c4878aSAndroid Build Coastguard Worker 67*61c4878aSAndroid Build Coastguard Worker.. toctree:: 68*61c4878aSAndroid Build Coastguard Worker :maxdepth: 1 69*61c4878aSAndroid Build Coastguard Worker :hidden: 70*61c4878aSAndroid Build Coastguard Worker 71*61c4878aSAndroid Build Coastguard Worker C++ server and client <cpp> 72*61c4878aSAndroid Build Coastguard Worker Python client <py/docs> 73*61c4878aSAndroid Build Coastguard Worker TypeScript client <ts/docs> 74*61c4878aSAndroid Build Coastguard Worker Nanopb codegen <nanopb/docs> 75*61c4878aSAndroid Build Coastguard Worker pw_protobuf codegen <pwpb/docs> 76