Пример #1
0
import vlt
import vlt.buffread as buffread

def msgdef(msg,commands):
    def tmp(self,**kwargs):
        return self.msgSend( msg, kwargs)
    tmp.__doc__ = commands[msg].helpText
    return tmp

buffreader = buffread.buffreader
boss_commands = {
    "expend"	:vlt.Command("EXPEND",{"expoId":vlt.Param("-expoId", int, "%d"),"detId":vlt.Param("-detId", str, "%s"),"path":vlt.Param("-path", str, "%s")},helpText="""Internal SOS-OS command.  SOS sends this command to its OS and ICS subsystems.
When OS receives this command it forwards it to its ICS subsystems.
""", bufferReader=buffreader.getreader("EXPEND")),
    "gethdr"	:vlt.Command("GETHDR",{"expoId":vlt.Param("-expoId", int, "%d"),"btblFileName":vlt.Param("-btblFileName", str, "%s"),"detId":vlt.Param("-detId", str, "%s"),"hdrFileName":vlt.Param("-hdrFileName", str, "%s")},helpText="""Internal command. Creates a header file.
""", bufferReader=buffreader.getreader("GETHDR")),
    "expstrt"	:vlt.Command("EXPSTRT",{"expoId":vlt.Param("-expoId", int, "%d"),"detId":vlt.Param("-detId", str, "%s")},helpText="""Internal SOS-OS command.  SOS sends this command to the OS-es which 
are on the subsystemlist but not started.
When OS receives this command it calles the startpreproc function.
""", bufferReader=buffreader.getreader("EXPSTRT")),
    "clean"	:vlt.Command("CLEAN",{},helpText="""Internal command. Clears the OS exposure table and sets the expoId 
to zero, i.e  to the initial value.
""", bufferReader=buffreader.getreader("CLEAN"))}


class boss(vlt.Process):
    """

This is a boss class vlt.Process automaticaly generated from file 
     /Users/guieu/python/Catalog/vlt/CDT/boss.cdt
Пример #2
0
def formhelp(msg, command):
    return msg + "(" + " ,".join(
        k + "=%s" % o.dtype
        for k, o in command.options.iteritems()) + ")\n\n" + command.helpText


buffreader = buffread.buffreader
rtdc_commands = {
    "ping":
    vlt.Command("PING", {},
                helpText="""Ping process.
""",
                bufferReader=buffreader.getreader("PING")),
    "script":
    vlt.Command("SCRIPT", {"script": vlt.Param("-script", str, "%s")},
                helpText="""Execute a tcl procedure (script) defined in rtdc.
""",
                bufferReader=buffreader.getreader("SCRIPT"))
}


class rtdc(vlt.Process):
    """

This is a rtdc class vlt.Process automaticaly generated from file 
     /Users/guieu/python/Catalog/vlt/CDT/rtdc.cdt

To get a list of commands:
  proc.getCommandList()      
To print a help on a specific command (e.g. setup)
Пример #3
0
import vlt.buffread as buffread

def msgdef(msg,commands):
    def tmp(self,**kwargs):
        return self.msgSend( msg, kwargs)
    tmp.__doc__ = formhelp(msg,commands[msg])
    return tmp
def formhelp(msg,command):
    return msg+"("+" ,".join(k+"=%s"%o.dtype for k,o in command.options.iteritems())+")\n\n"+command.helpText
buffreader = buffread.buffreader



ao_commands = {
    "setup"	:vlt.Command("SETUP",
                             {"":vlt.Param("", vlt.dtypeFunctionList, "%s")},
helpText="""Set-up functions to the dm 
options are supported:
    <keyword1> <value1> [<keyword2> <value2> ...]
          		specify one or more parameters with the associated
                        value. keywordN: a short-FITS keyword
			valueN:   the value for the keyword
			First setup must contain the instrument mode (INS.MODE).
			An image taking exposure should setup the imagefilename
			(OCS.DET.IMGNAME) befor the exposure can be started. 

""", bufferReader=buffreader.getreader("SETUP")), 
    
}
class aoControl(vlt.Process):
    commands = ao_commands
Пример #4
0
    tmp_call.__doc__ = formhelp(msg, commands[msg])
    return tmp_call


def formhelp(msg, command):
    return msg + "(" + " ,".join(
        k + "=%s" % o.dtype
        for k, o in command.options.iteritems()) + ")\n\n" + command.helpText


buffreader = buffread.buffreader

ao_commands = {
    "setup":
    vlt.Command("SETUP",
                {"function": vlt.Param("", vlt.dtypeFunctionList, "%s")},
                helpText="""Set-up functions to the dm 
options are supported:
    <keyword1> <value1> [<keyword2> <value2> ...]
          		specify one or more parameters with the associated
                        value. keywordN: a short-FITS keyword
			valueN:   the value for the keyword
			First setup must contain the instrument mode (INS.MODE).
			An image taking exposure should setup the imagefilename
			(OCS.DET.IMGNAME) befor the exposure can be started. 

""",
                bufferReader=buffreader.getreader("SETUP")),
    "status":
    vlt.Command(
        "STATUS", {"function": vlt.Param("", vlt.dtypeFunctionListMsg, "%s")},
Пример #5
0

def msgdef(msg, commands):
    def tmp(self, **kwargs):
        return self.msgSend(msg, kwargs)

    tmp.__doc__ = commands[msg].helpText
    return tmp


buffreader = buffread.buffreader
osbControl_commands = {
    "cont":
    vlt.Command(
        "CONT", {
            "expoId": vlt.Param("-expoId", int, "%d"),
            "detId": vlt.Param("-detId", str, "%s"),
            "at": vlt.Param("-at", str, "%s")
        },
        helpText=
        """Continue a paused exposure at a given optional time. The following options are
supported:
    at <time>                specify the time when the exposure must be resumed
                            (default is now). The time format is (ISO8601):
                            [[CC]YY[-]MM[-]DD[T| ]]HH[:]MM[[:]SS[.TTT]]
    expoId <expoId>         integer number specifying exposure number (optional)
""",
        bufferReader=buffreader.getreader("CONT")),
    "addfits":
    vlt.Command(
        "ADDFITS", {