simkerneldefs.h Source File

API: simkerneldefs.h Source File
API
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
25namespace omnetpp {
26
27// OMNeT++ version, (major<<8)|minor
28#define OMNETPP_VERSION 0x0604
29
30// OMNeT++ build number
31#define OMNETPP_BUILDNUM 1543
32
33#if defined(SIM_EXPORT)
34# define SIM_API OPP_DLLEXPORT
35#elif defined(SIM_IMPORT) || defined(OMNETPPLIBS_IMPORT)
36# define SIM_API OPP_DLLIMPORT
37#else
38# define SIM_API
39#endif
40
41//
42// other common defines
43//
44
45#ifndef NDEBUG
50#define ASSERT(expr) \
51 ((void) ((expr) ? 0 : (throw omnetpp::cRuntimeError("ASSERT: Condition '%s' does not hold in function '%s' at %s:%d", \
52 #expr, __FUNCTION__, __FILE__, __LINE__), 0)))
53
58#define ASSERT2(expr,text) \
59 ((void) ((expr) ? 0 : (throw omnetpp::cRuntimeError("ASSERT: %s in function '%s' at %s:%d", \
60 text, __FUNCTION__, __FILE__, __LINE__), 0)))
61#else
62#define ASSERT(expr) ((void)0)
63#define ASSERT2(expr,text) ((void)0)
64#endif
65
70#define ASSERT_DTOR(expr) assert(expr)
71
78typedef int64_t eventnumber_t;
79
85typedef int64_t msgid_t;
86
92typedef int64_t txid_t;
93
101typedef int64_t intval_t;
102
109typedef uint64_t uintval_t;
110
116[[deprecated]] typedef intval_t intpar_t;
117
118} // namespace
119
120#endif
121
int64_t intval_t
Signed integer type which is guaranteed to be at least 64 bits wide. It is used throughout the librar...
Definition simkerneldefs.h:101
int64_t txid_t
Transmission ID. See SendOptions::transmissionId(), cMessage::getTransmissionId().
Definition simkerneldefs.h:92
uint64_t uintval_t
Unsigned integer type which is guaranteed to be at least 64 bits wide. It is used throughout the libr...
Definition simkerneldefs.h:109
int64_t msgid_t
Message ID. See cMessage::getId().
Definition simkerneldefs.h:85
intval_t intpar_t
Definition simkerneldefs.h:116
int64_t eventnumber_t
Sequence number of events during the simulation. Events are numbered from one. (Event number zero is ...
Definition simkerneldefs.h:78