sources:
generator.cpp (709 bytes)
generator.h (417 bytes)
generator_n.cpp (4.0k)
lbs_i.cpp (2.6k)
lbs_i.h (430 bytes)
lbs_i_n.cpp (4.1k)
lbs_ii.cpp (3.3k)
lbs_ii.h (439 bytes)
lbs_ii_n.cpp (4.1k)
minimumselector.cpp (1.7k)
minimumselector.h (359 bytes)
minimumselector_n.cpp (4.1k)
randomselector.cpp (454 bytes)
randomselector.h (266 bytes)
randomselector_n.cpp (4.1k)
server.cpp (1.6k)
server.h (508 bytes)
server_n.cpp (4.0k)
servicenet_n.cpp (13.6k)
sink.cpp (1.3k)
sink.h (495 bytes)
sink_n.cpp (3.9k)


website:
more info here


screenshot:
studies/performance/Performance-Code5/generator_n.cpp
download file

  1 //-----------------------------------------
  2 //
  3 // Generated by NEDC version 2.3b2
  4 // date: Fri Jun 20 01:00:39 2003
  5 //
  6 // Input file: generator.ned
  7 // Output file: generator_n.cpp
  8 //-----------------------------------------
  9
 10
 11 #include <math.h>
 12 #include "omnetpp.h"
 13
 14 #define check_error() \
 15     {(void)0;}
 16 #define check_memory() \
 17     {if (memoryIsLow()) {throw new cException(eNOMEM); }}
 18 #define check_module_count(num, mod, parentmod) \
 19     {if ((int)num<=0) {throw new cException("Negative or zero module vector size %s[%d] in compound module %s", ===>\<===
 20                           mod,(int)num,parentmod)
;}}
 21 #define check_gate_count(num, mod, gate, parentmod) \
 22     {if ((int)num<0) {throw new cException("Negative gate vector size %s.%s[%d] in compound module %s", ===>\<===
 23                           mod,gate,(int)num,parentmod)
;}}
 24 #define check_loop_bounds(lower, upper, parentmod) \
 25     {if ((int)lower<0) ===>\<===
 26         {throw new cException("Bad loop bounds (%d..%d) in compound module %s", ===>\<===
 27                  (int)lower,(int)upper,parentmod)
;}}
 28 #define check_module_index(index,modvar,modname,parentmod) \
 29     {if (index<0 || index>=modvar[0]->size()) {throw new cException("Bad submodule index %s[%d] in compound module %s", ===>\<===
 30           modname,(int)index,parentmod)
;}}
 31 #define check_channel_params(delay, err, channel) \
 32     {if ((double)delay<0.0) ===>\<===
 33         {throw new cException("Negative delay value %lf in channel %s",(double)delay,channel);} ===>\<===
 34      if ((double)err<0.0 || (double)err>1.0) ===>\<===
 35         {throw new cException("Incorrect error value %lf in channel %s",(double)err,channel);}}
 36 #define check_modtype(modtype, modname) \
 37     {if ((modtype)==NULL) {throw new cException("Simple module type definition %s not found", ===>\<===
 38                                      modname)
;}}
 39 #define check_function(funcptr, funcname) \
 40     {if ((funcptr)==NULL) {throw new cException("Function %s not found", ===>\<===
 41                                      funcname)
;}}
 42 #define check_function_retnull(funcptr, funcname) \
 43     {if ((funcptr)==NULL) {throw new cException("Function %s not found", ===>\<===
 44                                      funcname)
;return NULL;}}
 45 #define check_gate(gateindex, modname, gatename) \
 46     {if ((int)gateindex==-1) {throw new cException("Gate %s.%s not found",modname,gatename);}}
 47 #define check_anc_param(ptr,parname,compoundmod) \
 48     {if ((ptr)==NULL) {throw new cException("Unknown ancestor parameter named %s in compound module %s", ===>\<===
 49                                 parname,compoundmod)
;}}
 50 #define check_param(ptr,parname) \
 51     {if ((ptr)==NULL) {throw new cException("Unknown parameter named %s", ===>\<===
 52                                 parname)
;}}
 53 #ifndef __cplusplus
 54 # error Compile as C++!
 55 #endif
 56 #ifdef __BORLANDC__
 57 # if !defined(__FLAT__) && !defined(__LARGE__)
 58 # error Compile as 16-bit LARGE model or 32-bit DPMI!
 59 # endif
 60 #endif
 61
 62 // Disable warnings about unused variables:
 63 #ifdef _MSC_VER
 64 # pragma warning(disable:4101)
 65 #endif
 66 #ifdef __BORLANDC__
 67 # pragma warn -waus
 68 # pragma warn -wuse
 69 #endif
 70 // for GCC, seemingly there's no way to emulate the -Wunused command-line
 71 // flag from a source file...
 72
 73 // Version check
 74 #define NEDC_VERSION 0x0203
 75 #if (NEDC_VERSION!=OMNETPP_VERSION)
 76 # error Version mismatch! Probably this file was generated by an earlier version of nedc: 'make clean' should help.
 77 #endif
 78
 79 //--------------------------------------------
 80 // Following code generated from: generator.ned
 81 //--------------------------------------------
 82
 83 ModuleInterface( Generator )
 84     Machine( default )
 85     Parameter( rate, ParType_Numeric ParType_Const )
 86     Parameter( random_generator, ParType_Numeric ParType_Const )
 87     Gate( out, GateDir_Output )
 88 EndInterface
 89 Register_ModuleInterface( Generator )
 90
 91 // class Generator : public cSimpleModule
 92 // {
 93 // Module_Class_Members(Generator,cSimpleModule,8192)
 94 // virtual void activity();
 95 // // Add you own member functions here!
 96 // };
 97 //
 98 // Define_Module( Generator )
 99 //
100 // void Generator::activity()
101 // {
102 // // Put code for simple module activity here!
103 // }
104 //
105
106
107