ecal.core.service module¶
Module that contains the ecal server/client interface.
-
class
ecal.core.service.
Client
(service_name)¶ Bases:
object
eCAL client
-
add_response_callback
(callback)¶ add response callback to client
- Parameters
callback – the response callback function (f(service_info, response))
-
call_method
(method_name, request, timeout=- 1)¶ call a method of the service
- Parameters
method_name (string) – the method name to call
request (string) – the request argument for the method
timeout (integer) – maximum time before operation returns (in milliseconds, -1 means infinite)
-
destroy
()¶ destroy server
-
rem_response_callback
(method_name)¶ remove response callback from client
-
set_hostname
(host_name)¶ set host name of the service
- Parameters
host_name (string) – the host name the service is running on
-
-
class
ecal.core.service.
Server
(service_name)¶ Bases:
object
eCAL server
-
add_method_callback
(method_name, req_type, resp_type, callback)¶ add method callback to server
- Parameters
method_name (string) – the name of method to add
req_type – the type of the method request (optional)
resp_type – the type of the method response (optional)
callback – the method callback function (response = f(method_name, req_type, resp_type, request))
-
destroy
()¶ destroy server
-
rem_method_callback
(method_name)¶ remove method callback from server
- Parameters
method_name (string) – the name of method to add
-