test_dimc_service_client.py

Go to the documentation of this file.
00001 import sys
00002 from debug import SAY, ERROR, DEBUG
00003 import dimc, debug
00004 from time import sleep
00005 from threading import Thread, Event
00006 
00007 debug.DEBUG = 1
00008 
00009 SRV1NAME='Test_Serv1'
00010 SRV2NAME='Test_Serv2'
00011 SRV3NAME='Test_Serv3'
00012 SRV1FORMAT='F:1;I:1;D:2;C:10;C:100' # buffer size is 35 on 32 bits 
00013 SRV2FORMAT='D:1' 
00014 SRV3FORMAT='C:100'
00015 
00016 def client_callback1(*args):
00017     print 'client callback called for service1. Args are', args
00018 
00019 def client_callback2(*args):
00020     print 'client callback called for service2. Args are', args
00021 
00022 def client_callback3(*args):
00023     print 'client callback called for service3. Args are', args
00024 
00025 if __name__=='__main__':
00026     dimc.dic_info_service(SRV1NAME, SRV1FORMAT, client_callback1)
00027     dimc.dic_info_service(SRV2NAME, SRV2FORMAT, client_callback2)
00028     dimc.dic_info_service(SRV3NAME, SRV3FORMAT, client_callback3)
00029     sleep(1000)
00030     
00031 

Generated on 5 Feb 2014 for PyDIM by  doxygen 1.4.7