Skip to content

tzijnge/LotusRpc

Repository files navigation

LotusRPC 🌼

Automated build Code Smells Code style: Ruff linting: pylint

Quality gate

WARNING: This project is work in progress

LotusRPC is an RPC framework for embedded systems based on ETL. It generates C++ code with no dynamic memory allocations, no exceptions, no RTTI, etc. Code generator and client side CLI application in a simple Python package.

Installation

Install from PyPI with pip install lotusrpc

Basic usage

Installing the Python package installs the lrpcg tool on your system. This is the LotusRPC generator. It also installs the lrpcc tool on your system. This is the LotusRpc CLI client.

Your RPC interface is specified in a YAML file

File name: example.lrpc.yaml

services:
  - name: battery
    functions:
      - name: get
        params:
          - name: option
            type: "@VoltageScales"
        returns:
          - name: voltage
            type: double
enums:
  - name: VoltageScales
    fields:
        name: microvolts
        name: millivolts
        name: volts

Generate server side code by simply running this command

lrpcg cpp -d example.lrpc.yaml -o output-dir

Give the generated code a meaningful implementation and hook it up to a transport layer. Flash your embedded device. Then use lrpcc to communicate with your device and print the result to the console

lrpcc battery get microvolts

Documentation

Please find more detailed information on the LotusRPC documentation pages

About

RPC framework for embedded systems

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages