Functions
gensrv_cpp Namespace Reference

Functions

def generate
def generate_services
def write_begin
def write_end
def write_generic_includes
def write_trait_char_class
def write_traits

Function Documentation

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 146 of file gensrv_cpp.py.

Definition at line 213 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 56 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 71 of file gensrv_cpp.py.

Writes the includes that all service need

@param s: The stream to write to
@type s: stream

Definition at line 82 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 91 of file gensrv_cpp.py.

def gensrv_cpp.write_traits (   s,
  spec,
  cpp_name_prefix,
  rospack = None 
)
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 117 of file gensrv_cpp.py.



roscpp
Author(s): Morgan Quigley, Josh Faust, Brian Gerkey, Troy Straszheim
autogenerated on Tue Mar 7 2017 04:01:04