Examples of using PyDIM

Implement some test classes functionality. More...

Data Structures

class  DimTask
 Creates 3 services and registeres to them. More...
class  MyClass
class  PyRpc
class  PyRpcComposite
class  PyRpcCompositeInfo
class  PyRpcInfo
class  PyRpcInt
class  PyRpcIntInfo
class  PyRpcString
class  PyRpcStringInfo
class  TestDimRpc

Functions

def test_dimc_service::DimTask::__init__
def test_dimc_service::DimTask::client_callback1
def test_dimc_service::DimTask::client_callback2
def test_dimc_service::DimTask::client_callback3
def test_dimc_cmnd::dummy
def test_dimc_service::DimTask::run
def test_dimc_cmnd::server_create_command_services
def test_dimc_service::DimTask::service1
def test_dimc_service::DimTask::service2
def test_dimc_service::DimTask::service3
def stress::service_callback
def stress::stress_callback
def test_dimc_service::usage

Variables

tuple test_dimc_service::client_names = ("task1",)
list test_dimc_service::client_names = sys.argv[2:]
 test_dimc_service::DimTask::clients
string test_dimc_cmnd::CMND1FORMAT = "C"
string test_dimc_cmnd::CMND2FORMAT = "F:2;D:2;I:1;S:1;C"
string test_dimc_cmnd::CMND3FORMAT = "I"
int test_dimc_cmnd::COMMAND_DELAY = 3
int test_dimc_cmnd::counter = 0
int stress::DEBUG = 6
float test_dimc_service::DimTask::DELAY = 0.03
int stress::i = 0
tuple test_dimc_cmnd::list_args = range(counter, counter+2)
tuple test_dimRpcInfo::myRpcComposite = PyRpcComposite()
tuple test_dimRpcInfo::myRpcCompositeCaller = PyRpcCompositeInfo()
tuple test_dimRpcInfo::myRpcFailCaller = PyRpcStringInfo('testRcp4')
tuple test_dimRpcInfo::myRpcInt = PyRpcInt()
tuple test_dimRpcInfo::myRpcIntCaller = PyRpcIntInfo()
tuple test_dimRpcInfo::myRpcString = PyRpcString()
tuple test_dimRpcInfo::myRpcStringCaller = PyRpcStringInfo()
int stress::n = 500000
tuple test_dimc_cmnd::res = pydim.dic_cmnd_service('test3', list_args, CMND3FORMAT)
tuple test_dimc_cmnd::res = pydim.dic_cmnd_service('test2', tuple_args, CMND2FORMAT)
tuple test_dimc_cmnd::res = pydim.dic_cmnd_service('test1', tuple_args, CMND1FORMAT)
tuple stress::res = dic_cmnd_service('STRESS_CMD', ('STRESSYOU!\0',), "C")
tuple stress::s = dis_add_service("PYSTRESS_SVC", "I", service_callback, 0)
tuple stress::si = dic_info_service("STRESS_SVC", "I", stress_callback)
string test_dimc_service::DimTask::SRV1FORMAT = 'F:1;I:1;D:2;C:10;C'
string test_dimc_service::DimTask::SRV2FORMAT = 'D'
string test_dimc_service::DimTask::SRV2NAME = 'Test_Serv2_'
string test_dimc_service::DimTask::SRV3FORMAT = 'C'
string test_dimc_service::DimTask::SRV3NAME = 'Test_Serv3_'
 test_dimc_service::DimTask::svc1
 test_dimc_service::DimTask::svc2
 test_dimc_service::DimTask::svc3
tuple test_dimc_service::task = DimTask(task_name, client_names, updates=10/DimTask.DELAY)
string test_dimc_service::task_name = "task1"
list test_dimc_service::task_name = sys.argv[1]
tuple test_dimc_cmnd::tuple_args = (counter, counter+1, counter*9, counter*1.9, counter, counter-1, 'ABRACADABRA')
tuple test_dimc_cmnd::tuple_args = ('Test call no. %03d' %counter, )
 test_dimc_service::DimTask::updates

Detailed Description

Implement some test classes functionality.

Various examples using the C and C++ DIM APIs.

You can execute some tests/examples from the 'tests' directory. These scripts can be used as examples of the module's functionality.


Function Documentation

def __init__ (   self,
  name,
  clients,
  updates = 10 
) [inherited]

Definition at line 40 of file test_dimc_service.py.

def client_callback1 (   self,
  args 
) [inherited]

Definition at line 104 of file test_dimc_service.py.

def client_callback2 (   self,
  args 
) [inherited]

Definition at line 108 of file test_dimc_service.py.

def client_callback3 (   self,
  args 
) [inherited]

Definition at line 112 of file test_dimc_service.py.

def test_dimc_cmnd::dummy (   args  ) 

Definition at line 26 of file test_dimc_cmnd.py.

def run (   self  )  [inherited]

Definition at line 57 of file test_dimc_service.py.

def test_dimc_cmnd::server_create_command_services (  ) 

Definition at line 35 of file test_dimc_cmnd.py.

def service1 (   self  )  [inherited]

Definition at line 95 of file test_dimc_service.py.

def service2 (   self  )  [inherited]

Definition at line 98 of file test_dimc_service.py.

def service3 (   self  )  [inherited]

Definition at line 101 of file test_dimc_service.py.

def stress::service_callback (   tag  ) 

Definition at line 31 of file stress.py.

def stress::stress_callback (   args  ) 

Definition at line 25 of file stress.py.

def test_dimc_service::usage (  ) 

Definition at line 117 of file test_dimc_service.py.


Variable Documentation

tuple client_names = ("task1",) [static]

Definition at line 130 of file test_dimc_service.py.

list client_names = sys.argv[2:] [static]

Definition at line 128 of file test_dimc_service.py.

clients [inherited]

Definition at line 43 of file test_dimc_service.py.

string CMND1FORMAT = "C" [static]

Definition at line 22 of file test_dimc_cmnd.py.

string CMND2FORMAT = "F:2;D:2;I:1;S:1;C" [static]

Definition at line 23 of file test_dimc_cmnd.py.

string CMND3FORMAT = "I" [static]

Definition at line 24 of file test_dimc_cmnd.py.

int COMMAND_DELAY = 3 [static]

Definition at line 20 of file test_dimc_cmnd.py.

int counter = 0 [static]

Definition at line 53 of file test_dimc_cmnd.py.

int DEBUG = 6 [static]

Definition at line 24 of file stress.py.

float DELAY = 0.03 [static, inherited]

Definition at line 38 of file test_dimc_service.py.

int i = 0 [static]

Definition at line 23 of file stress.py.

tuple list_args = range(counter, counter+2) [static]

Definition at line 78 of file test_dimc_cmnd.py.

tuple myRpcComposite = PyRpcComposite() [static]

Definition at line 108 of file test_dimRpcInfo.py.

tuple myRpcCompositeCaller = PyRpcCompositeInfo() [static]

Definition at line 109 of file test_dimRpcInfo.py.

tuple myRpcFailCaller = PyRpcStringInfo('testRcp4') [static]

Definition at line 111 of file test_dimRpcInfo.py.

tuple myRpcInt = PyRpcInt() [static]

Definition at line 104 of file test_dimRpcInfo.py.

tuple myRpcIntCaller = PyRpcIntInfo() [static]

Definition at line 105 of file test_dimRpcInfo.py.

tuple myRpcString = PyRpcString() [static]

Definition at line 106 of file test_dimRpcInfo.py.

tuple myRpcStringCaller = PyRpcStringInfo() [static]

Definition at line 107 of file test_dimRpcInfo.py.

int n = 500000 [static]

Definition at line 39 of file stress.py.

tuple res = pydim.dic_cmnd_service('test3', list_args, CMND3FORMAT) [static]

Definition at line 79 of file test_dimc_cmnd.py.

tuple res = pydim.dic_cmnd_service('test2', tuple_args, CMND2FORMAT) [static]

Definition at line 69 of file test_dimc_cmnd.py.

tuple res = pydim.dic_cmnd_service('test1', tuple_args, CMND1FORMAT) [static]

Definition at line 59 of file test_dimc_cmnd.py.

tuple res = dic_cmnd_service('STRESS_CMD', ('STRESSYOU!\0',), "C") [static]

Definition at line 45 of file stress.py.

tuple s = dis_add_service("PYSTRESS_SVC", "I", service_callback, 0) [static]

Definition at line 42 of file stress.py.

tuple si = dic_info_service("STRESS_SVC", "I", stress_callback) [static]

Definition at line 41 of file stress.py.

string SRV1FORMAT = 'F:1;I:1;D:2;C:10;C' [static, inherited]

Definition at line 35 of file test_dimc_service.py.

string SRV2FORMAT = 'D' [static, inherited]

Definition at line 36 of file test_dimc_service.py.

string SRV2NAME = 'Test_Serv2_' [static, inherited]

Definition at line 33 of file test_dimc_service.py.

string SRV3FORMAT = 'C' [static, inherited]

Definition at line 37 of file test_dimc_service.py.

string SRV3NAME = 'Test_Serv3_' [static, inherited]

Definition at line 34 of file test_dimc_service.py.

svc1 [inherited]

Definition at line 44 of file test_dimc_service.py.

svc2 [inherited]

Definition at line 47 of file test_dimc_service.py.

svc3 [inherited]

Definition at line 50 of file test_dimc_service.py.

tuple task = DimTask(task_name, client_names, updates=10/DimTask.DELAY) [static]

Definition at line 131 of file test_dimc_service.py.

string task_name = "task1" [static]

Definition at line 127 of file test_dimc_service.py.

list task_name = sys.argv[1] [static]

Definition at line 125 of file test_dimc_service.py.

tuple tuple_args = (counter, counter+1, counter*9, counter*1.9, counter, counter-1, 'ABRACADABRA') [static]

Definition at line 68 of file test_dimc_cmnd.py.

tuple tuple_args = ('Test call no. %03d' %counter, ) [static]

Definition at line 58 of file test_dimc_cmnd.py.

updates [inherited]

Definition at line 42 of file test_dimc_service.py.


Generated on 5 Feb 2014 for PyDIM by  doxygen 1.4.7