00001 /* 00002 * timesFile.h 00003 * 00004 * Copyright (c) 2003 The University of Utah and the Flux Group. 00005 * All rights reserved. 00006 * 00007 * This file is licensed under the terms of the GNU Public License. 00008 * See the file "license.terms" for restrictions on redistribution 00009 * of this file, and for a DISCLAIMER OF ALL WARRANTIES. 00010 */ 00011 00012 /** 00013 * @file timesFile.h 00014 * 00015 * Helper functions for testing with the rk_stub library. 00016 * 00017 * @sa rk_stub.c 00018 */ 00019 00020 #ifndef _times_file_h 00021 #define _times_file_h 00022 00023 #ifdef __cplusplus 00024 extern "C" { 00025 #endif 00026 00027 /** 00028 * Special value used to terminate an array of float values. 00029 */ 00030 #define TIMES_FILE_TERMINATOR -1.0 00031 00032 /** 00033 * Make a file in the current directory with the given name whose contents are 00034 * the given array of floats. 00035 * 00036 * @sa rk_resource_set_create 00037 * 00038 * @param name The name of the file. 00039 * @param values The array of values to put in the new file, terminated by the 00040 * TIMES_FILE_TERMINATOR value. Because these values are 00041 * expected to be used by the rk_stub code, they should be 00042 * between 0.0 and 150.0, inclusive. 00043 * @return True if the file was created successfully, false otherwise. 00044 */ 00045 int tfMakeTimesFile(const char *name, const float values[]); 00046 00047 #ifdef __cplusplus 00048 } 00049 #endif 00050 00051 #endif