codetics-ocpp-core
Version-independent building blocks of OCPP-J, the JSON-over-WebSocket transport of OCPP 1.6, 2.0.1 and 2.1:
- RPC framing:
CALL,CALLRESULT,CALLERROR, and the OCPP 2.1CALLRESULTERRORandSENDmessage types; - RPC error codes, including the historic OCPP 1.6 spellings (
FormationViolation,OccurenceConstraintViolation); - version negotiation through the
Sec-WebSocket-Protocolsubprotocol (ocpp1.6,ocpp2.0.1,ocpp2.1); - an RFC 3339
DateTime, schema-constraint validation (Validate) and unique message ids.
use ;
use negotiate;
use ;
// The client lists versions by preference; the server picks the first acceptable one.
let = negotiate.unwrap;
assert_eq!;
match parse.unwrap
let err = new;
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.