Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 075d0d3d authored by Henri Chataing's avatar Henri Chataing
Browse files

pdl: Implement c++ backend generator

The generated parsing API follows closely with the legacy
generator to minimize the porting work, but differs on
notable points:

 - Generated packet view classes *do not* inherit from one another.
 - Packet fields are now backed in the class. Scalar and typedef fields
   are backed by value, payload and array fields by slice.
 - PacketView::Create() now does the parsing work, accessors just return
   the internal value in case of scalar and typedef fields, or parse the
   slice in case of payload and array fields.
 - The generated code eschews the legacy packet runtime in favor of a
   trimmed down version packet_runtime.h

Some features of PDL are not supported:

 - Payload with a bit shift
 - Checksums

Test: atest pdl_cxx_generator_tests
Change-Id: Ifcb5b21c7a6e796ed43985132ad8bc4b116f4c48
parent 8ee7ae9a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment