for myself to answer at my need, i tried to create a tool helping at wrapper creating.
i started in VBS and with PSPad editor because PSPad is a freeware, it is a very good editor with multiples features but also because it is easy to extend with VBS or JS.
Installation :
How it is working :
First you have to load xxx.h file of arduino library in PSPad
After run this script in 4 steps:
don't hope it will do 100% of the work for a wrapper creation, but it should manage basic part and you can focus on complex cases.
update 2020/01/12
new version with less issues and able to manage creation of wrapper with or without backend, tocreate 3 loop in wrapper to monitor event in library and to launch a sub in B4R and to create also 3 callback from library when events from library are provided by callback.
the tool is based on a vbs script running in PSPad editor.
a guide can help at understanding of the tool
2 examples of libraries Test and TEST1 are available with B4R project to test the tool and to create/analyse all cases of interface between arduino library and B4R.
update 2021/01/21
update of TEST1 wrapper with an example of interface "get" and "set" with library arduino in case of enum and structure.
i started in VBS and with PSPad editor because PSPad is a freeware, it is a very good editor with multiples features but also because it is easy to extend with VBS or JS.
Installation :
- First solution: a new install
- Download PSPad , (freeware) and install it in c:\PSPad editor or another root area.
- Activate vbs scripts in PSPad parameters
- In PSPad parameters, Add PSPad at Windows 10 contextual menu, it will help at files loading
- Install this vbs script in PSPad editor\script\VBSscript (zip of this thread)
- In PSPAad menu, now you have « scripts » menu and under « recompile scripts » => run it
- After that, in script menu you have a sub-menu « B4R » and « Help »
- Second solution: download a full portable version PSPad with script installed and vbs helps.
And you can install it directly in c:\PSPad editor (or another root area)
How it is working :
First you have to load xxx.h file of arduino library in PSPad
After run this script in 4 steps:
- with h file arduino active, run "Creation of a file rxxx.h.clean file"
- you can check, modify the new file before next step
- with h.clean file active, run "Creation a rxxx.cpp file for B4R library"
- you can check, modify the new file before next step, or modify h.clean file if needed and run again process above
- with cpp file active, run "Creation of rxxx.h file for B4R library"
- you can check, modify the new file before next step, or modify h.clean file, or modify cpp file if needed and run again process above
- with h file active, run "Creation of rxxx.xml file for B4R library"
- you can check, modify the new file before next step, or modify h.clean file, or modify cpp file if needed and run again process above
- And when you think your library finished you can clean all comment lines and you can test it
don't hope it will do 100% of the work for a wrapper creation, but it should manage basic part and you can focus on complex cases.
update 2020/01/12
new version with less issues and able to manage creation of wrapper with or without backend, tocreate 3 loop in wrapper to monitor event in library and to launch a sub in B4R and to create also 3 callback from library when events from library are provided by callback.
the tool is based on a vbs script running in PSPad editor.
a guide can help at understanding of the tool
2 examples of libraries Test and TEST1 are available with B4R project to test the tool and to create/analyse all cases of interface between arduino library and B4R.
update 2021/01/21
update of TEST1 wrapper with an example of interface "get" and "set" with library arduino in case of enum and structure.
Attachments
Last edited: