codetics-ocpp201
Every OCPP 2.0.1 (Edition 4) message as plain Rust types. Type names are the specification datatype names
without their Type suffix (ChargingProfileType → ChargingProfile).
serdemappings matching the message definitions;customDataextensions are preserved;Validateimplementations for length, range and cardinality constraints, with violations mapped to OCPP-J error codes;Actionwith message direction, and typed dispatch:StationCall(Charging Station → CSMS) andCsmsCall(CSMS → Charging Station).
use StationCall;
let p = r#"{"reason":"PowerUp","chargingStation":{"model":"SingleSocketCharger","vendorName":"VendorX"}}"#;
let BootNotification = decode.unwrap else ;
assert_eq!;
Part of Codetics OCPP
This crate belongs to Codetics OCPP, a complete OCPP 1.6J / 2.0.1 / 2.1 implementation in Rust written by Kevin Vavelin (Codetics). It can be used as is; contributions are welcome.
License and credit
Licensed under the Apache License, Version 2.0.
Copyright 2026 Kevin Vavelin, Codetics. Any redistribution of this crate or of a work derived from it (including forks and products embedding it) must keep the copyright notice and include the NOTICE file crediting Kevin Vavelin / Codetics as the origin of the work.