sources:
fifo1.cpp (4.0k)
fifo1.h (1.2k)
fifo1_n.cpp (4.0k)
fifonet1_n.cpp (10.2k)
gen1.cpp (1.3k)
gen1.h (443 bytes)
gen1_n.cpp (4.1k)
sink1.cpp (1.4k)
sink1.h (503 bytes)
sink1_n.cpp (3.9k)


website:
more info here


screenshot:
studies/performance/Performance-Code4/fifo1_n.cpp
download file

  1 //-----------------------------------------
  2 //
  3 // Generated by NEDC version 2.3b2
  4 // date: Sat Jun 07 16:09:00 2003
  5 //
  6 // Input file: fifo1.ned
  7 // Output file: fifo1_n.cc
  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: fifo1.ned
 81 //--------------------------------------------
 82
 83 ModuleInterface( FF2PacketFifo )
 84     Machine( default )
 85     Parameter( service_time, ParType_Numeric )
 86     Parameter( hist_file, ParType_String )
 87     Gate( in, GateDir_Input )
 88     Gate( out, GateDir_Output )
 89 EndInterface
 90 Register_ModuleInterface( FF2PacketFifo )
 91
 92 // class FF2PacketFifo : public cSimpleModule
 93 // {
 94 // Module_Class_Members(FF2PacketFifo,cSimpleModule,8192)
 95 // virtual void activity();
 96 // // Add you own member functions here!
 97 // };
 98 //
 99 // Define_Module( FF2PacketFifo )
100 //
101 // void FF2PacketFifo::activity()
102 // {
103 // // Put code for simple module activity here!
104 // }
105 //
106
107
108