◆ config()
int gs::LuaFile_Tool::config |
( |
cci::cci_broker_handle |
a_broker, |
|
|
const char * |
a_config_file, |
|
|
char * |
a_images_dir = NULL |
|
) |
| |
Makes the configuration.
Configure parameters from a lua file.
May be called several times with several configuration files
Example usage:
- Parameters
-
a_broker | cci brocker handle |
a_config_file | lua config file |
a_lua_globalvars | global variables that needs to be set on the lua config |
a_images_dir | directory including software images. |
To set lua global variables set_g_vars_from_cmdline() can be called here: set_g_vars_from_cmdline(L, a_lua_globalvars);
◆ set_g_vars_from_cmdline()
void gs::LuaFile_Tool::set_g_vars_from_cmdline |
( |
lua_State * |
L, |
|
|
const key_val_args & |
a_lua_globalvars |
|
) |
| |
|
protected |
set global variables passed from command line arguments using -D | –define_luagvar
accepts only these data types: booleans, numbers and strings
- Parameters
-
L | lua_State* |
a_lua_globalvars | std::vector of std::pairs of lua passed global variables. |
◆ setParamsFromLuaTable()
int gs::LuaFile_Tool::setParamsFromLuaTable |
( |
cci::cci_broker_handle |
a_broker, |
|
|
lua_State * |
L, |
|
|
int |
t, |
|
|
char * |
level = NULL |
|
) |
| |
|
protected |
Traverse a Lua table setting global variables as parameters (recursive)
- Parameters
-
L | Lua state |
t | Lua index |
level | (only for recursion) parameter name prefixed |
- Returns
- number of elements if lua array or error if negative
The documentation for this class was generated from the following files:
- systemc-components/common/include/luafile_tool.h
- systemc-components/common/src/luautils.cc