• Classes
  • Modules
  • Namespaces
  • Files
  • Related Pages
  • File List
  • File Members

vltMakeTest.h

Go to the documentation of this file.
00001 #ifndef VLTMAKETEST_H
00002 #define VLTMAKETEST_H
00003 /*******************************************************************************
00004 * E.S.O. - VLT project
00005 *
00006 * "@(#) $Id: vltMakeTest.h,v 1.1.1.1 2003/02/20 10:44:07 mzampare Exp $" 
00007 *
00008 * vltMakeTest.h
00009 *
00010 * who       when      what
00011 * --------  --------  ----------------------------------------------
00012 * gfilippi  20/10/94  created
00013 */
00014 
00015 /*
00016  *   This file is part of the vltMake modular test package
00017  */
00018 
00019 /*
00020  * System Headers required by all applications in this module
00021  */
00022 #include <stdio.h>
00023 #include <stdlib.h>
00024 #include <string.h>
00025 #include <unistd.h>
00026 #include <signal.h>
00027 
00028 
00029 #ifndef MAKE_VXWORKS
00030 /*
00031  * VLT Software for WS only
00032  */
00033 #include "rtapClasses/rtTypes.h"    /* RTAP */
00034 
00035 #include "db.h"                     /* ccs */
00036 #include "msg.h"
00037 #include "tims.h"
00038 #include "err.h"
00039 #include "log.h"
00040 #endif  /* MAKE_VXWORKS */
00041 
00042 /* 
00043  * Macros 
00044  */
00045 
00046 /* 
00047  * to make the code more readable the following macros for error treatment 
00048  * are defined:
00049  *
00050  *    - CLEAN used when ccsInit has been performed
00051  *    - ABORT used when ccsInit has not yet been performed
00052  *
00053  * For each "XXXXX" macro a "xxxxx" label defines in the code the
00054  * appropriate actions needed for that specific error condition.
00055  * 
00056  * The macro PRINT_ERROR produces debugging information.
00057  */
00058 
00059 #define PRINT_ERROR(reason) \
00060     {\
00061     printf("File %s line %d\n", __FILE__, __LINE__);     \
00062     printf("Failure: %s\n", reason);             \
00063     printf("Error structure\n");                         \
00064     printf("   EnvName    : %s\n", error.envName);       \
00065     printf("   StackId    : %x\n", error.stackId.id);    \
00066     printf("   SequenceNbr: %d\n", error.sequenceNumber);\
00067     printf("   ModuleId   : %s\n", error.moduleId);      \
00068     printf("   LocationId : %s\n", error.location);      \
00069     printf("   ErrorNumber: %d\n", error.errorNumber);   \
00070     printf("   Parameters : %s\n", error.runTimePar);    \
00071     errCloseStack(&error); \
00072     }
00073 
00074 #define CLEAN(reason) { PRINT_ERROR(reason); goto clean; }
00075 #define ABORT(reason) { PRINT_ERROR(reason); goto abort; }
00076 
00077 /*
00078  * test output
00079  */
00080 
00081 #define TEST_FAILED(testName)    { printf("%s - FAIL\n", testName); exit(EXIT_FAILURE); }
00082 #define TEST_SUCCEEDED(testName) { printf("%s - PASS\n", testName); exit(EXIT_SUCCESS); }
00083 
00084 
00085 /*
00086  * function prototypes
00087  */
00088 void vltMakeTestProcedure1();
00089 void vltMakeTestProcedure2();
00090 
00091 
00092 #endif 

Generated on Thu Jan 12 2012 23:13:51 for ACS-10.0 C++ API by  doxygen 1.7.0