<HTML><HEAD><link type="text/css" href="../css/main_styles.css" rel="stylesheet"></HEAD>
<BODY><TITLE>%vda_4955_compliance</TITLE><H1>%vda_4955_compliance  </H1><P CLASS="Paragraph">Classname: <B>%vda_4955_compliance  </B></P><P CLASS="Paragraph">Inherits from: <B><A href=..\checkmate\xug_base_checker.html>%ug_base_checker </A></B></P><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"> </PRE><PRE STYLE=\"text-align : left;\" CLASS=\"Code\">  DOCUMENTATION</PRE><PRE STYLE=\"text-align : left;\" CLASS=\"Code\">
<B>Description:</B>
    This checker will execute VDA checkers according to the input VDA configuration file,
    which fully describs the selected checking criteria to apply to the selected geometry
    types. The user should specify the configuration file by using the interactive
    VDA Checker Dialog.  If the configuration file is not specified, then the system will
    take the default configuration file that is set by the environment variable
    UGII_VDA4955_CFG_FILE=<default_configuration_file>.cfg.
    At the end of execution, this checker will create a VDA Results Log file and a
    compliance error object file in the part directory with write permissions.
    If the part file path exists but has no write permissions, then the system will
    attempt to create the file in the work directory.  If that fails, then the system
    will create the file in the system defined tmp directory.  The VDA Results Log File is
    a text file that stores the analysis results with the VDA protocol.  The protocol
    essentially consists of the four sections:
        * UGS File Header
        * Model Structure
        * Overview of Check Results
        * Detailed Check Results
    A Comply Error Object File contains information of UG handles that are session
    independent and can be mapped back to UG object identifiers (UG tags) in another
    session.  The user can utilize the interactive Browse Violations Dialog under Analysis->
    Check VDA-4955 Compliance->VDA Checker Dialog->Browse Violations to view the comply
    errors in a Comply Error Object file.
Parameters:
    (String)  cfg_file          -  The full file path of a VDA configuration file name.
                                   The default configuration file will be used if the filename is
                                   not specified.
    (String)  result_log_file   -  A VDA Results Log File name without the extension ".log".
                                   The part name will be used if the filename is not specified.
    (String)  ceo_file          -  A VDA compliance error object file name without the extension ".ceo".
                                   The part name will be used if the filename is not specified.
    (Boolean)  disabled?        -  If it is true, the checker is disabled.
                                   Default is False.
    (Boolean)  save_log_in_part -  The flag indicates whether the checking results can
                                   be saved to the part file
                                   Default is True.
    (Integer)  log_type         -  Indicate which logging type to use to report the violation.
                                   1 - LOG_ERROR,
                                   2 - LOG_WARNING,
                                   3 - LOG_INFO,
                                   Default is 1 to log error.
    (String)   log_message      -  User defined message to be added when the system
                                   reports the violation.
                                   Default is an empty string.
Results:
    PASS  -     The VDA checkers do not find any violation.
    FAIL  -     The VDA checkers find violation(s).
UG Object Logged: None.
</PRE><PRE><FONT COLOR= blue>DefClass: %vda_4955_compliance ( %ug_base_checker );
</FONT></PRE><PRE STYLE=\"text-align : left;\" CLASS=\"Code\">  Check-Mate Attributes and Parameters</PRE><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>   ( String )              %test_category:  "VDA 4955";
   ( String )              %displayed_name: "VDA 4955 Compliance Check";

</SPAN></FONT></PRE></DIV><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>   ( Boolean Parameter )    Disabled?: False;
   ( Boolean Parameter )    save_log_in_part: True;
</SPAN></FONT></PRE></DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\">   Attributes for this class</PRE><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>   ( String )             cfg_file_label: "VDA Configuration File";

</SPAN></FONT></PRE></DIV><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>   ( String )             results_log_file_label: "Results Log File";

</SPAN></FONT></PRE></DIV><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>   ( String )             ceo_file_label: "Compliance Error Object File";

</SPAN></FONT></PRE></DIV><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>   ( List )               log_type_option: {LOG_ERROR, LOG_WARNING, LOG_INFO};
   ( String )             log_type_label: "Log Option";
   
</SPAN></FONT></PRE></DIV><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>   ( String Parameter )   cfg_file: "";
   ( String Parameter )   results_log_file:"";
   ( String Parameter )   ceo_file:"";
   ( Integer Parameter )  log_type: 1;
   ( String Parameter )   log_message: "VDA checkers found violations.";
</SPAN></FONT></PRE></DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\">   Checker function</PRE><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>   ( String )             log_message_label: "Log Message";
 
</SPAN></FONT></PRE></DIV><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>   (Any Uncached)   do_check: 
   @{
     mqc_vda_4955_compliance(cfg_file:, results_log_file:, ceo_file:,
                             nth(log_type:, log_type_option:), log_message:);

    };

</SPAN></FONT></PRE></DIV><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>(Method integer) check_file_existence:( string $file_name )
@{
    if $file_name = ""
    then
        -1
    else
    @{
        $file_exists? << access( $file_name, exists );
        if -$file_exists?
        then
             1
        else
             0;
    };             
};


</SPAN></FONT></PRE></DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\">#  read all lines from the VDA Results Log file.
</PRE><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>(Method list) read_log_file:( string $file_name  )
        @{ 
            if $file_name = ""
            then
               { "Error: Empty results log file name." }
            else
              @{
                  $is_file_exist? << Access($file_name+".log", Exists);

                  if -$is_file_exist?
                  then
                  { "Error: Can not access the results log file: " + $file_name }
                  else
                  @{
                      $file << openFile( $file_name+".log" ; read);

                      $tmp_lines << ReadLinesFromFile($file, {} );

                      closeFile( $file );

                      if empty?( $tmp_lines )
                      then
                        { "Error: Empty result log file " + $file_name }
                      else
                      $tmp_lines;  
                   }; 
            }; 
        } ;
        
</SPAN></FONT></PRE></DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"># writhe string list to listing window
#
</PRE><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>(Method any) write_to_listing_win:( list $list_str )
@{
        if -empty?($list_str)
        then 
           @{  
                # write tilte
                write_title:();

                loop {
                    for $i from 1 to length($list_str);  
                    for $each_line is nth($i, $list_str);
</SPAN></FONT></PRE></DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\">                        ug_printListWin($each_line);</PRE><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"># write title
</PRE><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>(Method any) write_title:()
@{
    mqc_printToListWindow("**************************************************************");    
    mqc_printToListWindow("   The VDA 4955 Compliance Results Log File Information                    ");       
    mqc_printToListWindow("**************************************************************");    
};

</SPAN></FONT></PRE></DIV></TABLE><p class=EndLine>&nbsp;</p><p class=blank>&nbsp;</p></BODY></HTML>