当前位置: 首页>>代码示例>>Python>>正文


Python PySimpleClient.releaseComponent方法代码示例

本文整理汇总了Python中Acspy.Clients.SimpleClient.PySimpleClient.releaseComponent方法的典型用法代码示例。如果您正苦于以下问题:Python PySimpleClient.releaseComponent方法的具体用法?Python PySimpleClient.releaseComponent怎么用?Python PySimpleClient.releaseComponent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Acspy.Clients.SimpleClient.PySimpleClient的用法示例。


在下文中一共展示了PySimpleClient.releaseComponent方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: TSJavaImpTestPy

# 需要导入模块: from Acspy.Clients.SimpleClient import PySimpleClient [as 别名]
# 或者: from Acspy.Clients.SimpleClient.PySimpleClient import releaseComponent [as 别名]
class TSJavaImpTestPy(unittest.TestCase):

	################################################
	# lifecycle
	################################################
	
	def setUp(self):
		self.simpleClient = PySimpleClient()
		self.componentName = "testInstanceTSJavaImp"
		self.simpleClient.getLogger().logInfo("pyUnitTestTSJavaImp.TSJavaImpTestPy.setUp()...")
        self.simpleClient.getLogger().logInfo("Get component " + self.componentName)
        self.component = self.simpleClient.getComponent(self.componentName)
	#__pPp__	    	           
	
	def tearDown(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestTSJavaImp.TSJavaImpTestPy.tearDown()...")
		self.simpleClient.getLogger().logInfo("Releasing component " + self.componentName)
		self.simpleClient.releaseComponent(self.componentName)
		self.simpleClient.disconnect()
	#__pPp__       
        
	################################################
	# test methods
	################################################
	
	def testRunManualRAB(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestTSJavaImp.TSJavaImpTestPy.testRunManualRAB()...")
		response = None
		type = 0
		pos = position()
		response = self.component.runManualRAB(type, pos)
		# no return is expected, response should be None
		assert response is None
	#__pPp__
			    
	def testRunAutoRAB(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestTSJavaImp.TSJavaImpTestPy.testRunAutoRAB()...")
		response = None
		type = 0
		pos = position()
		response = self.component.runAutoRAB(type, pos)
		# no return is expected, response should be None
		assert response is None
	#__pPp__
			    
	def testGetRobotsList(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestTSJavaImp.TSJavaImpTestPy.testGetRobotsList()...")
		response = None
		response = self.component.getRobotsList()
		# a return is expected, response should be not None
		assert response is not None
	#__pPp__
			    
	def testGetRobotStatus(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestTSJavaImp.TSJavaImpTestPy.testGetRobotStatus()...")
		response = None
		id = 0
		response = self.component.getRobotStatus(id)
		# a return is expected, response should be not None
		assert response is not None
开发者ID:Open-MBEE,项目名称:Comodo,代码行数:62,代码来源:pyUnitTestTSJavaImp.py

示例2: MasterComponentImplTestPy

# 需要导入模块: from Acspy.Clients.SimpleClient import PySimpleClient [as 别名]
# 或者: from Acspy.Clients.SimpleClient.PySimpleClient import releaseComponent [as 别名]
class MasterComponentImplTestPy(unittest.TestCase):

	################################################
	# lifecycle
	################################################
	
	def setUp(self):
		self.simpleClient = PySimpleClient()
		self.componentName = "testInstanceMasterComponentImpl"
		self.simpleClient.getLogger().logInfo("pyUnitTestMasterComponentImpl.MasterComponentImplTestPy.setUp()...")
        self.simpleClient.getLogger().logInfo("Get component " + self.componentName)
        self.component = self.simpleClient.getComponent(self.componentName)
	#__pPp__	    	           
	
	def tearDown(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestMasterComponentImpl.MasterComponentImplTestPy.tearDown()...")
		self.simpleClient.getLogger().logInfo("Releasing component " + self.componentName)
		self.simpleClient.releaseComponent(self.componentName)
		self.simpleClient.disconnect()
	#__pPp__       
        
	################################################
	# test methods
	################################################
	
	def testDoTransition(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestMasterComponentImpl.MasterComponentImplTestPy.testDoTransition()...")
		response = None
		event = SubsystemStateEvent()
		response = self.component.doTransition(event)
		# no return is expected, response should be None
		assert response is None
开发者ID:Open-MBEE,项目名称:Comodo,代码行数:34,代码来源:pyUnitTestMasterComponentImpl.py

示例3: TestStorageMethods

# 需要导入模块: from Acspy.Clients.SimpleClient import PySimpleClient [as 别名]
# 或者: from Acspy.Clients.SimpleClient.PySimpleClient import releaseComponent [as 别名]
class TestStorageMethods(unittest.TestCase):
    def test_full(self):
        self.client = PySimpleClient()
        self.storage = self.client.getComponent("STORAGE")

        self.storage.clearAllData()

        targets = []
        images = []
        for i in range(10):
            targets.append(TYPES.Target(i, TYPES.Position(10.0, 45.0), 2))
            image = bytearray()
            for j in range(1000000):
                image.append(j % 256)
            images.append(bytes(image))
        proposal = TYPES.Proposal(0, targets, 0)
        self.storage.storeObservation(proposal, images)

        id = self.storage.getNextValidId()
        print "ID", id
        self.assertEqual(1, id, "Checking ID")

        result = self.storage.getObservation(0)
        self.assertEqual(10, len(result), "Number of observations")

        self.storage.clearAllData()

        self.client.releaseComponent(self.storage._get_name())
开发者ID:javarias,项目名称:ACS-Workshop,代码行数:30,代码来源:testStorage.py

示例4: DCSImplTestPy

# 需要导入模块: from Acspy.Clients.SimpleClient import PySimpleClient [as 别名]
# 或者: from Acspy.Clients.SimpleClient.PySimpleClient import releaseComponent [as 别名]
class DCSImplTestPy(unittest.TestCase):

	################################################
	# lifecycle
	################################################
	
	def setUp(self):
		self.simpleClient = PySimpleClient()
		self.componentName = "testInstanceDCSImpl"
		self.simpleClient.getLogger().logInfo("pyUnitTestDCSImpl.DCSImplTestPy.setUp()...")
        self.simpleClient.getLogger().logInfo("Get component " + self.componentName)
        self.component = self.simpleClient.getComponent(self.componentName)
	#__pPp__	    	           
	
	def tearDown(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestDCSImpl.DCSImplTestPy.tearDown()...")
		self.simpleClient.getLogger().logInfo("Releasing component " + self.componentName)
		self.simpleClient.releaseComponent(self.componentName)
		self.simpleClient.disconnect()
	#__pPp__       
        
	################################################
	# test methods
	################################################
	
	def testSendCommand(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestDCSImpl.DCSImplTestPy.testSendCommand()...")
		response = None
		commandName = 'emptyString'
		parameterList = 'emptyString'
		cb = CBstring()
		desc = CBDescIn()
		response = self.component.sendCommand(commandName, parameterList, cb, desc)
		# a return is expected, response should be not None
		assert response is not None
开发者ID:Open-MBEE,项目名称:Comodo,代码行数:37,代码来源:pyUnitTestDCSImpl.py

示例5: prsComponentCppImplTestPy

# 需要导入模块: from Acspy.Clients.SimpleClient import PySimpleClient [as 别名]
# 或者: from Acspy.Clients.SimpleClient.PySimpleClient import releaseComponent [as 别名]
class prsComponentCppImplTestPy(unittest.TestCase):

	################################################
	# lifecycle
	################################################
	
	def setUp(self):
		self.simpleClient = PySimpleClient()
		self.componentName = "testInstanceprsComponentCppImpl"
		self.simpleClient.getLogger().logInfo("pyUnitTestprsComponentCppImpl.prsComponentCppImplTestPy.setUp()...")
        self.simpleClient.getLogger().logInfo("Get component " + self.componentName)
        self.component = self.simpleClient.getComponent(self.componentName)
	#__pPp__	    	           
	
	def tearDown(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestprsComponentCppImpl.prsComponentCppImplTestPy.tearDown()...")
		self.simpleClient.getLogger().logInfo("Releasing component " + self.componentName)
		self.simpleClient.releaseComponent(self.componentName)
		self.simpleClient.disconnect()
	#__pPp__       
        
	################################################
	# test methods
	################################################
	
	def testPark(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestprsComponentCppImpl.prsComponentCppImplTestPy.testPark()...")
		response = None
		response = self.component.Park()
		# no return is expected, response should be None
		assert response is None
开发者ID:Open-MBEE,项目名称:Comodo,代码行数:33,代码来源:pyUnitTestprsComponentCppImpl.py

示例6: StopWatchLightImplTestPy

# 需要导入模块: from Acspy.Clients.SimpleClient import PySimpleClient [as 别名]
# 或者: from Acspy.Clients.SimpleClient.PySimpleClient import releaseComponent [as 别名]
class StopWatchLightImplTestPy(unittest.TestCase):

	################################################
	# lifecycle
	################################################
	
	def setUp(self):
		self.simpleClient = PySimpleClient()
		self.componentName = "testInstanceStopWatchLightImpl"
		self.simpleClient.getLogger().logInfo("pyUnitTestStopWatchLightImpl.StopWatchLightImplTestPy.setUp()...")
        self.simpleClient.getLogger().logInfo("Get component " + self.componentName)
        self.component = self.simpleClient.getComponent(self.componentName)
	#__pPp__	    	           
	
	def tearDown(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestStopWatchLightImpl.StopWatchLightImplTestPy.tearDown()...")
		self.simpleClient.getLogger().logInfo("Releasing component " + self.componentName)
		self.simpleClient.releaseComponent(self.componentName)
		self.simpleClient.disconnect()
	#__pPp__       
        
	################################################
	# test methods
	################################################
	
	def testGetDisplay(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestStopWatchLightImpl.StopWatchLightImplTestPy.testGetDisplay()...")
		response = None
		response = self.component.getDisplay()
		# a return is expected, response should be not None
		assert response is not None
开发者ID:Open-MBEE,项目名称:Comodo,代码行数:33,代码来源:pyUnitTestStopWatchLightImpl.py

示例7: TRDJavaImpTestPy

# 需要导入模块: from Acspy.Clients.SimpleClient import PySimpleClient [as 别名]
# 或者: from Acspy.Clients.SimpleClient.PySimpleClient import releaseComponent [as 别名]
class TRDJavaImpTestPy(unittest.TestCase):

	################################################
	# lifecycle
	################################################
	
	def setUp(self):
		self.simpleClient = PySimpleClient()
		self.componentName = "testInstanceTRDJavaImp"
		self.simpleClient.getLogger().logInfo("pyUnitTestTRDJavaImp.TRDJavaImpTestPy.setUp()...")
        self.simpleClient.getLogger().logInfo("Get component " + self.componentName)
        self.component = self.simpleClient.getComponent(self.componentName)
	#__pPp__	    	           
	
	def tearDown(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestTRDJavaImp.TRDJavaImpTestPy.tearDown()...")
		self.simpleClient.getLogger().logInfo("Releasing component " + self.componentName)
		self.simpleClient.releaseComponent(self.componentName)
		self.simpleClient.disconnect()
	#__pPp__       
        
	################################################
	# test methods
	################################################
	
	def testGetRAB(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestTRDJavaImp.TRDJavaImpTestPy.testGetRAB()...")
		response = None
		type = 0
		response = self.component.getRAB(type)
		# a return is expected, response should be not None
		assert response is not None
	#__pPp__
			    
	def testCreateReport(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestTRDJavaImp.TRDJavaImpTestPy.testCreateReport()...")
		response = None
		rep = report()
		response = self.component.createReport(rep)
		# a return is expected, response should be not None
		assert response is not None
	#__pPp__
			    
	def testGetReportsList(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestTRDJavaImp.TRDJavaImpTestPy.testGetReportsList()...")
		response = None
		response = self.component.getReportsList()
		# a return is expected, response should be not None
		assert response is not None
	#__pPp__
			    
	def testGetReport(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestTRDJavaImp.TRDJavaImpTestPy.testGetReport()...")
		response = None
		id = 0
		response = self.component.getReport(id)
		# a return is expected, response should be not None
		assert response is not None
开发者ID:Open-MBEE,项目名称:Comodo,代码行数:60,代码来源:pyUnitTestTRDJavaImp.py

示例8: CCDImagImplTestPy

# 需要导入模块: from Acspy.Clients.SimpleClient import PySimpleClient [as 别名]
# 或者: from Acspy.Clients.SimpleClient.PySimpleClient import releaseComponent [as 别名]
class CCDImagImplTestPy(unittest.TestCase):

	################################################
	# lifecycle
	################################################
	
	def setUp(self):
		self.simpleClient = PySimpleClient()
		self.componentName = "testInstanceCCDImagImpl"
		self.simpleClient.getLogger().logInfo("pyUnitTestCCDImagImpl.CCDImagImplTestPy.setUp()...")
        self.simpleClient.getLogger().logInfo("Get component " + self.componentName)
        self.component = self.simpleClient.getComponent(self.componentName)
	#__pPp__	    	           
	
	def tearDown(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestCCDImagImpl.CCDImagImplTestPy.tearDown()...")
		self.simpleClient.getLogger().logInfo("Releasing component " + self.componentName)
		self.simpleClient.releaseComponent(self.componentName)
		self.simpleClient.disconnect()
	#__pPp__       
        
	################################################
	# test methods
	################################################
	
	def testStandby(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestCCDImagImpl.CCDImagImplTestPy.testStandby()...")
		response = None
		response = self.component.standby()
		# no return is expected, response should be None
		assert response is None
	#__pPp__
			    
	def testOnline(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestCCDImagImpl.CCDImagImplTestPy.testOnline()...")
		response = None
		response = self.component.online()
		# no return is expected, response should be None
		assert response is None
	#__pPp__
			    
	def testOff(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestCCDImagImpl.CCDImagImplTestPy.testOff()...")
		response = None
		response = self.component.off()
		# no return is expected, response should be None
		assert response is None
	#__pPp__
			    
	def testSetup(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestCCDImagImpl.CCDImagImplTestPy.testSetup()...")
		response = None
		val = 'emptyString'
		timeout = 0
		response = self.component.setup(val, timeout)
		# no return is expected, response should be None
		assert response is None
开发者ID:Open-MBEE,项目名称:Comodo,代码行数:59,代码来源:pyUnitTestCCDImagImpl.py

示例9: SCJavaImpTestPy

# 需要导入模块: from Acspy.Clients.SimpleClient import PySimpleClient [as 别名]
# 或者: from Acspy.Clients.SimpleClient.PySimpleClient import releaseComponent [as 别名]
class SCJavaImpTestPy(unittest.TestCase):

	################################################
	# lifecycle
	################################################
	
	def setUp(self):
		self.simpleClient = PySimpleClient()
		self.componentName = "testInstanceSCJavaImp"
		self.simpleClient.getLogger().logInfo("pyUnitTestSCJavaImp.SCJavaImpTestPy.setUp()...")
        self.simpleClient.getLogger().logInfo("Get component " + self.componentName)
        self.component = self.simpleClient.getComponent(self.componentName)
	#__pPp__	    	           
	
	def tearDown(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestSCJavaImp.SCJavaImpTestPy.tearDown()...")
		self.simpleClient.getLogger().logInfo("Releasing component " + self.componentName)
		self.simpleClient.releaseComponent(self.componentName)
		self.simpleClient.disconnect()
	#__pPp__       
        
	################################################
	# test methods
	################################################
	
	def testReset(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestSCJavaImp.SCJavaImpTestPy.testReset()...")
		response = None
		response = self.component.reset()
		# no return is expected, response should be None
		assert response is None
	#__pPp__
			    
	def testStatus(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestSCJavaImp.SCJavaImpTestPy.testStatus()...")
		response = None
		response = self.component.status()
		# a return is expected, response should be not None
		assert response is not None
	#__pPp__
			    
	def testGetPosition(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestSCJavaImp.SCJavaImpTestPy.testGetPosition()...")
		response = None
		response = self.component.getPosition()
		# a return is expected, response should be not None
		assert response is not None
	#__pPp__
			    
	def testSensorType(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestSCJavaImp.SCJavaImpTestPy.testSensorType()...")
		response = None
		response = self.component.sensorType()
		# a return is expected, response should be not None
		assert response is not None
开发者ID:Open-MBEE,项目名称:Comodo,代码行数:57,代码来源:pyUnitTestSCJavaImp.py

示例10: LegoImplTestPy

# 需要导入模块: from Acspy.Clients.SimpleClient import PySimpleClient [as 别名]
# 或者: from Acspy.Clients.SimpleClient.PySimpleClient import releaseComponent [as 别名]
class LegoImplTestPy(unittest.TestCase):

	################################################
	# lifecycle
	################################################
	
	def setUp(self):
		self.simpleClient = PySimpleClient()
		self.componentName = "testInstanceLegoImpl"
		self.simpleClient.getLogger().logInfo("pyUnitTestLegoImpl.LegoImplTestPy.setUp()...")
        self.simpleClient.getLogger().logInfo("Get component " + self.componentName)
        self.component = self.simpleClient.getComponent(self.componentName)
	#__pPp__	    	           
	
	def tearDown(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestLegoImpl.LegoImplTestPy.tearDown()...")
		self.simpleClient.getLogger().logInfo("Releasing component " + self.componentName)
		self.simpleClient.releaseComponent(self.componentName)
		self.simpleClient.disconnect()
	#__pPp__       
        
	################################################
	# test methods
	################################################
	
	def testObserve(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestLegoImpl.LegoImplTestPy.testObserve()...")
		response = None
		coordinates = Position()
		exposureTime = 0
		response = self.component.observe(coordinates, exposureTime)
		# a return is expected, response should be not None
		assert response is not None
	#__pPp__
			    
	def testMoveTo(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestLegoImpl.LegoImplTestPy.testMoveTo()...")
		response = None
		coordinates = Position()
		response = self.component.moveTo(coordinates)
		# no return is expected, response should be None
		assert response is None
	#__pPp__
			    
	def testGetCurrentPosition(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestLegoImpl.LegoImplTestPy.testGetCurrentPosition()...")
		response = None
		response = self.component.getCurrentPosition()
		# a return is expected, response should be not None
		assert response is not None
开发者ID:Open-MBEE,项目名称:Comodo,代码行数:52,代码来源:pyUnitTestLegoImpl.py

示例11: SchedulerImplTestPy

# 需要导入模块: from Acspy.Clients.SimpleClient import PySimpleClient [as 别名]
# 或者: from Acspy.Clients.SimpleClient.PySimpleClient import releaseComponent [as 别名]
class SchedulerImplTestPy(unittest.TestCase):

	################################################
	# lifecycle
	################################################
	
	def setUp(self):
		self.simpleClient = PySimpleClient()
		self.componentName = "testInstanceSchedulerImpl"
		self.simpleClient.getLogger().logInfo("pyUnitTestSchedulerImpl.SchedulerImplTestPy.setUp()...")
        self.simpleClient.getLogger().logInfo("Get component " + self.componentName)
        self.component = self.simpleClient.getComponent(self.componentName)
	#__pPp__	    	           
	
	def tearDown(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestSchedulerImpl.SchedulerImplTestPy.tearDown()...")
		self.simpleClient.getLogger().logInfo("Releasing component " + self.componentName)
		self.simpleClient.releaseComponent(self.componentName)
		self.simpleClient.disconnect()
	#__pPp__       
        
	################################################
	# test methods
	################################################
	
	def testStart(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestSchedulerImpl.SchedulerImplTestPy.testStart()...")
		response = None
		response = self.component.start()
		# no return is expected, response should be None
		assert response is None
	#__pPp__
			    
	def testStop(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestSchedulerImpl.SchedulerImplTestPy.testStop()...")
		response = None
		response = self.component.stop()
		# no return is expected, response should be None
		assert response is None
	#__pPp__
			    
	def testProposalUnderExecution(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestSchedulerImpl.SchedulerImplTestPy.testProposalUnderExecution()...")
		response = None
		response = self.component.proposalUnderExecution()
		# a return is expected, response should be not None
		assert response is not None
开发者ID:Open-MBEE,项目名称:Comodo,代码行数:49,代码来源:pyUnitTestSchedulerImpl.py

示例12: EventSubscriberImplTestPy

# 需要导入模块: from Acspy.Clients.SimpleClient import PySimpleClient [as 别名]
# 或者: from Acspy.Clients.SimpleClient.PySimpleClient import releaseComponent [as 别名]
class EventSubscriberImplTestPy(unittest.TestCase):

	################################################
	# lifecycle
	################################################
	
	def setUp(self):
		self.simpleClient = PySimpleClient()
		self.componentName = "testInstanceEventSubscriberImpl"
		self.simpleClient.getLogger().logInfo("pyUnitTestEventSubscriberImpl.EventSubscriberImplTestPy.setUp()...")
        self.simpleClient.getLogger().logInfo("Get component " + self.componentName)
        self.component = self.simpleClient.getComponent(self.componentName)
	#__pPp__	    	           
	
	def tearDown(self):
		self.simpleClient.getLogger().logInfo("pyUnitTestEventSubscriberImpl.EventSubscriberImplTestPy.tearDown()...")
		self.simpleClient.getLogger().logInfo("Releasing component " + self.componentName)
		self.simpleClient.releaseComponent(self.componentName)
		self.simpleClient.disconnect()
开发者ID:Open-MBEE,项目名称:Comodo,代码行数:21,代码来源:pyUnitTestEventSubscriberImpl.py

示例13: set_array_frec

# 需要导入模块: from Acspy.Clients.SimpleClient import PySimpleClient [as 别名]
# 或者: from Acspy.Clients.SimpleClient.PySimpleClient import releaseComponent [as 别名]
def set_array_frec():
    client = PySimpleClient()
    master = client.getComponent("CONTROL/MASTER")
    arrayList = master.getAutomaticArrayComponents() + master.getManualArrayComponents()
    for array in arrayList:
        master.destroyArray(array.ComponentName)
    arrayList = []    
    antennas = master.getAvailableAntennas()
    master.createManualArray(antennas)
    arrayList = master.getAutomaticArrayComponents() +  master.getManualArrayComponents()
    if ( arrayList != 1 ):
        if( len(arrayList) == 0):
            print "Could not create an array!!"
            client.releaseComponent("CONTROL/MASTER")
            sys.exit(0)
        else:
            print "Could not destroy previosly arrays and create a new fresh array!"
            client.releaseComponent("CONTROL/MASTER")
            sys.exist(0)
    currentArray = client.getComponent(arrayList[0].ComponentName)
    client.releaseComponent("CONTROL/MASTER")
    setArrayName(currentArray.getArrayName())
    array = getArray()
    tp = array.getTotalPowerObservingMode()
    return tp
开发者ID:normansaez,项目名称:scripts,代码行数:27,代码来源:array_frec_test.py

示例14: mostRecentAsdm

# 需要导入模块: from Acspy.Clients.SimpleClient import PySimpleClient [as 别名]
# 或者: from Acspy.Clients.SimpleClient.PySimpleClient import releaseComponent [as 别名]
def mostRecentAsdm(date = None):
    '''
    Get the most recent Asdm, given a date. 
    If the date is None, it takes the  actual hour.

    return asdm or None
    '''
    from Acspy.Clients.SimpleClient import PySimpleClient
    from ArchivedAsdm import ArchivedAsdm
    if date == None :
        date_T = '%4.2d-%2.2d-%2.2dT00:00:00.000' % (gmtime()[0] , gmtime()[1] , gmtime()[2])
        date  = '%4.2d-%2.2d-%2.2d'% (gmtime()[0] , gmtime()[1] , gmtime()[2]) 
    else:
        date_T = '%4.2d-%2.2d-%2.2dT%2.2d:00:00.00' % (date[0] , date[1] , date[2] , date[3])
        date  = '%4.2d-%2.2d-%2.2d'% (date[0] , date[1] , date[2]) 
    client = PySimpleClient()
    archConn = client.getComponent('ARCHIVE_CONNECTION')
    archOp = archConn.getOperational('XMLQueryTest')
    uids = archOp.queryRecent('ASDM' , date_T)
    print "Connection entablish with archive ..."
    asdm_name = []
    for uid in uids:
        print "Checking date of " +str(uid),
        result = archOp.retrieveDirty(uid)
        dataSet = ArchivedAsdm(result.xmlString)
        dateOfCreation =  dataSet.getDateOfCreation()
        print "  created: "+str(dataSet.getDateTimeOfCreation()),
        if dataSet.isAsdm() & (dateOfCreation==date):
            asdm_name.append("%s \t%s" % (dataSet.getDateTimeOfCreation() , uid))
            print " --> is an asdm!",
        print ""
    asdm_name.sort()
    client.releaseComponent('ARCHIVE_CONNECTION')
    client.disconnect()
    if len(asdm_name) == 0 :
        print 'There are no asdms for %s' % date
        return None
    else :
        return asdm_name[-1].split('\t')[1]
开发者ID:normansaez,项目名称:scripts,代码行数:41,代码来源:most.py

示例15: mostRecentAsdm

# 需要导入模块: from Acspy.Clients.SimpleClient import PySimpleClient [as 别名]
# 或者: from Acspy.Clients.SimpleClient.PySimpleClient import releaseComponent [as 别名]
def mostRecentAsdm(date=None) :
    if date == None :
        date='%4.2d-%2.2d-%2.2d'%(time.gmtime()[0], time.gmtime()[1], time.gmtime()[2])
    client = PySimpleClient()
    archConn = client.getComponent('ARCHIVE_CONNECTION')
    archOp = archConn.getOperational('XMLQueryTest')
    uids = archOp.queryRecent('ASDM',date+'T00:00:00.000')
    asdm_name=[]
    for uid in uids:
        result = archOp.retrieveDirty(uid)
        dataSet = ArchivedAsdm(result.xmlString)
        dateOfCreation =  dataSet.getDateOfCreation()
        if dataSet.isAsdm() & (dateOfCreation==date):
            asdm_name.append("%s \t%s" % (dateOfCreation,uid))
    asdm_name.sort()
    client.releaseComponent('ARCHIVE_CONNECTION')
    client.disconnect()
    if len(asdm_name) == 0 :
        print 'there are no asdms for %s' % date
        return None
    else :
        return asdm_name[-1].split('\t')[1]
开发者ID:normansaez,项目名称:scripts,代码行数:24,代码来源:asdmTest.py


注:本文中的Acspy.Clients.SimpleClient.PySimpleClient.releaseComponent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。