Public Member Functions | |
def | __init__ (self, name, service_type, request_formatter=format, response_formatter=format, default_response=None, default_response_delay=0) |
def | __repr__ (self) |
def | stop (self) |
Public Member Functions inherited from scenario_test_tools.scriptable_base.ScriptableBase | |
def | __init__ (self, name, goal_formatter=format, reply_formatter=format, default_reply=None, default_reply_delay=0) |
def | add_pre_reply_callback (self, callback) |
def | await_goal (self, timeout=None, marker=None) |
def | clear_goals (self) |
def | current_goal (self) |
def | custom_reply (self) |
def | default_reply (self) |
def | default_reply (self, result) |
def | default_reply_delay (self) |
def | default_reply_delay (self, delay) |
def | direct_reply (self, result, reply_delay=None, marker=None) |
def | match_in_received_goals (self, match_against, key=lambda x:x) |
def | name (self) |
def | received_goals (self) |
def | remember_goals (self) |
def | reply (self, result, timeout=None, reply_delay=None, marker=None) |
def | reply_conditionally (self, condition, true_result, false_result, timeout=None, reply_delay=None, marker=None) |
def | stop (self) |
Private Member Functions | |
def | _execute_cb (self, request) |
Private Attributes | |
_current_goal | |
_next_reply | |
_srv | |
Additional Inherited Members | |
Public Attributes inherited from scenario_test_tools.scriptable_base.ScriptableBase | |
default_reply | |
goal_formatter | |
result_formatter | |
ScriptableServiceServer allows its users to determine the Response to a service Request
Definition at line 23 of file scriptable_service_server.py.
def scenario_test_tools.scriptable_service_server.ScriptableServiceServer.__init__ | ( | self, | |
name, | |||
service_type, | |||
request_formatter = format , |
|||
response_formatter = format , |
|||
default_response = None , |
|||
default_response_delay = 0 |
|||
) |
Set up a ScriptableServiceServer based on the name and the type ofService is should implement :param service_type: Service type (e.g. std_srvs/SetBool)
Definition at line 27 of file scriptable_service_server.py.
def scenario_test_tools.scriptable_service_server.ScriptableServiceServer.__repr__ | ( | self | ) |
Definition at line 40 of file scriptable_service_server.py.
|
private |
Called when the underlying service receives a goal. If the default_result is None, it will wait for a custom result to be set via reply* otherwise return the default_result after the given default_result_delay In the reply-case,it then notifies self.reply* (which should be called by a test script outside this class), after which self.reply* determines the result to the goal. Then it notifies _execute_cb that the result has been determined so that _execute_cb can send it
Definition at line 46 of file scriptable_service_server.py.
def scenario_test_tools.scriptable_service_server.ScriptableServiceServer.stop | ( | self | ) |
Definition at line 43 of file scriptable_service_server.py.
|
private |
Definition at line 57 of file scriptable_service_server.py.
|
private |
Definition at line 76 of file scriptable_service_server.py.
|
private |
Definition at line 38 of file scriptable_service_server.py.