codetics-ocpp16
Every OCPP 1.6 (OCPP-J) message as plain Rust types, following the specification's type names and the
1.6-J errata 2025-04 (both Celcius and Celsius accepted, StopTransaction.reason optional):
serdemappings matching the message definitions (required fields, enumerations, no unknown fields);Validateimplementations for length, range, cardinality andmultipleOfconstraints, with violations mapped to the right OCPP-J error code;Actionwith message direction, and typed dispatch:StationCall(Charge Point → Central System) andCsmsCall(Central System → Charge Point).
use ;
let call = decode.unwrap;
let BootNotification = call else ;
assert_eq!;
// Reset is sent by the Central System, not by a Charge Point.
assert!;
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.