VR-Link API Documentation for HLA Evolved
Classes | Defines | Typedefs | Functions | Variables

provides basic Operating Independent Methods useful to a federate More...

Go to the source code of this file.

Classes

class  DtSelectParam

Defines

#define DtDELETE(x)
 DT_FD_ZERO_USES_MEMSET.
#define DtDELETE_VOID(x, cast)
#define DtISON(a, x)   (a & x)
#define DtISOFF(a, x)   (!DtISON(a, x))
#define DtTURNON(a, x)   (a |= x)
#define DtTURNOFF(a, x)   (a &= ~x)
#define DtNUMBER(foo)   (sizeof(foo)/sizeof(foo[0]))
#define DtOFFSET(type, field)   ((size_t)&((type *)NULL)->field)
#define DtSIZEOF(type, field)   sizeof(((type *)NULL)->field)
#define DtATOI(s)   (int)strtol(s, 0, 0)
 some versions of strtol returns INT_MAX for input larger than 0x7fffffff.
#define DT_VXWORKS_APP(name)

Typedefs

typedef DtU32 DtIpv4Addr

Functions

void bzero (char *b, int length)
 Need bzero.
int DtROUND_TO_MULT (int num, int mult)
 Rounds num up to a multiple of mult.
template<typename T >
DtMax (T x, T y)
 Returns what ever is greater, x or y of type T.
template<typename T >
DtMin (T x, T y)
 Returns the which ever is lesser, x or y of type T.
char * DtDeg2DmsString (double val, char *buff, int prec)
char * DtDeg2DmsString (double val)
int DtIsInList (const int *lst, int num)
 Returns -1 if num is not in lst.
int DtSelect (int n, fd_set *i, fd_set *o, fd_set *e, DtTime t)
void DtClose (int &fd)
char * DtStrdup (const char *str)
 Strdup wrapper.
char * DtToLower (char *str)
 Convert str to all lowercase.
char * DtToUpper (char *str)
 Convert str to all uppercase.
const char * DtInetAddrString (DtIpv4Addr addr)
 Converts ulong to internet dot notation (returns internal static buffer).
DtIpv4Addr DtStringToInetAddr (const char *str)
 Converts to internet dot notation to ulong in host order.
DtIpv4Addr DtStringToInetAddr (const DtString &str)
DtIpv4Addr DtHexStringToInetAddr (const char *str)
 Converts to internet dot notation to ulong in host order.
int DtResizeString (char *&buf, int &oldLn, int newLn)
 For VXWORKS.
int DtArgc (char *cmdLine)
 Convert a command line (single string with args separated by spaces) to argv, argc format.
char ** DtArgv (char *cmdLine, int *argc=NULL)
const char * DtOperatingSystem ()
 Returns the platform we're running on.
const char * DtCompiler ()
 Returns the compiler.
int DtGetPid ()
 Returns the process ID for the running process.
int DtGetPPid ()
 Returns the process ID for the parent of the running process.

Variables

const DtIpv4Addr DtInetAddrAny = 0
const DtIpv4Addr loopbackAddr = 0x7f000001

Detailed Description

provides basic Operating Independent Methods useful to a federate


Define Documentation

#define DT_VXWORKS_APP (   name)
Value:
int main(int argc, char** argv); \
int name(char* cmdLine) \
{ \
   return realMain(DtArgc(cmdLine), DtArgv(cmdLine)); \
}
#define DtATOI (   s)    (int)strtol(s, 0, 0)

some versions of strtol returns INT_MAX for input larger than 0x7fffffff.

As long as strtoul accepts and properly processes negative input, this macro will work for both unsigned and signed ints (as other strtol do).

#define DtDELETE_VOID (   x,
  cast 
)
Value:
if (x) \
   { \
      cast* toDelete = reinterpret_cast<cast*>(x); \
      delete toDelete; \
      x = 0; \
   }
#define DtISOFF (   a,
 
)    (!DtISON(a, x))
#define DtISON (   a,
 
)    (a & x)
#define DtNUMBER (   foo)    (sizeof(foo)/sizeof(foo[0]))
#define DtOFFSET (   type,
  field 
)    ((size_t)&((type *)NULL)->field)
#define DtSIZEOF (   type,
  field 
)    sizeof(((type *)NULL)->field)
#define DtTURNOFF (   a,
 
)    (a &= ~x)
#define DtTURNON (   a,
 
)    (a |= x)

Function Documentation

void bzero ( char *  b,
int  length 
)

Need bzero.

char** DtArgv ( char *  cmdLine,
int *  argc = NULL 
)
int DtResizeString ( char *&  buf,
int &  oldLn,
int  newLn 
)

For VXWORKS.


Document ID: Generated on Mon May 14 08:06:18 EDT 2012 from SVN revision 114750
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)