Example #1
0
 def trigger(self, arg):
     boardip = self.getBoardIp()
     try:
         trig_src = str(self.trig_src.record.getOriginalPartName())[1:]
     except:
         print "could not read trigger source"
         return 0
     if self.debugging():
         print "executing trigger on board %s, trig_src is %s." % (
             boardip,
             trig_src,
         )
     trig_src = trig_src[2:]
     cmd = "set.dtacq dio_bit %s P" % (trig_src, )
     if self.debugging():
         print "sending command %s." % (cmd, )
     try:
         UUT = acq200.ACQ200(transport.factory(boardip))
     except:
         print "could not connect to the board %s" % (boardip, )
     try:
         a = UUT.uut.acq2sh(cmd)
         b = UUT.uut.acqcmd('-- setDIO -------')
     except:
         print "could not send %s to the board" % (cmd, )
     if self.debugging():
         print "got back: %s\n" % (a, )
         print "     and: %s\n" % (b, )
     return 1
Example #2
0
    def trigger(self, arg):
        boardip = self.getBoardIp()
        try:
            trig_src=self.trig_src.record.getOriginalPartName().getString()[1:]
        except:
            print "could not read trigger source"
            return 0
        if self.debugging() :
            print "executing trigger on board %s, trig_src is %s."% (boardip, trig_src,)
        trig_src = trig_src[2:]
        cmd = "set.dtacq dio_bit %s P" % (trig_src,)
        if self.debugging() :
            print "sending command %s."%(cmd,)
        try:
            UUT = acq200.Acq200(transport.factory(boardip))
        except:
            print "could not connect to the board %s"% (boardip,)
        try:
            a = UUT.uut.acq2sh(cmd)
            b = UUT.uut.acqcmd('-- setDIO -------')
        except:
            print "could not send %s to the board" %(cmd,)
        if self.debugging():
            print "got back: %s\n" % (a,)
	    print "     and: %s\n" % (b,)
        return 1
Example #3
0
 def acq2sh(self, arg):
     boardip = self.getBoardIp()
     
     try:
         UUT = acq200.Acq200(transport.factory(boardip))
     except:
         print "could not connect to the board %s"% (boardip,)
     try:
         a = UUT.uut.acq2sh(str(arg))
     except:
         print "could not send %s to the board" %(str(arg),)
         return 0
     print "%s  %s -> %s"%(boardip, arg, a,)
     return 1