[P4-dev] annotation of contants

Venkat Pullela onepullela at gmail.com
Wed Aug 23 12:54:33 EDT 2017


Hi All,
Is there a way we can retain the names of constants to be included in JSON.

I was looking for some thing like :

@name("CPU_OUT_PORT") const PortId CPU_OUT_PORT = 0xE;

to magically show up in :

"right" : {

                    "Node_ID" : 6750,

                    "Node_Type" : "Constant",

                    "type" : {

                      "Node_ID" : 150

                    },

                    "value" : 14,

                    "base" : 16

                  }

as annotation like "annotations" : { ... }.

Thanks,

Venkat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20170823/06a34c37/attachment-0002.html>


More information about the P4-dev mailing list