robertobucher / pysimCoder

Block diagram editor and real time code generator for Python
GNU General Public License v3.0
142 stars 31 forks source link

Option to get parameters names to C code #40

Closed michallenc closed 2 years ago

michallenc commented 2 years ago

This presents the option to get parameters names to C code. It consists of updating xblk file with the parameter type in format Name:value:type where type is optional. If type is not defined, the code in scene.py ignores it and does not assign the name to the parameter. The worst case scenario is the names would not be correctly assigned by the code should still be compiled and succesfully run. It should not brake older versions of blocks or the system.

Parameters names are stored in RCPblk class in realParNames and intParNames array. This gets them to RCPgen functions and they can be passed to C code from there (this would be added in further SHV commits).

This is intended mainly as a draft to allow further discussion and to be a reference for the meeting. cc @robertobucher @ppisa