Processing block interface generator¶
The processing block interface generator tool can be used to start a new C++ processing block project and to generate the interfaces based on a YAML interface definition file. This section describes the usage of the tool.
Prerequisites¶
The tool is installed in the bin folder of the PMP installation as part of the installer sub-feature C++ toolchain of the feature *Control loop customization. The feature Control loop customization is not installed as part of a Typical setup. A Complete or Custom setup is required.
The generated project uses make to build the processing block binary files. GNU make is not included in the PMP installer and should be installed separately, also see Considerations.
Start project¶
Via the startproject command a new project is created for building a C++ processing block. The project name and directory need to be provided as argument. In order to create a new project run the processingblockinterfacegenerator tool with arguments:
- startproject¶
Start a new project
- DIR¶
Project directory
- NAME¶
Project name
This creates the initial project in the designated folder, which includes:
processingblock_NAME_interface.yaml
- The interface description file, see Processing block interface definition.processingblock_NAME.h
- header file for the custom processing block implementation.processingblock_NAME.cpp
- cpp file in which the Processing block methods can be implemented.mkFileVariables
- Makefile variables.Makefile
- build environment for building the processing block binary.Folders for all build targets.
Attention
Make sure the PMP_INSTALL_DIR
in mkFileVariables
is set to the bin directory of the PMP installation.
By default all supported build targets are generated:
bb-armv8a_64-release - ARM v8a based motion controllers (e.g. Arcas-5EG) and EtherCAT SubDevices.
bb-x86_64-release - x86 based motion controllers (e.g. Poseidon CFL).
linux-x86_64-release - Linux simulator.
windows-x86_64-debug - Windows simulator (processing block can be debugged on PMP simulator).
windows-x86_64-release - Windows simulator.
The folders for build targets that are not relevant can be deleted.
make is used to build all targets.
Generate¶
The generate command parses the processing block interface YAML and generates the processing block base class with the specified interfaces and other files required for the processing block binary. Run the processingblockinterfacegenerator tool with arguments:
- generate¶
Generate interface files in project
- DIR¶
Project directory
- NAME¶
Project name
This created the following files in the generated folder, which are necessary for creating the binary file:
processingblock_NAME_base.h
- header file for the processing block base class.processingblock_NAME_base.cpp
- the base class of the processing block.modelversion
- contains the version which can be read out after deployment.processingblock.xml
- contains all PMP object interfaces of the processing block.
These files should not be altered.
Note
The generate command is automatically called when building the processing block binary via the make command.