aboutsummaryrefslogtreecommitdiffstats
path: root/vpp-api/java
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2016-07-11 08:35:32 +0200
committerDamjan Marion <dmarion.lists@gmail.com>2016-07-11 23:03:40 +0000
commit3659a5aa366fce62151f42fecbca66853ec3a82d (patch)
treef5641b5bf7f767f6302dac3cdb2f234752bf4016 /vpp-api/java
parent71893ac8b765dd997452fc58aedb6e0bd7b79a25 (diff)
VPP-190: support variable length array syntax in request messages
The information is aleardy stored in array.length field, but vpe.api syntax should be uniform. Change-Id: Id84cd95c088281609c70548346cf0e408a6f49ff Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'vpp-api/java')
-rw-r--r--vpp-api/java/jvpp/gen/jvpp_c_gen.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/vpp-api/java/jvpp/gen/jvpp_c_gen.py b/vpp-api/java/jvpp/gen/jvpp_c_gen.py
index 0b7fc67d..c1169863 100644
--- a/vpp-api/java/jvpp/gen/jvpp_c_gen.py
+++ b/vpp-api/java/jvpp/gen/jvpp_c_gen.py
@@ -210,10 +210,12 @@ def generate_jni_impl(func_list, inputfile):
for t in zip(f['c_types'], f['args'], f['lengths']):
c_type = t[0]
c_name = t[1]
- # variable length arrays do not need special handling in requests,
- # because the length of Java array is known:
field_length = t[2][0]
+ # check if we are processing variable length array:
+ if t[2][1]:
+ field_length = util.underscore_to_camelcase(t[2][0])
+
java_field_name = util.underscore_to_camelcase(c_name)
struct_setter_template = struct_setter_templates[c_type]
path: root/tests/vpp/perf/l2/10ge2p1x710-dot1q-l2xcbase-ndrpdr.robot
blob: 7503cb1451c8e9b64bd188128043edcdd9e2e934 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145