Started with gobotrpc autogenerated parser and ctest (not working)
This commit is contained in:
20
gobotrpc/generator/templates/package_util.cpp.j2
Normal file
20
gobotrpc/generator/templates/package_util.cpp.j2
Normal file
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
/**
|
||||
* This Header file was auto-generated by the GobotRPC-Protocol-Generator-Tool
|
||||
*/
|
||||
|
||||
#include {{ "<stdint.h>" }}
|
||||
{%- for h in headers %}
|
||||
#include {{ "\"" + h + "\"" }}
|
||||
{%- endfor %}
|
||||
|
||||
int getPackageSize(uint8_t data) {
|
||||
switch(data) {
|
||||
{%- for n in rpcSizes %}
|
||||
case {{ prefix }}RPCNames::{{ n }}:
|
||||
return {{ rpcSizes[n] }};
|
||||
{%- endfor %}
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user