Beispiel #1
0
def check_hk(n):
    """Performs a sanity check of the housekeeping for the FPE, consisting of checking the reference voltages.
       If the housekeeping reports a sane value and doesn't throw a TimeOut exception, 
       we may assume the wrapper has already been loaded."""
    from tessfpe.dhu.fpe import FPE
    from tessfpe.dhu.unit_tests import check_house_keeping_voltages
    from contextlib import closing
    import tessfpe.dhu.fpesocketconnection

    with closing(FPE(n, debug=False, check_hk=False)) as fpe:
        try:
            check_house_keeping_voltages(fpe)
            return True
        except tessfpe.dhu.fpesocketconnection.TimeOutError as e:
            return False
Beispiel #2
0
#!/usr/bin/env python
"""This script loads the FPE with 'San Diego' version 6.1 of the Wrapper.  
It also performs basic housekeeping voltage measurements to verify functionality."""

if __name__ == "__main__":
    from tessfpe.dhu.fpe import FPE
    from tessfpe.dhu.unit_tests import check_house_keeping_voltages
    
    fpe1 = FPE(1, debug=False, preload=False)
    print fpe1.version
    
    if check_house_keeping_voltages(fpe1):
        print "Wrapper load complete. Interface voltages OK."
    else: print "Load failure." # Need more info here.