Problems with protocol/service registration #1064
Replies: 2 comments 3 replies
-
|
It is a bit more complex. |
Beta Was this translation helpful? Give feedback.
-
|
You can check the mapping tables of all message dispatchers along the path. Probably the registration is not forwarded by some module between the EthernetMacHeaderChecker and the modified EthernetSocketIo. BTW, you don't need to create a new protocol just to send raw Ethernet frames from one node to another. It's perfectly fine to use applications for that. If you think there's a bug somewhere then please send a minimal example that demonstrates the problem. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have defined a new protocol in Protocol.cc to represent raw data being generated by an application being sent directly to a layer 2 CAN, the idea is that there is an EthernetBurstApplication, which i defined, which sends out frames with the raw ehtertype in the mac header, which are "caught" by an EthernetSinkApp. The CAN i want to simulate uses TsnDevice modules, however when the frames are received they get stuck right after the EthernetLayer module, because the bl message dispatcher doesn't see a module registered to receive frames tagged with the raw protocol tag. I have added the following line to EthernetSocketIo.cc, in its initialize function during the INITSTAGE_NETWORK_INTERFACE_CONFIGURATION + 1 stage:
registerProtocol(Protocol::raw, gate("trafficIn"), SP_INDICATION);but this doesn't seem to have any effect, since i still get the error:
handlePacket(): Unknown protocol: protocolId = 74, protocolName = raw, servicePrimitive = INDICATION, pathStartGate = demo.t2.ethernet.macHeaderChecker.out, pathEndGate = demo.t2.bl.in[2] -- in module (inet::MessageDispatcher) demo.t2.bl (id=12), at t=0.000425717252s, event #14What bothers me is that from qtenv i can clearly see that, in its serviceToGateIndex table, at has an entry for service 74 (but there's no entry in the protocol table), and that the parameters forwardProtocolRegistration and forwardServiceRegistration are set to true.
I have also tried to register the protocol with
registerService(...), changing the gate to socketIn and changing the initialization stage at which the registration happens, to no avail, and the knowledge base chatbot doesn't seem to offer any better solutionBeta Was this translation helpful? Give feedback.
All reactions