Functions | |
def | generate |
def | generate_services |
def | write_begin |
def | write_end |
def | write_generic_includes |
def | write_trait_char_class |
def | write_traits |
def gensrv_cpp.generate | ( | srv_path | ) |
Generate a service @param srv_path: the path to the .srv file @type srv_path: str
Definition at line 145 of file gensrv_cpp.py.
def gensrv_cpp.generate_services | ( | argv | ) |
Definition at line 211 of file gensrv_cpp.py.
def gensrv_cpp.write_begin | ( | s, | |
spec, | |||
file | |||
) |
Writes the beginning of the header file: a comment saying it's auto-generated and the include guards @param s: The stream to write to @type s: stream @param spec: The spec @type spec: roslib.srvs.SrvSpec @param file: The file this service is being generated for @type file: str
Definition at line 55 of file gensrv_cpp.py.
def gensrv_cpp.write_end | ( | s, | |
spec | |||
) |
Writes the end of the header file: the ending of the include guards @param s: The stream to write to @type s: stream @param spec: The spec @type spec: roslib.srvs.SrvSpec
Definition at line 70 of file gensrv_cpp.py.
def gensrv_cpp.write_generic_includes | ( | s | ) |
Writes the includes that all service need @param s: The stream to write to @type s: stream
Definition at line 81 of file gensrv_cpp.py.
def gensrv_cpp.write_trait_char_class | ( | s, | |
class_name, | |||
cpp_msg, | |||
value | |||
) |
Writes a class trait for traits which have static value() members that return const char* e.g. write_trait_char_class(s, "MD5Sum", "std_srvs::Empty", "hello") yields: template<> struct MD5Sum<std_srvs::Empty> { static const char* value() { return "hello"; } static const char* value(const std_srvs::Empty&) { return value(); } }; @param s: The stream to write to @type s: stream @param class_name: The name of the trait class @type class_name: str @param cpp_msg: The C++ message declaration, e.g. "std_srvs::Empty" @type cpp_msg: str @param value: The string value to return from the value() function @type value: str
Definition at line 90 of file gensrv_cpp.py.
def gensrv_cpp.write_traits | ( | s, | |
spec, | |||
cpp_name_prefix | |||
) |
Write all the service traits for a message @param s: The stream to write to @type s: stream @param spec: The service spec @type spec: roslib.srvs.SrvSpec @param cpp_name_prefix: The C++ prefix to prepend when referencing the service, e.g. "std_srvs::" @type cpp_name_prefix: str
Definition at line 116 of file gensrv_cpp.py.