Skip to content

SAFE-eV/transparenzsoftware

Repository files navigation

Introduction

The "transparenzsoftware" is used to verify metrology measurement data that has been generated by electric metering devices in EV charging stations. The metering device must comply with Measuring Instruments Directive 2014/32/EU (MID) and national laws (German: Eichrecht).

The common format for this data is OCMF. Please refer to safe-ev.de for further information.

Install and run

Be sure that maven is installed (this software was compiled/tested with maven 3.9.6) https://maven.apache.org/.

First, checkout the [https://github.com/SAFE-eV/SAFESealing](SAFESealing software) as a separate package and run

mvn clean install -DskipTests

Tests can be skipped, they may take a long time.

To package the transparenzsoftware application run:

mvn clean package

This will create an executable jar in the target folder transparenzsoftware.jar.

Run with:

java -jar target/transparenzsoftware.jar

A lot of sample OCMF files and other formats can be found in the src/test/resources directory.

Options

  • -v enables the logging
  • -cli runs it as cli app
  • -f <path> verifies the file runned in cli
  • -h prints help text

Development

In IntelliJ open the project as a maven project (choose the pom.xml file).

Krypto stuff for testing

Create a public key from the commandline:

openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:P-192  -pkeyopt ec_param_enc:named_curve
openssl openssl ecparam -name secp192r1 -out pvk_file.pem
openssl ec -in pvk_file.pem -pubout -out public_key_file.pem

Basic structure

The main entry point of the application is the App class. There is the static main function which does parameter parsing and initializing and starting the app.

The application has 4 major packages.

  • gui this holds the Java Swing classes for rendering the gui. The main entry point in this package is the TransparenzSoftwareMain class which holds, all the components and event listeners.
  • i18n holds a class wrapping the loading of translated strings
  • output contains classes for generating the resulting xml
  • verification contains the logic to load and verify all implemented formats