The OpenDRIM Code Generator is a tool which generates code from CIM Schema definition. The installation of the OpenDRIM PCG is described here
Step 1: Write mof code (Aka mof code For Generating, the input of the PCG)
- As a convention we recommend to have one mof file for each CIM class you will define. This is also the convention which has been adopted by the DMTF recently.
- Each mof file should have the name of the class it defines: <classname>.mof.
- Then you MUST include all the mof code you wrote and that you want to be generated in one mof file (its name should be the name of the provider package and it is refer as the Top Level mof file. Please refer to the Linux Management Providers guidelines to understand to notion of provider package).
- Please refer to the mof code of the PACKAGENAME demonstration for a better understanding.
- This mof code is NOT meant to be compiled as it is. It is PCG input only and the PCG will generate the mof code required for installing the provider package FROM this mof code.
- We added PCG Internal Qualifiers to provide the PCG with specific settings.
- DS_Create_Delete, DS_Read_Write: see ''CMPI C++ Template''
- PTC_Create_Delete, PTC_ValueMap: see ''Provider Test Client Template''?
Step 2: Generate
- Create a new project in Eclipse to host the generated code
- C++ Makefile Project for CMPI C++ Provider code
- Java Project for Provider Test Client code
- Launch the OpenDRIM Provider Code Generator Wizard: File / New / Other, then select OpenDRIM / OpenDRIM Provider Code Generator and finally click Next.
- Select the ''CMPI C++ Template'' (to generate CMPI C++ Provider code) or the ''Provider Test Client Template''? (generate test routines written in Java).
- Enter the location of the mof code (the path to the Top Level mof file)
- Select the project into which the code will be generated from the 'Destination Project' list box.
- Enter the name of the package in the Module Name text field (default: name of the selected mof file)
- Enter the Namespace (default: root/cimv2)
- Enter Vendor Name (SHOULD be OpenDRIM)
- Enter the Author(s) Name (SHOULD be Name of the author, Name of the company, ex: Frederic Desmons, ETRI)
- Enter the E-mail Addresse(s) sperarated by comas (We recommend to give more than one address)
- Enter the Initial Version of the provider package (format: Major.Minor.Release)
- Click Finish
- Examples of generated code (CMPI C++ Provider and then Provider Test Client):
Attachments
- Usage-Code_Generator-1-20071016.jpg (36.6 kB) - added by desmons on 10/16/07 13:32:52.
- Usage-Code_Generator-2-20071016.jpg (35.1 kB) - added by desmons on 10/16/07 14:20:03.
- Usage-Code_Generator-3-20071016.jpg (96.9 kB) - added by desmons on 10/16/07 14:20:12.
- Usage-Code_Generator-4-20071016.jpg (45.7 kB) - added by desmons on 10/16/07 14:20:21.
- Usage-Code_Generator-5-20071016.jpg (37.8 kB) - added by desmons on 10/16/07 14:20:30.
- Usage-Code_Generator-6-20071016.jpg (71.9 kB) - added by desmons on 10/16/07 14:20:38.
- Usage-Code_Generator-7-20071016.jpg (77.0 kB) - added by desmons on 10/16/07 14:20:47.







