background
in 1, we have a basic work flow of boost.python. in reality, the C++ project may have multi headers, where define many structs/classes, and include nested structs. here we give an simple example of nested struct/class.
api_header.hpp
|
|
aeb.hpp
|
|
for each of them, we can write a separate wrapp files.
api_wrapper.cpp
|
|
aeb_wrapper.cpp
|
|
compared to previous blog, we had def_readwrite()
to include the nested struct in aeb
python module, which is dynamic linked during python runtime, so which requires to import api_header
module first, then import aeb
module.
build && test
|
|
|
|
summary
this basic workflow is enough to package Matlab/Simulink ADAS models C++ code to Python test framework.