Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.apo.nmsu.edu/Telescopes/TCC/html/talk_8py_source.html
Дата изменения: Tue Sep 15 02:25:37 2015
Дата индексирования: Sun Apr 10 00:18:46 2016
Кодировка:
lsst.tcc: python/tcc/cmd/talk.py Source File
lsst.tcc  1.2.2-3-g89ecb63
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
talk.py
Go to the documentation of this file.
1 from __future__ import division, absolute_import
2 
3 from twistedActor import CommandError
4 
5 __all__ = ["talk"]
6 
7 def talk(tccActor, userCmd):
8  """Implement the talk command
9 
10  @param[in,out] tccActor tcc actor
11  @param[in,out] userCmd user command
12  """
13  devName = userCmd.parsedCmd.paramDict["device"].valueList[0]
14  cmdStr = userCmd.parsedCmd.paramDict["command"].valueList[0]
15  argDict = dict()
16  timeLimQual = userCmd.parsedCmd.qualDict["timelimit"]
17  if timeLimQual.boolValue:
18  argDict["timeLim"] = timeLimQual.valueList[0]
19 
20  lowDevName = devName.lower()
21  if lowDevName in tccActor.axisDevSet:
22  # dev is an axis device
23  axisDev = tccActor.axisDevSet[lowDevName]
24  axisDev.startCmd(cmdStr, userCmd=userCmd, showReplies=True, **argDict)
25  elif lowDevName in tccActor.mirDevSet:
26  # dev is a mirror device
27  mirDev = tccActor.mirDevSet[lowDevName]
28  mirDev.startCmd(cmdStr, userCmd=userCmd, showReplies=True, **argDict)
29  else:
30  raise CommandError("Unknown device %r" % (devName,))
def talk
Definition: talk.py:7