pydim::__init__ Namespace Reference


Data Structures

class  Dns
class  PyDimRpcProxy
 Class that facilitates publishing of random python functions using a single DIM RPC. More...

Functions

def dic_sync_cmnd_service
 A synchronous call for executing a command.
def dic_sync_info_service
 A synchronous call for getting the value of a service.
def dim_service
 A decorator function that makes easier to use normal functions as callbacks for DIM services.
def dim_service_tag
 A decorator function that makes easier to use function with an argument as callbacks for DIM services.

Variables

string _version = '1.3.4'
tuple dns = Dns()


Function Documentation

def pydim::__init__::dic_sync_cmnd_service (   name,
  arguments,
  description,
  timeout = None 
)

A synchronous call for executing a command.

This function works in the same way as `dic_cmnd_service`, but it waits until the command is executed.

Arguments are:

*name* Command name, same name used by server when declaring the command service.

*arguments* A tuple with the values that are sent to the command as arguments.

*description* The description string of the command.

*timeout* The number of seconds after which the command is considered to have failed. Optional, by default there is no timeout.

It returns an integer which indicates if the command was executed successfully; 1 if it was correctly sent to the server, 0 otherwise.

Definition at line 334 of file __init__.py.

def pydim::__init__::dic_sync_info_service (   name,
  description,
  timeout = None,
  default_value = None 
)

A synchronous call for getting the value of a service.

This function is equivalent to `dic_info_service`, but it waits until the value is retrieved and returns the value of the service. For this reason a callback function is not needed.

Arguments are:

*name* Service name. same name used by server when declaring the service.

*description* The description string of the service.

*timeout* The number of seconds after which the service is considered to have failed. Optional, by default there is no timeout.

*default_value* The value that will be returned in case the service doesn't succeed. Optional, default is `None`.

Definition at line 288 of file __init__.py.

def pydim::__init__::dim_service (   fn  ) 

A decorator function that makes easier to use normal functions as callbacks for DIM services.

'fn' is a function (in general, a callable object) that doesn't receive arguments, and returns a function that is suited for DIM callbacks.

Definition at line 238 of file __init__.py.

def pydim::__init__::dim_service_tag (   fn  ) 

A decorator function that makes easier to use function with an argument as callbacks for DIM services.

'fn' is a function (in general, a callable object) that receives one argument, and returns a function that is suited for DIM callbacks. The argument used is the tag of the service tag registerd with DIM.

Definition at line 258 of file __init__.py.


Variable Documentation

string _version = '1.3.4' [static]

Definition at line 22 of file __init__.py.

tuple dns = Dns() [static]

Definition at line 356 of file __init__.py.


Generated on 5 Feb 2014 for PyDIM by  doxygen 1.4.7