gRPC and Protocol Buffers
The GRX API is defined using Protocol Buffers
(.proto files) and served via gRPC. This section
explains how to get started with these technologies and provides the protocol
definitions for download.
How gRPC Works
gRPC uses Protocol Buffer definitions to describe services (remote methods) and
messages (data structures). From a .proto file, the protoc compiler
generates language-specific client code that handles serialization, networking,
and RPC mechanics.
Two types of RPC methods are used in the GRX API:
Unary RPCs: Single request, single response (e.g.,
GetStateVectors).Server-side streaming RPCs: Single request, continuous stream of responses (e.g.,
GetModeSDownlinkFrames). The stream remains open until cancelled by the client or the server shuts down.
Generating Language Bindings
The basic workflow is the same for all languages:
Install the Protocol Buffer compiler (
protoc) and the gRPC plugin for your language.Download the
.protofiles from the links below.Keep all downloaded GRX
.protofiles in one directory so imports such asCommon.protocan be resolved.Run
protocto generate bindings into the directory your application will compile or import from.
Language-specific instructions are provided in the Python, Java, and C++ guides.
Protocol Buffer Definitions
Download the .proto files for the GRX API:
Common.proto– Shared types (Bandenum,RadioIdentification)Receiverd.proto– Receiver API (port 5303)Monitord.proto– Monitoring API (port 5305)Spectrumd.proto– Spectrum API (port 5306)Samplestreamingd.proto– Sample Streaming API (port 5308)TunableChanneld.proto– Tunable Channel API (port 5309)
Note
The proto files contain extensive comments documenting each message, field, enum value, and RPC method. Refer to these comments for detailed information about units, value ranges, and semantics.