Working with Packets in INET 4.0 for Ieee80211Frame

53 views
Skip to first unread message

THIHA KYAW

unread,
Sep 9, 2018, 11:39:31 AM9/9/18
to INET Framework Contributors
Hi INET Developers,

I am new to inet.

According to INET 3.x to 4.0 Migration Guide,  Packet API is introduced to create the packet.

In inet 4.0 developer manual, the packet creation for Ieee80211Frame is not discussed.

I would like to  know how to create Ieee80211Frame using packet API.

Thank you for your help in advanced.

Regards,
Thiha Kyaw

THIHA KYAW

unread,
Sep 9, 2018, 11:54:53 AM9/9/18
to INET Framework Contributors
Hi,

Error is "Tag 'inet::PacketProtocolTag' is absent -- in module (inet::physicallayer::Ieee80211Radio)"

 inet::Packet *datapacket = new inet::Packet(msgname, inet::IEEE802CTRL_DATA);


Regards,
Thiha Kyaw

THIHA KYAW

unread,
Sep 10, 2018, 12:46:45 PM9/10/18
to INET Framework Contributors
Hi,

I try to create the packet.

I faced the following error.

Returning an empty chunk is not allowed according to the flags: 0 -- in module (inet::visualizer::MediumCanvasVisualizer) WifiNetwork.visualizer.canvasVisualizer.mediumVisualizer (id=154), at t=0.01s, event #93


Packet creation is as below.

 inet::Packet *datapacket = new inet::Packet(msgname, inet::IEEE802CTRL_DATA);

        datapacket->addTagIfAbsent<PacketProtocolTag>()->setProtocol(&Protocol::ieee80211Mac


        send(datapacket, "radioOut");

Please advise me how to modify the code.


Regards,

Thiha Kyaw

Reply all
Reply to author
Forward
0 new messages