#ocpp #client #client-connect #async #charge-point #ocpp16 #ocpp201

ocpp-client

OCPP Client Implementation. Use this library to implement an OCPP charge point

9 releases

0.1.8 Aug 2, 2024
0.1.7 Aug 1, 2024
0.1.3 Jul 31, 2024

#3 in #ocpp

Download history 622/week @ 2024-07-29 9/week @ 2024-08-05 2/week @ 2024-08-12 26/week @ 2024-09-16 26/week @ 2024-09-23 8/week @ 2024-09-30

291 downloads per month

MIT/Apache

89KB
1.5K SLoC

OCPP Client

Crates.io Documentation .github/workflows/ci.yaml

Overview

ocpp-client is a Rust library that provides an OCPP (Open Charge Point Protocol) client implementation. This library enables developers to integrate with central system (CSMS) that use the OCPP protocol, allowing for seamless communication and efficient.

Features

  • OCPP 1.6 and 2.0.1 support: Communicate with OCPP 1.6 or 2.0.1 JSON compliant servers (CSMS).
  • Async/Await support: Built using asynchronous Rust for high performance and scalability.
  • Customizable: Easily extendable to add custom message handlers or to support additional OCPP features.
  • Error Handling: Robust error handling and logging to assist in debugging and maintenance.
  • Comprehensive Documentation: Detailed documentation with examples to get you started quickly.

Installation

Add the following to your Cargo.toml:

[dependencies]
ocpp-client = "0.1"

Usage

Here's a simple example to get you started:

use ocpp_client::connect;

#[tokio::main]
async fn main() {
    let client = connect("wss://my-csms.com/CHARGER_IDENTITY").await?;
    
    match client {
        OCPP1_6(client) => {
            // Do 1.6 specific operations
        },
        OCPP2_0_1(client) => {
            // Do 2.0.1 specific operations
        },
    }
}

Documentation

The full documentation is available on docs.rs.

Examples

Check out the examples directory for more usage examples.

Contributing

Contributions are welcome! Please see the CONTRIBUTING.md for more details.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Dependencies

~19–31MB
~555K SLoC