%description: check "gatesizes" in NED: - if missing, gate vector size should be zero - if present, should set gate vector size accordingly - explicitly set zero and one vector size should work too %file: test.ned simple GenMod { gates: input in; input in1[]; input in2[]; input in3[]; input in4[]; output out; output out1[]; output out2[]; output out3[]; output out4[]; } network Test { submodules: specMod: GenMod { gates: in2[10]; in3[0]; in4[1]; out2[20]; out3[0]; out4[1]; } connections allowunconnected: } %file: test.cc #include using namespace omnetpp; namespace @TESTNAME@ { class GenMod : public cSimpleModule { public: GenMod() : cSimpleModule(16384) { } virtual void activity() override; }; Define_Module(GenMod); #define PRINT(name) EV << name << (isGateVector(name) ? "[]" : "") << ":" \ << gateSize(name) << "," << gateSize(name) << "\n" void GenMod::activity() { PRINT("in"); PRINT("in1"); PRINT("in2"); PRINT("in3"); PRINT("in4"); PRINT("out"); PRINT("out1"); PRINT("out2"); PRINT("out3"); PRINT("out4"); } }; //namespace %contains: stdout in:1,1 in1[]:0,0 in2[]:10,10 in3[]:0,0 in4[]:1,1 out:1,1 out1[]:0,0 out2[]:20,20 out3[]:0,0 out4[]:1,1