From OpenSCADAWiki
Jump to: navigation, search

The procedure of a new module creation based on the template with its inclusion to the sources tree is easier than such procedure for the external module and includes the following steps:

1. Getting the sources tree of the OpenSCADA project.
For a working branch:
$ svn co svn://
For a stable release branch (not desirable because only corrections are accepted for the stable LTS releases and the instruction demand 0.9 version and more):
$ svn co svn://
2. Copy the template directory with the "NewMod" name of the new module (for example, for the "DB" subsystem):
$ cd OpenSCADA/src/moduls/bd
$ cp -r =Tmpl= NewMod; cd NewMod
$ rm -f
3. Editing the "module.cpp" file.
Change the names of the functions of a module's including with the name of the new module:
"TModule::SAt bd_Tmpl_module( int n_mod )" — bd_NewMod_module
"TModule *bd_Tmpl_attach( const TModule::SAt &AtMod, const string &source )" — bd_NewMod_attach
Information about the module in the "module.cpp" file, namely the area: