Gaudi Framework, version v22r0

Home   Generated: 9 Feb 2011

utils.h File Reference

This file contains the declarations of some helper methods for ApMon. More...

#include <stdexcept>
#include <ctype.h>
Include dependency graph for utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  apmon_utils

Defines

#define FATAL   0
 Logging level with minimum number of messages.
#define WARNING   1
 Intermediate logging level.
#define INFO   2
 Intermediate logging level.
#define FINE   3
 Logging level with detailed information.
#define DEBUG   4
 Logging level for debugging.

Functions

bool apmon_utils::urlModified (char *url, char *lastModified) throw (runtime_error)
 Returns true if the page with the specified URL was modified since the last check.
int apmon_utils::httpRequest (char *url, char *reqType, char *temp_filename) throw (runtime_error)
 Performs a HTTP request and puts the result into a temporary file.
char * apmon_utils::findIP (char *address) throw (runtime_error)
 If "address" is a hostname, it returns the corresponding IP address; if "address" is an IP address, it just returns a copy of the address.
void apmon_utils::parse_URL (char *url, char *hostname, int *port, char *identifier) throw (runtime_error)
 Parses an URL and determines the hostname, the port and the file name.
void apmon_utils::freeMat (char **mat, int nRows)
 Frees the memory for a 2-dimensional character array.
char * apmon_utils::trimString (char *s)
 Removes the leading and trailing white spaces from a string and puts the result into a malloc'ed string.
int apmon_utils::xdrSize (int type, char *value)
 Determines the size of the XDR representation for a data item.
int apmon_utils::sizeEval (int type, char *value)
 Determines the size of a data item.
void apmon_utils::logParameters (int level, int nParams, char **paramNames, int *valueTypes, char **paramValues)
 Logs the parameters included in a datagram.
bool apmon_utils::isPrivateAddress (char *addr)
 Verifies whether an IP address is private.
int apmon_utils::getVectIndex (char *item, char **vect, int vectDim)
 Finds the index of a string in a string array.
void apmon_utils::logger (int msgLevel, const char *msg, int newLevel=-1)
 If the newLevel parameter is not specified, log the message given as argument if the current logging level is greater than or equal to msgLevel.

Detailed Description

This file contains the declarations of some helper methods for ApMon.

Definition in file utils.h.


Define Documentation

#define DEBUG   4

Logging level for debugging.

Definition at line 56 of file utils.h.

#define FATAL   0

Logging level with minimum number of messages.

Definition at line 52 of file utils.h.

#define FINE   3

Logging level with detailed information.

Definition at line 55 of file utils.h.

#define INFO   2

Intermediate logging level.

Definition at line 54 of file utils.h.

#define WARNING   1

Intermediate logging level.

Definition at line 53 of file utils.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated at Wed Feb 9 16:28:18 2011 for Gaudi Framework, version v22r0 by Doxygen version 1.6.2 written by Dimitri van Heesch, © 1997-2004