Index: scripts/MsgUtils/msgutils/templates/MsgDefs_h.jinja =================================================================== diff -u -rbde1243eb2ff6af2868f6c6ad0cb4f5760aaf68b -r088513e6ea7bad08b4fb7862127c726eabad18fd --- scripts/MsgUtils/msgutils/templates/MsgDefs_h.jinja (.../MsgDefs_h.jinja) (revision bde1243eb2ff6af2868f6c6ad0cb4f5760aaf68b) +++ scripts/MsgUtils/msgutils/templates/MsgDefs_h.jinja (.../MsgDefs_h.jinja) (revision 088513e6ea7bad08b4fb7862127c726eabad18fd) @@ -65,7 +65,11 @@ // payload: {{ msg_cpp.field_list(msg_id_value) | join(", ") }} struct {{ msg['msg_name'] }}Payload { {%- for field in msg['cpp_struct']['payload'] %} - {{ field['cpp_type'] }} {{ field['name'] }}; +{%- if field['type'] == "union" %} + union {{ field['name'] }}; +{%- else %} + Types::{{ field['type'] }} {{ field['name'] }}; +{%- endif %} {%- endfor %} {%- if msg['cpp_struct']['payload'] | length %} {% endif %} @@ -88,9 +92,11 @@ void dump() const; }; {%- endfor %} -{%- if cpp_namespace is defined and cpp_namespace is not none %} +{%- if proto is defined %} QByteArray canMessageToProtobufByteArray(const QDateTime ×tamp, const QString &deviceSerialNumber, const Can::Message &msg); +{%- endif %} +{%- if cpp_namespace is defined and cpp_namespace is not none %} } // namespace {{ cpp_namespace }} {%- endif %}