add type names, some more introspection functions
Almost there! Known issues: * mangling/demangling is still wrong * it necessarily has to run in the Cyclone default domain id: (1) Cyclone is today still limited to a single domain at a time; and (2) there is the "extra" participant that pops up here and there for creating guard conditions and waitsets without a node existing * almost all query operations create a reader for a builtin topic and throw it away afterward, that might be a little excessive (on the other hand, those readers are pretty cheap, so using them as a throwaway reader is not so bad). Still missing: * get_service_names_and_types * get_service_names_and_types_by_node I haven't been able to actually try everything yet, so bugs are probably lurking here-and-there.
This commit is contained in:
parent
24726b4685
commit
f1602da3be
4 changed files with 244 additions and 151 deletions
|
@ -113,6 +113,7 @@ class TypeSupport
|
|||
public:
|
||||
bool serializeROSmessage(const void * ros_message, cycser & ser, std::function<void(cycser&)> prefix = nullptr);
|
||||
bool deserializeROSmessage(cycdeser & deser, void * ros_message, std::function<void(cycdeser&)> prefix = nullptr);
|
||||
std::string getName ();
|
||||
|
||||
protected:
|
||||
TypeSupport();
|
||||
|
|
|
@ -656,6 +656,12 @@ bool TypeSupport<MembersType>::deserializeROSmessage(
|
|||
return true;
|
||||
}
|
||||
|
||||
template<typename MembersType>
|
||||
std::string TypeSupport<MembersType>::getName ()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
} // namespace rmw_cyclonedds_cpp
|
||||
|
||||
#endif // RMW_CYCLONEDDS_CPP__TYPESUPPORT_IMPL_HPP_
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue