Closed milindur closed 7 years ago
Interesting. The sample has a function with neither parameters nor returns and it generates this:
namespace details
{
namespace Calculator
{
static const auto _param_Clear =
utility::tuple_to_array(std::make_tuple('\0'));
static const auto _return_Clear =
utility::tuple_to_array(std::make_tuple('\0'));
}
}
I'll look into what goes wrong when we put a single parameter in place. I'm observing the same.
Found it.
namespace details
{
namespace ${interface_name()}
{
static const auto _param_${ method.CamelCase } =
% if len(method.parameters) == 0:
utility::tuple_to_array(std::make_tuple('\0'));
% else:
utility::tuple_to_array(message::types::type_id<
${ parameters_types_as_list() }>());
% endif
static const auto _return_${ method.CamelCase } =
% if len(method.parameters) == 0: <------ oops!
utility::tuple_to_array(std::make_tuple('\0'));
% else:
utility::tuple_to_array(message::types::type_id<
${ returns_as_list(as_param=False) }>());
% endif
}
}
Fix here:
remote: https://gerrit.openbmc-project.xyz/1260 sdbus++: generate valid code 0 return methods
Thanks, now it's working for me, too.
When defining an interface with a method without return value, e.g.
the sdbus++ tool generates invalid code:
_return_Ping
has no associated type list. The error is