Package roslib :: Module srvs
[frames] | no frames]

Module srvs

source code

ROS Service Description Language Spec Implements http://ros.org/wiki/srv

Classes
  SrvSpecException
  SrvSpec
Functions
 
is_verbose() source code
 
set_verbose(v) source code
[str]
list_srv_types(package, include_depends)
list all services in the specified package
source code
str
srv_file(package, type_)
Returns: file path of .srv file in specified package
source code
[(str,roslib.MsgSpec), [str]]
get_pkg_srv_specs(package)
List all messages that a package contains
source code
roslib.MsgSpec
load_from_string(text, package_context='', full_name='', short_name='')
Returns: Message type name and message specification
source code
(str, SrvSpec)
load_from_file(file_name, package_context='')
Convert the .srv representation in the file to a SrvSpec instance.
source code
Variables
  EXT = '.srv'
  SEP = '/'
  IODELIM = '---'
  COMMENTCHAR = '#'
  VERBOSE = False
  __package__ = 'roslib'
Function Details

list_srv_types(package, include_depends)

source code 

list all services in the specified package

Parameters:
  • package (str) - name of package to search
  • include_depends (bool) - if True, will also list services in package dependencies
Returns: [str]
service type names

srv_file(package, type_)

source code 
Parameters:
  • package (str) - name of package .srv file is in
  • type_ (str) - type name of service
Returns: str
file path of .srv file in specified package

get_pkg_srv_specs(package)

source code 

List all messages that a package contains

Parameters:
  • depend (Depend) - roslib.manifest.Depend object representing package to load messages from
Returns: [(str,roslib.MsgSpec), [str]]
list of message type names and specs for package, as well as a list of message names that could not be processed.

load_from_string(text, package_context='', full_name='', short_name='')

source code 
Parameters:
  • text (str) - .msg text
  • package_context (str) - context to use for msgTypeName, i.e. the package name, or '' to use local naming convention.
Returns: roslib.MsgSpec
Message type name and message specification
Raises:
  • roslib.MsgSpecException - if syntax errors or other problems are detected in file

load_from_file(file_name, package_context='')

source code 

Convert the .srv representation in the file to a SrvSpec instance.

Parameters:
  • file_name (str) - name of file to load from
  • package_context (str) - context to use for type name, i.e. the package name, or '' to use local naming convention.
Returns: (str, SrvSpec)
Message type name and message specification
Raises: