Metadata-Version: 2.4
Name: lotusrpc
Version: 0.9.7
Summary: A code generator for remote procedure calls on embedded systems
Author: T Zijnge
License: MIT License
        
        Copyright (c) 2022 tzijnge
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: homepage, https://github.com/tzijnge/LotusRpc
Project-URL: Bug Tracker, https://github.com/tzijnge/LotusRpc/issues
Project-URL: Documentation, https://tzijnge.github.io/LotusRpc/
Project-URL: Source Code, https://github.com/tzijnge/LotusRpc
Keywords: code generation,embedded systems,C++,RPC,remote procedure call
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: C++
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Software Development :: Embedded Systems
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: code-generation==2.3.0
Requires-Dist: pyyaml==6.0.2
Requires-Dist: jsonschema==4.25.0
Requires-Dist: click==8.3.0
Requires-Dist: typing-extensions==4.15.0
Requires-Dist: colorama==0.4.6
Provides-Extra: serial
Requires-Dist: pyserial==3.5; extra == "serial"
Dynamic: license-file

# LotusRPC 🌼

![Automated build](https://github.com/tzijnge/LotusRpc/actions/workflows/cmake.yml/badge.svg)

[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=tzijnge_LotusRpc&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=tzijnge_LotusRpc)

[![Quality gate](https://sonarcloud.io/api/project_badges/quality_gate?project=tzijnge_LotusRpc)](https://sonarcloud.io/summary/new_code?id=tzijnge_LotusRpc)

[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

> **_WARNING:_**  This project is work in progress

LotusRPC is an RPC framework for embedded systems based on [ETL](https://github.com/ETLCPP/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](https://pypi.org/project/lotusrpc/) 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_

``` 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](https://tzijnge.github.io/LotusRpc/)
