00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 __facility__ = "Online"
00011 __abstract__ = "Test CVT access"
00012 __author__ = "S. Tuvi <Stuvi@SLAC.Stanford.edu> SLAC - GLAST LAT I&T/Online"
00013 __date__ = "2005/07/23 00:08:27"
00014 __updated__ = "$Date: 2005/11/30 18:44:26 $"
00015 __version__ = "$Revision: 1.6 $"
00016 __release__ = "$Name: HEAD $"
00017 __credits__ = "SLAC"
00018
00019 import LICOS.copyright_SLAC
00020
00021 import threading
00022 import logging as log
00023 import time
00024
00025 from LICOS.lib.scriptEngine.seAppBase import seAppBase
00026 from LICOS.lib.cmdTlmDb.LCATcmdDb import LCATcmdDb
00027 from LICOS.lib.cmdTlmDb.LCATtlmDb import LICOS_TlmPacketFactory
00028
00029
00030
00031 class testCVT(seAppBase):
00032 """!\brief Test script for exercising the CVT.
00033
00034 """
00035 def __init__(self, common):
00036 """!\brief Initialize the test script.
00037
00038 \param common ScriptEngineCommon instance
00039 """
00040 seAppBase.__init__(self, common)
00041 log.debug("%s.__init__()" % self.getName())
00042
00043 def getName(self):
00044 """!\brief Retrieve the test class name.
00045
00046 """
00047 return self.__class__.__name__
00048
00049 def startRun(self):
00050 """!\brief START_RUN transition method.
00051
00052 """
00053 log.debug("%s.startRun()" % self.getName())
00054 lcat = LCATcmdDb(self.vsc)
00055
00056
00057 lcat.LFS.LFSSYSSTATUS(LFSUNIT=0, LFSPAD16=0, LFSFILEID=0x20000000)
00058 time.sleep(2)
00059 flag = ['age']
00060 answer = self.common.cvt.request('LLFSSYSLIST')
00061 print answer
00062
00063 answerPkt = LICOS_TlmPacketFactory(answer.rawValue())
00064 answerPkt.decode_payload()
00065
00066 print "LLFSSYSLIST output:"
00067
00068 for payload in answerPkt.get_payload_list():
00069 print " %s: %s" % (payload, answerPkt.get_payload(payload))
00070
00071
00072 lhk = lcat.LHK
00073
00074
00075
00076 self.setCompletionStatus(self.COMPL_STATUS_PASSED)
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097