Osys_Env_Reports_Dir_Get()
Abstract
Returns the full path of the output directory for a generated report.
Syntax
Osys_Env_Reports_Dir_Get (project_name, scenario_name, module_name, options, output_reports_dir)
| Argument | Type | Description |
|---|---|---|
project_name |
const char * |
Name of the project from which the report is generated |
scenario_name |
const char * |
Name of the scenario from which the report is generated |
module_name |
const char* |
Name of the module (if any) used to generate the report |
options |
int |
Flag to specify binary options. |
output_reports_dir |
PrgT_Path |
Full path where the generated report files will be stored |
Return Type
PrgT_Compcode
PrgC_Compcode_Failure if the specified path is invalid or too large to be stored in the passed buffer, or if an invalid combination of inputs is used; PrgC_Compcode_Success otherwise.
Header
osys_env.h
Details
Returns the report directory using the project_name, scenario_name, and module_name arguments as shown in the following table (“—” means that PRGC_NIL is passed):
| Project | Scenario | Module | Path |
|---|---|---|---|
| — | — | — | <op_reports>/ |
<project> |
— | — | <op_reports>/<project>/ |
<project> |
<scenario> |
— | <op_reports>/<project>/<scenario> |
<project> |
<scenario> |
<module> |
<op_reports>/<project>/<scenario>/<module> Reports |
<project> |
— | <module> |
<op_reports>/<project>/<module> Reports |
| — | — | <module> |
<op_reports>/<module> Reports |
You can specify one of the following values for the options argument:
OSYSC_ENV_REP_DIR_GET_OPT_NONE—The default behavior is to return a fully-created path if it does not already exist.OSYSC_ENV_REP_DIR_GET_OPT_DONT_CREATE_SUBDIR—Do not create subdirectories under<op_reports>if they are not present. (The default behavior is to create the specified subdirectory if it is not found.)OSYSC_ENV_REP_DIR_GET_OPT_DONT_APPEND_SPACE_REPORTS—Do not append the string " Reports" to module names in the path. For example, this option will set output_reports_dir to “<op_reports>/<module>“ instead of “<op_reports>/<module> Reports” (using the default behavior).
Purpose
Any procedure that generates a report should call this procedure to obtain the top-level report directory (specified by the reports_dir preference) and the correct project/scenario/module-specific subdirectory. The full directory path is stored in output_reports_dir; subsequent code can reference this string when saving generated report files.