How to create a custom header derived from packet_header_default.h

I am trying to create a custom header format derived from
packet_header_default.h.
I am also doing this in an out of tree module src structure.

I have successfully got it to compile the c++ code but it now fails
when I try to add the swig lines into the
cmake class. I am new to cmake and unclear on how to fix it.

From the python code I get the following message

NameError: packet_header_myproject is not define

If someone has an example or a tutorial on this would be great.

From packet_header_default.h

  • This is a default packet header (see header_formatter()) for a
    description
  • on the header format). To create other header, derive packet header
    creator
  • classes from this function.

Thanks

Andrew

On 09/03/2014 05:21 PM, Andrew Burger wrote:

NameError: packet_header_myproject is not define

If someone has an example or a tutorial on this would be great.

From packet_header_default.h

  • This is a default packet header (see header_formatter()) for a description
  • on the header format). To create other header, derive packet header creator
  • classes from this function.

I did this for my 802.11 module. Maybe it helps

Best,
Bastian

Make sure you’re publically exporting your symbol (using the
MYPROJECT_API macro).

M