Commit 7f74b6da authored by Maxime Perrotin's avatar Maxime Perrotin

Add user-defined properties to iv.py

parent 499c844e
...@@ -40,7 +40,8 @@ void Generate_Python_AST(System *s, char *dest_directory, char *output_name) ...@@ -40,7 +40,8 @@ void Generate_Python_AST(System *s, char *dest_directory, char *output_name)
" 'language': %s,\n" " 'language': %s,\n"
" 'zipfile': '%s',\n" " 'zipfile': '%s',\n"
" 'interfaces': {},\n" " 'interfaces': {},\n"
" 'functional_states' : {}\n" " 'functional_states' : {},\n"
" 'aadl_properties' : {}\n"
"}", "}",
fv->name, fv->name,
fv->nameWithCase, fv->nameWithCase,
...@@ -68,7 +69,16 @@ void Generate_Python_AST(System *s, char *dest_directory, char *output_name) ...@@ -68,7 +69,16 @@ void Generate_Python_AST(System *s, char *dest_directory, char *output_name)
cp->type.asn1_filename cp->type.asn1_filename
); );
} }
}); });
/* Add user defined properties such as FPGA_Configuration */
FOREACH(prop, AADL_Property, fv->properties, {
fprintf (py,
"\n\nfunctions['%s']['aadl_properties']['%s'] = '%s'\n",
fv->name,
prop->name,
prop->value);
});
FOREACH(i, Interface, fv->interfaces, { FOREACH(i, Interface, fv->interfaces, {
fprintf (py, fprintf (py,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment