VAT
3.0
Video Analysis Tool
|
To create a module and to allow the application to recognize this module, there's some rules of development and registration that should be followed. As an example of module creation, here are the steps for a simple module.
Create a new class at MODULES directory. This class should inherit from ModuleInterface class and implement some virtual methods. Here is an example of a Module class with those methods to implement:
As you can see, This class has public inheritance from ModuleInterface. This interface comes with the methods: setParameters, init, run and updateParameters. The purpose of Constructor and each one of these methods are shown below:
m_data
in this constructor. To do this, you can implement constructor in this way (in NewModule.cpp file): The created class must be registrated. To do this, It's necesary to add the following lines at modules.cpp file:
A module configuration node must be created. This configuration is, by default, at config/default_config.xml file. As an example of node to add:
In this example we are supposing that the module "NewModule" needs configuration for typeOfCamera
as "LocalCamera" and for this camera is a parameter devideID
with value "0".