summaryrefslogtreecommitdiffstats
path: root/src/tools/vppapigen/vppapigen.py
diff options
context:
space:
mode:
authorNeale Ranns <neale@graphiant.com>2021-02-02 09:21:52 +0000
committerOle Tr�an <otroan@employees.org>2021-02-03 15:09:50 +0000
commit9302cfea9ded05f01fb84a77d248b8787ec2cac5 (patch)
tree4fb2fb8475f19bd15c44dac77e78c870438c01dd /src/tools/vppapigen/vppapigen.py
parent6d467b3ad530bef468a1ab3c6f80a6c2ab6e08d8 (diff)
vppapigen: Support an 'autoendian' keyword for message definitions in
.api files Type: feature Make the auto-endian nature explicit, rather than hidden in the x_api.c file. Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: Ibe647117ceeaf6f99a38a96576a5a41a3cbb1615
Diffstat (limited to 'src/tools/vppapigen/vppapigen.py')
-rwxr-xr-xsrc/tools/vppapigen/vppapigen.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tools/vppapigen/vppapigen.py b/src/tools/vppapigen/vppapigen.py
index eabf8f0644d..7c596967cfb 100755
--- a/src/tools/vppapigen/vppapigen.py
+++ b/src/tools/vppapigen/vppapigen.py
@@ -64,6 +64,7 @@ class VPPAPILexer(object):
'manual_endian': 'MANUAL_ENDIAN',
'dont_trace': 'DONT_TRACE',
'autoreply': 'AUTOREPLY',
+ 'autoendian': 'AUTOENDIAN',
'option': 'OPTION',
'u8': 'U8',
'u16': 'U16',
@@ -308,6 +309,7 @@ class Define(Processable):
self.manual_print = False
self.manual_endian = False
self.autoreply = False
+ self.autoendian = 0
self.options = {}
for f in flags:
if f == 'dont_trace':
@@ -318,6 +320,8 @@ class Define(Processable):
self.manual_endian = True
elif f == 'autoreply':
self.autoreply = True
+ elif f == 'autoendian':
+ self.autoendian = 1
remove = []
for b in block:
@@ -768,6 +772,7 @@ class VPPAPIParser(object):
| MANUAL_ENDIAN
| DONT_TRACE
| TYPEONLY
+ | AUTOENDIAN
| AUTOREPLY'''
if len(p) == 1:
return