OMNeT++ Simulation Library  5.6.1
simkerneldefs.h
1 //==========================================================================
2 // SIMKERNELDEFS.H - part of
3 // OMNeT++/OMNEST
4 // Discrete System Simulation in C++
5 //
6 //==========================================================================
7 
8 /*--------------------------------------------------------------*
9  Copyright (C) 1992-2017 Andras Varga
10  Copyright (C) 2006-2017 OpenSim Ltd.
11 
12  This file is distributed WITHOUT ANY WARRANTY. See the file
13  `license' for details on this and other legal matters.
14 *--------------------------------------------------------------*/
15 
16 #ifndef __OMNETPP_SIMKERNELDEFS_H
17 #define __OMNETPP_SIMKERNELDEFS_H
18 
19 #include <cstddef>
20 #include <cfloat>
21 #include <cmath>
22 #include <cstdint>
23 #include "platdep/platdefs.h"
24 
25 // OMNeT++ version, (major<<8)|minor
26 #define OMNETPP_VERSION 0x0506
27 
28 // OMNeT++ build number
29 #define OMNETPP_BUILDNUM 1022
30 
31 // uncomment to switch fingerprint computation algorithm to OMNeT++ 4.x compatible mode
32 //#define USE_OMNETPP4x_FINGERPRINTS
33 
34 #if defined(SIM_EXPORT)
35 # define SIM_API OPP_DLLEXPORT
36 #elif defined(SIM_IMPORT) || defined(OMNETPPLIBS_IMPORT)
37 # define SIM_API OPP_DLLIMPORT
38 #else
39 # define SIM_API
40 #endif
41 
42 //
43 // other common defines
44 //
45 
46 #ifndef PI
47 #define PI 3.141592653589793
48 #endif
49 
50 #ifndef NDEBUG
51 
55 #define ASSERT(expr) \
56  ((void) ((expr) ? 0 : (throw omnetpp::cRuntimeError("ASSERT: Condition '%s' does not hold in function '%s' at %s:%d", \
57  #expr, __FUNCTION__, __FILE__, __LINE__), 0)))
58 
63 #define ASSERT2(expr,text) \
64  ((void) ((expr) ? 0 : (throw omnetpp::cRuntimeError("ASSERT: %s in function '%s' at %s:%d", \
65  text, __FUNCTION__, __FILE__, __LINE__), 0)))
66 #else
67 #define ASSERT(expr) ((void)0)
68 #define ASSERT2(expr,text) ((void)0)
69 #endif
70 
71 
78 typedef int64_t eventnumber_t;
79 
86 typedef int64_t intpar_t;
87 
88 #endif
89 
int64_t intpar_t
Type for NED parameter values that store integers. It is guaranteed to be signed and at least as wide...
Definition: simkerneldefs.h:86
int64_t eventnumber_t
Sequence number of events during the simulation. Events are numbered from one. (Event number zero is ...
Definition: simkerneldefs.h:78