Package rospy :: Package impl :: Module masterslave

Module masterslave

source code

Internal use: ROS Node (Slave) API.

The Node API is implemented by the ROSHandler.

API return convention: (statusCode, statusMessage, returnValue)

Current status codes:

Individual methods may assign additional meaning/semantics to statusCode.

Base handler for both slave and master nodes.
is_publishers_list(paramName) source code
apivalidate(error_return_value, validators=())
ROS master/slave arg-checking decorator.
source code
  STATUS = 0
  MSG = 1
  VAL = 2
  LOG_API = True
  __package__ = 'rospy.impl'
Function Details

apivalidate(error_return_value, validators=())

source code 

ROS master/slave arg-checking decorator. Applies the specified validator to the corresponding argument and also remaps each argument to be the value returned by the validator. Thus, arguments can be simultaneously validated and canonicalized prior to actual function call.

  • error_return_value - API value to return if call unexpectedly fails
  • validators (sequence) - sequence of validators to apply to each arg. None means no validation for the parameter is required. As all api methods take caller_id as the first parameter, the validators start with the second param.