Functions | |
bool | fwHw_saveScript (string pScriptName, string pScript="") |
bool | fwHw_removeScript (string pScriptName) |
bool | fwHw_getScripts (dyn_dyn_string &pScriptsList) |
bool | fwHw_executeScript (string pScriptName, dyn_string pParametersList=makeDynString()) |
bool | fwHw_generateScript (string pHardwareType, dyn_string &pScript) |
bool fwHw_executeScript | ( | string | pScriptName, | |
dyn_string | pParametersList = makeDynString() | |||
) |
This function executes the specified script.
[in] | pScriptName | name of the script to be executed. |
[in] | pParametersList | list of parameters to be passed to the main function of the script. Note: this parameter is optional (if not specified, then an empty parameters list will be passed). |
false error found.
(...) if (fwHw_executeScript("myScript")) // execute the script 'myScript' with no parameters (...) else DebugTN("Error found!"); (...)
bool fwHw_generateScript | ( | string | pHardwareType, | |
dyn_string & | pScript | |||
) |
This function generates a script for the specified hardware type (i.e. generates a script that can create the specified hardware type (including all the registers, the "inserted" hardwares and the default common/specific settings, belonging to that hardware type)).
[in] | pHardwareType | name of the hardware type that will be used to generate the script. |
[in] | pScript | list containing the generated script. |
false error found.
(...) dyn_string myScript; int i; if (fwHw_generateScript("Beetle", myScript)) // generate the script for hardware type 'Beetle' { DebugTN("Generated script:"); for(i = 1; i <= dynlen(myScript); i++) DebugTN(myScript[i]); // display script line } else DebugTN("Error found!"); (...)
bool fwHw_getScripts | ( | dyn_dyn_string & | pScriptsList | ) |
Get a list with the existing scripts.
[out] | pScriptsList | returned list containing the scripts. |
false error found.
(...) dyn_dyn_string myList; int i; if (fwHw_getScripts(myList)) // get a list of the existing scripts { DebugTN("Existing scripts: " + dynlen(myList)); // display number of existing scripts for(i = 1; i <= dynlen(myList); i++) { DebugTN("Name : " + myList[i][1]); // display script name DebugTN("Script: " + myList[i][2]); // display script } } else DebugTN("Error found!"); (...)
bool fwHw_removeScript | ( | string | pScriptName | ) |
Remove the specified script.
[in] | pScriptName | name of the script to be removed. |
false error found.
(...) if (fwHw_removeScript("myScript")) // remove the script named 'myScript' (...) else DebugTN("Error found!"); (...)
bool fwHw_saveScript | ( | string | pScriptName, | |
string | pScript = "" | |||
) |
Create and save the specified script.
[in] | pScriptName | name of the script. |
[in] | pScript | the script to be saved. Note: this parameter is optional (if not specified, then an empty script will be saved). |
false error found.
(...) if (fwHw_saveScript("myScript", "main()\n {\n DebugTN(1);\n }\n")) // save the script under the name 'myScript' (...) else DebugTN("Error found!"); (...)