本文整理汇总了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___
示例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
示例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__"