Skip to content

aasanchez/ocpp16messages

Repository files navigation

OCPP 1.6 Messages for Go

Go Reference Ask DeepWiki codecov Go Report Card Quality Gate Status Bugs Code Smells Duplicated Lines (%)


Overview

This project provides a robust, modular implementation of OCPP 1.6 message types and payload validation for Go. It supports high-quality message serialization, validation, and extensibility for OCPP-compliant EV charging station management.

Features

  • A growing set of OCPP 1.6 message types.
  • Strict type definitions and validation for all payloads.
  • Extensive unit and example tests for correctness.
  • Benchmark suite for key serialization and validation routines.
  • Idiomatic Go, clear error handling and modular package structure.
  • Tooling for linting, formatting, and static analysis.

Project Structure

The project is organized by message type, with shared utilities in a separate package.

  • messages/authorize: Handles authorization requests and confirmations.
  • messages/bootnotification: Manages boot notifications from charging stations.
  • messages/cancelreservation: Implements the cancellation of reservations.
  • shared/types: Contains common data types (e.g., for strings and datetimes) used across all messages.

Getting Started

Install dependencies and run all tests:

go mod tidy
make test

Run benchmarks:

make benchmark

Lint and format the code:

make lint
make format

Contributing

  • Ensure full test and benchmark coverage for new logic.
  • Use idiomatic Go and document public types/functions.
  • Follow the project's code style and conventions.

License

See LICENSE