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


Python PySimpleClient.getComponentNonSticky方法代码示例

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


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

示例1: PySimpleClient

# 需要导入模块: from Acspy.Clients.SimpleClient import PySimpleClient [as 别名]
# 或者: from Acspy.Clients.SimpleClient.PySimpleClient import getComponentNonSticky [as 别名]
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
# 
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
#
# "@(#) $Id$"
#
# who       when      what
# --------  --------  ----------------------------------------------
# nsaez  2010-10-17  created
#
import scheduling
import Control
from Acspy.Clients.SimpleClient import PySimpleClient
import time

client = PySimpleClient()
ms = client.getComponentNonSticky("SCHEDULING_MASTERSCHEDULER")
array = ms.createArray(["DV09", "DV19"], ["PhotonicReference6"], Control.BL, scheduling.MANUAL)
arrayname = (ms.getActiveManualArrays())[0]
arrayName = arrayname.split("/")[1]
ms.setManualArrayConfigure(arrayName,"uid://C203/X91b6/X3")
time.sleep(20)

#
# ___oOo___
开发者ID:normansaez,项目名称:scripts,代码行数:32,代码来源:createArrayManualMode.py

示例2: PySimpleClient

# 需要导入模块: from Acspy.Clients.SimpleClient import PySimpleClient [as 别名]
# 或者: from Acspy.Clients.SimpleClient.PySimpleClient import getComponentNonSticky [as 别名]
print 'finding configured antennas'


# get_configured_antennas:
if options.antennaList == 'All':
    from Acspy.Clients.SimpleClient import PySimpleClient
    client = PySimpleClient("ping_abm")
    ant_info = client.availableComponents(type_wildcard='IDL:alma/Control/Antenna:1.0', activated=1)
    availableAnts = []
    notAvailableAntennas = []
    if len(ant_info) > 0:
    	for antenna_info in ant_info:
	    try:
		name = antenna_info.name
		antenna = client.getComponentNonSticky(antenna_info.name)
		name.split('/')
		antName = name.split('/')[1]
                sys.stdout.write(antName+'\r')
#                sys.stdout.flush()
                print antName
                if str(antenna.getState())=="Shutdown":
                    notAvailableAntennas.append(antenna[1])                
		if str(antenna.getState())!="Shutdown":
		    availableAnts.append(antName)
		if str(antenna.getState())=="Degraded":
		    badSubdevices = antenna.getBadSubdevices() 
	    except:
		pass
    availableAnts.sort()
    antennaList=availableAnts
开发者ID:normansaez,项目名称:scripts,代码行数:32,代码来源:tp.py

示例3: PySimpleClient

# 需要导入模块: from Acspy.Clients.SimpleClient import PySimpleClient [as 别名]
# 或者: from Acspy.Clients.SimpleClient.PySimpleClient import getComponentNonSticky [as 别名]
from Acspy.Clients.SimpleClient import PySimpleClient

simpleClient = PySimpleClient()

try:
    #test an immortal cob first
    print "Testing HELLODEMO1 (i.e., immortal components)"
    test1 = simpleClient.getComponent("HELLODEMO1")
    print test1.sayHello()
    print test1.sayHelloWithParameters("I'm an 'inString'", 3.14)

    print
    print "Now test HELLODEMO2 (i.e., non-immortal components)"
    test2 = simpleClient.getComponent("HELLODEMO2")
    print test2.sayHello()
    print test2.sayHelloWithParameters("I'm an 'inString'", 3.14)

    print
    print "Now test getting HELLODEMO2 non sticky"
    test3 = simpleClient.getComponentNonSticky("HELLODEMO2")
    print test3.sayHello()
    print test3.sayHelloWithParameters("I'm an 'inString'", 3.14)
    
except Exception, e:
    print "Test FAILED!!!"
    print "The exception was:", e

from time import sleep
sleep(5)
print "The end __oOo__"
开发者ID:ACS-Community,项目名称:ACS,代码行数:32,代码来源:acspyexmplTestPyContainer.py


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