Python tool for code generation from CIM data model for several programming languages
$ sudo apt install python
$ pip3 install xmltodict chevron cmake
$ cmake -P .
This will build version CGMES_2.4.15_27JAN2020 in the subfolder with the same name.
If you wish to build an alternative version, you can see available options in the subfolder called cgmes_schema.
They can be built using a cmake variable:
$ cmake -DUSE_CIM_VERSION=CGMES_2.4.15_16FEB2016 -P .
$ docker build -t cimgen -f Dockerfile .
$ export OUTPUT_DIR=$(pwd)/CGMES_2.4.15_27JAN2020_cpp
$ export SCHEMA_DIR=$(pwd)/cgmes_schema/CGMES_2.4.15_27JAN2020
$ docker run -v ${OUTPUT_DIR}:/cgmes_output -v ${SCHEMA_DIR}:/cgmes_schema cimgen
$ sudo apt install python
$ pip3 install xmltodict chevron
$ export OUTPUT_DIR=$(pwd)/CGMES_2.4.15_27JAN2020_python
$ export SCHEMA_DIR=$(pwd)/cgmes_schema/CGMES_2.4.15_27JAN2020
$ ./build.py ${OUTPUT_DIR} ${SCHEMA_DIR} python
OUTPUT_DIR can be set to whichever absolute path you wish to create the files in.
If you wish to build an alternative version, you can see available options in the subfolder called cgmes_schema
$ docker build -t cimgen -f Dockerfile .
$ export OUTPUT_DIR=$(pwd)/CGMES_2.4.15_27JAN2020_python
$ export SCHEMA_DIR=$(pwd)/cgmes_schema/CGMES_2.4.15_27JAN2020
$ docker run -v ${OUTPUT_DIR}:/cgmes_output -v ${SCHEMA_DIR}:/cgmes_schema cimgen python