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


Python PySimpleClient.getDynamicComponent方法代码示例

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


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

示例1: get_mgr_instance

# 需要导入模块: from Acspy.Clients.SimpleClient import PySimpleClient [as 别名]
# 或者: from Acspy.Clients.SimpleClient.PySimpleClient import getDynamicComponent [as 别名]
 def get_mgr_instance(self,antenna):
     '''
     Get dinamic component instance
     '''
     from Acspy.Clients.SimpleClient import PySimpleClient
     mgr = None
     sys.stdout = open("/dev/null", "w")
     client = PySimpleClient("CAN STATUS")
     sys.stdout = sys.__stdout__
     deployed_mgrs = client.availableComponents(type_wildcard='IDL:alma/Control/AmbManager:1.0')
     for deployed_mgr in deployed_mgrs:
         if deployed_mgr.name.__contains__(antenna) :
             print "Trying to get ambManager from  %s" % antenna
             try:
                 mgr= client.getDynamicComponent(deployed_mgr.name, deployed_mgr.type, deployed_mgr.code, deployed_mgr.container_name)
             except maciErrType.CannotGetComponentEx, e:
                 print e[0].shortDescription
                 sys.exit(-1)
             except Exception, e:
                 print e
                 sys.exit(-1)
             break
开发者ID:normansaez,项目名称:scripts,代码行数:24,代码来源:getCanAntennaStatus.py

示例2: PySimpleClient

# 需要导入模块: from Acspy.Clients.SimpleClient import PySimpleClient [as 别名]
# 或者: from Acspy.Clients.SimpleClient.PySimpleClient import getDynamicComponent [as 别名]
#!/usr/bin/env python

from Acspy.Clients.SimpleClient import PySimpleClient
client = PySimpleClient()
f1 = client.getDynamicComponent("FRIDGE001", 'IDL:alma/FRIDGE/FridgeControl:1.0', 'Acssim.Servants.Simulator', 'pyContainer')
f2 = client.getDynamicComponent("FRIDGE002", 'IDL:alma/FRIDGE/FridgeControl:1.0', 'Acssim.Servants.Simulator', 'pyContainer')
开发者ID:jjpopski,项目名称:ACS,代码行数:8,代码来源:acssimLoadSameDynamicCompTwice.py

示例3: PySimpleClient

# 需要导入模块: from Acspy.Clients.SimpleClient import PySimpleClient [as 别名]
# 或者: from Acspy.Clients.SimpleClient.PySimpleClient import getDynamicComponent [as 别名]
from Acspy.Clients.SimpleClient import PySimpleClient
client = PySimpleClient("CAN STATUS")
mgr = client.getDynamicComponent('CONTROL/DA41/AmbManager', 'IDL:alma/Control/AmbManager:1.0', 'ambManagerImpl', 'CONTROL/DA41/cppHGContainer') 
for j in range(0,5):
    for i in mgr.getNodes(j)[0]:
        print "channel %d , node %d => %s" %(i.channel, i.node, str(hex(i.node)))
开发者ID:normansaez,项目名称:scripts,代码行数:8,代码来源:checkARTM.py

示例4: PySimpleClient

# 需要导入模块: from Acspy.Clients.SimpleClient import PySimpleClient [as 别名]
# 或者: from Acspy.Clients.SimpleClient.PySimpleClient import getDynamicComponent [as 别名]
- <a href="../../idl/html/interfaceHelloWorld_1_1HelloWorld.html">HelloWorld IDL Documentation</a>
'''

# Import command-line arguments
from sys import argv

# Import the SimpleClient class
from Acspy.Clients.SimpleClient import PySimpleClient

# Make an instance of the PySimpleClient
simpleClient = PySimpleClient()

# Obtain a reference to a dynamic component using the ContainerServices
# getComponent method.
hwRef = simpleClient.getDynamicComponent(None,
                                         "IDL:alma/acsexmplHelloWorld/HelloWorld:1.0",
                                         "acsexmplHelloWorldImpl",
                                         str(argv[1]))

if hwRef != None:
    simpleClient.getLogger().logInfo("Retrieved valid reference from manager.")
    #Do something useful with the reference.
    hwRef.displayMessage()
    simpleClient.getLogger().logInfo("Method of dynamic component successfully invoked. Have a nice day!")
else:
    simpleClient.getLogger().logAlert("Bad reference retrieved from manager")

simpleClient.disconnect()
print "The end __oOo__"

开发者ID:ACS-Community,项目名称:ACS,代码行数:31,代码来源:acspyexmplDynamicHelloWorld.py

示例5: PySimpleClient

# 需要导入模块: from Acspy.Clients.SimpleClient import PySimpleClient [as 别名]
# 或者: from Acspy.Clients.SimpleClient.PySimpleClient import getDynamicComponent [as 别名]
#!/usr/bin/env python

from Acspy.Clients.SimpleClient import PySimpleClient
client = PySimpleClient()
f1 = client.getDynamicComponent("FRIDGE001", 'IDL:alma/FRIDGE/FridgeControl:1.0', 'Acssim.Servants.Simulator', 'pyContainer')
f2 = client.getDynamicComponent("FRIDGE002", 'IDL:alma/FRIDGE/FridgeControl:1.0', 'Acssim.Servants.Simulator', 'pyContainer')
h3 = client.getDynamicComponent("HELLOWORLD001", 'IDL:alma/acsexmplHelloWorld/HelloWorld:1.0', 'Acssim.Servants.Simulator', 'pyContainer')
f1.doorStatus
f2.doorStatus
h3.displayMessage()
开发者ID:ACS-Community,项目名称:ACS,代码行数:12,代码来源:acssimLoadSameDynamicCompTwice.py


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