Started with gobotrpc autogenerated parser and ctest (not working)
This commit is contained in:
29
gobotrpc/generator/templates/package_struct_template.hpp.j2
Normal file
29
gobotrpc/generator/templates/package_struct_template.hpp.j2
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
/**
|
||||
* This Header file was auto-generated by the GobotRPC-Protocol-Generator-Tool
|
||||
*/
|
||||
|
||||
#include {{ "<stdint.h>" }}
|
||||
#include "{{ enum_header_file }}"
|
||||
|
||||
enum {{ prefix }}RPCNames {{"{"}}
|
||||
{%- for n in rpcNames %}
|
||||
{{ n }} = {{ rpcNames[n] }},
|
||||
{%- endfor %}
|
||||
{{"}"}};
|
||||
|
||||
enum {{ prefix }}RPCTypes {{"{"}}
|
||||
{%- for n in rpcTypes %}
|
||||
{{ n }} = {{ rpcTypes[n] }},
|
||||
{%- endfor %}
|
||||
{{"}"}};
|
||||
|
||||
int getPackageSize(uint8_t data);
|
||||
|
||||
{% for struct in package_list %}
|
||||
struct {{ struct.name }} {{ "{" }}
|
||||
{% for field in struct.fields -%}
|
||||
{{ "\t" }}{{ field.type }} {{ field.name }} : {{ field.size_bits }};
|
||||
{% endfor -%}
|
||||
{{ "}" }};
|
||||
{% endfor %}
|
||||
Reference in New Issue
Block a user