File tree 1 file changed +17
-1
lines changed
1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,23 @@ class {{class_name}} : public ping_message
30
30
{
31
31
public :
32
32
{{class_name }}(const ping_message & msg ) : ping_message { msg } {}
33
- {{class_name }}(uint8_t * buf ) : ping_message { buf , {{8 + total_payload + 2 }} }
33
+ {{class_name }}(uint8_t * buf
34
+ {%- for payload in m .payload %}
35
+ {% if generator .is_vector (payload .type ) %},
36
+ {% if payload .vector .sizetype - %}
37
+ {{generator .get_type_string (payload .vector .sizetype )}} {{payload .name }}_length
38
+ {% else - %}
39
+ uint16_t {{payload .name }}_length
40
+ {%- endif %}
41
+ {% endif %}
42
+ {% endfor %}{# each payload field #}
43
+ ) : ping_message { buf , static_cast < uint16_t > ({{8 + total_payload + 2 }}
44
+ {%- for payload in m .payload %}
45
+ {% if generator .is_vector (payload .type ) %}
46
+ + {{payload .name }}_length
47
+ {%- endif %}
48
+ {% endfor %}) }{# each payload field #}
49
+
34
50
{
35
51
msgData [0 ] = 'B' ;
36
52
msgData [1 ] = 'R' ;
You can’t perform that action at this time.
0 commit comments