European
Southern
Observatory

ESO — Reaching New Heights in Astronomy

Countries taking part in the ESO

VLT Software Documentation

c-procedure.template.doc

c_procedure - procedure(s) written in C language

SYNOPSIS

       <mod>/src/<name>.c
	    /test/<name>.c

       <mod>
	   |/ws/src/<name>.c
	   |   /test/<name>.c
	   |/lcu/src/<name>.c
		/test/<name>.c

 

DESCRIPTION

A procedure written in C language shall be written using the convention established in the "VLT-PRO-ESO-10000-0228, 1.0 10/03/93 VLT Software Programming Standards".

An empty template is provided by getTemplate(7) in the "code" menu. Complete the template according to the following instruction:

   /**********.. .  .
   * E.S.O. - VLT project
   *
   * <name>.c	   <<<<  Normally there is one procedure per file. 
			 In this case <name> is the name of the procedure. 
			 If needed, several procedures can be grouped
			 in one file. In this case <name> is a meaningful 
			 name for the group.
   *
   * who       when	   what
   * --------  ----------  -------------------- 
   * NNNNNNNN  yyyy-mm-dd  created
   */|------------------| <<<<in the template these two fields are changed
			      according to the current value of username and date.

   /**
    * @file
    * brief description of the purpose of this file.
    * A more elaborated file description.
    */   


   #ifndef __vxworks   >>> predefined Macros Candidates: 
			   __vxworks #vxworks in general
			   _WRS_KERNEL #vxWorks kernel
			   __RTP__ # vxWorks application process (currently not used in VLT and can be replaced by 'defined(__vxworks) && !defined(_WRS_KERNEL)'
   #define _POSIX_C_SOURCE 1	<<<< if you delete this line you SHALL comment
				     why POSIX does not apply for this file
				     The purpose of the Macro is, to intentionally break the build if non agreed feature sets are used.
				     For Linux you might need to remove the settings in the case that intentionally non-Posix functions will be called by the sourcecode.
				     For VxWorks Kernel you might want to keep #define _POSIX... if you are sure that this sourcecode should not use any VxWorks specific functions
				     For VxWorks Application processes (currently not used by VLT) you can independently decide between allowing VxWorks extensions over Posix only
   #endif
   #include "vltPort.h"
				   >>>>do not change the following line<<<<
   ATTRIBUTE_UNUSED static const char *rcsId="@(#) $I>-<d$"; 

   /* 
    * System Headers 
    */  		  >>>Remember: system include SHALL be between <> <<<<
   #include <.....>		   /* ........ */  <<<<except for obvious files,
   #include <.....>		   /* ........ */      say why you need this include
   .......  
   
   /*
    * Local Headers 
    */  		  >>>Remember: local include SHALL be between "" <<<<
   #include "........." 	   /* ........ */  <<<<except for obvious files,
   #include "........." 	   /* ........ */      say why you need this include
   
   
   
   /**
    * Brief description of the function. 
    * More details
    *
    * @param <arg1> description of arg 1 
    * @param <arg2> description of arg 1
    * ...
    * @return <ret_type> description of return value
    */
   <ret_type> <name>(
       <typ1> <arg1>, 
       <typ2> <arg2>,
       ....)
   {
       .
       .
      code 
       .
       .
   }
   
   ...... if any, 2nd function and so on .....
   
   /**
    *.. .  .
    */
   
   
   
   /*___oOo___*/

 
Generated on Wed Jun 8 09:09:12 2011 for forCoding - 1.50 API by doxygen 1.6.3