Help on module ft:

NAME
    ft

DESCRIPTION
    # This file was automatically generated by SWIG (http://www.swig.org).
    # Version 3.0.12
    #
    # Do not make changes to this file unless you know what you are doing--modify
    # the SWIG interface file instead.

CLASSES
    builtins.object
        ftTXTControllerInfo
        ftdevice
        fttxt2
    threading.Thread(builtins.object)
        ftTXT2exchange
    
    class ftTXT2exchange(threading.Thread)
     |  A class that represents a thread of control.
     |  
     |  This class can be safely subclassed in a limited fashion. There are two ways
     |  to specify the activity: by passing a callable object to the constructor, or
     |  by overriding the run() method in a subclass.
     |  
     |  Method resolution order:
     |      ftTXT2exchange
     |      threading.Thread
     |      builtins.object
     |  
     |  Methods defined here:
     |  
     |  __init__(self, txt)
     |      This constructor should always be called with keyword arguments. Arguments are:
     |      
     |      *group* should be None; reserved for future extension when a ThreadGroup
     |      class is implemented.
     |      
     |      *target* is the callable object to be invoked by the run()
     |      method. Defaults to None, meaning nothing is called.
     |      
     |      *name* is the thread name. By default, a unique name is constructed of
     |      the form "Thread-N" where N is a small decimal number.
     |      
     |      *args* is the argument tuple for the target invocation. Defaults to ().
     |      
     |      *kwargs* is a dictionary of keyword arguments for the target
     |      invocation. Defaults to {}.
     |      
     |      If a subclass overrides the constructor, it must make sure to invoke
     |      the base class constructor (Thread.__init__()) before doing anything
     |      else to the thread.
     |  
     |  run(self)
     |      Method representing the thread's activity.
     |      
     |      You may override this method in a subclass. The standard run() method
     |      invokes the callable object passed to the object's constructor as the
     |      target argument, if any, with sequential and keyword arguments taken
     |      from the args and kwargs arguments, respectively.
     |  
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |  
     |  EB_FAULTS_UPDATE = 8
     |  
     |  EB_INFO_UPDATE = 1
     |  
     |  EB_SLAVES_UPDATE = 4
     |  
     |  EB_VALUES_UPDATE = 2
     |  
     |  ----------------------------------------------------------------------
     |  Methods inherited from threading.Thread:
     |  
     |  __repr__(self)
     |      Return repr(self).
     |  
     |  getName(self)
     |  
     |  isAlive = is_alive(self)
     |      Return whether the thread is alive.
     |      
     |      This method returns True just before the run() method starts until just
     |      after the run() method terminates. The module function enumerate()
     |      returns a list of all alive threads.
     |  
     |  isDaemon(self)
     |  
     |  is_alive(self)
     |      Return whether the thread is alive.
     |      
     |      This method returns True just before the run() method starts until just
     |      after the run() method terminates. The module function enumerate()
     |      returns a list of all alive threads.
     |  
     |  join(self, timeout=None)
     |      Wait until the thread terminates.
     |      
     |      This blocks the calling thread until the thread whose join() method is
     |      called terminates -- either normally or through an unhandled exception
     |      or until the optional timeout occurs.
     |      
     |      When the timeout argument is present and not None, it should be a
     |      floating point number specifying a timeout for the operation in seconds
     |      (or fractions thereof). As join() always returns None, you must call
     |      isAlive() after join() to decide whether a timeout happened -- if the
     |      thread is still alive, the join() call timed out.
     |      
     |      When the timeout argument is not present or None, the operation will
     |      block until the thread terminates.
     |      
     |      A thread can be join()ed many times.
     |      
     |      join() raises a RuntimeError if an attempt is made to join the current
     |      thread as that would cause a deadlock. It is also an error to join() a
     |      thread before it has been started and attempts to do so raises the same
     |      exception.
     |  
     |  setDaemon(self, daemonic)
     |  
     |  setName(self, name)
     |  
     |  start(self)
     |      Start the thread's activity.
     |      
     |      It must be called at most once per thread object. It arranges for the
     |      object's run() method to be invoked in a separate thread of control.
     |      
     |      This method will raise a RuntimeError if called more than once on the
     |      same thread object.
     |  
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from threading.Thread:
     |  
     |  __dict__
     |      dictionary for instance variables (if defined)
     |  
     |  __weakref__
     |      list of weak references to the object (if defined)
     |  
     |  daemon
     |      A boolean value indicating whether this thread is a daemon thread.
     |      
     |      This must be set before start() is called, otherwise RuntimeError is
     |      raised. Its initial value is inherited from the creating thread; the
     |      main thread is not a daemon thread and therefore all threads created in
     |      the main thread default to daemon = False.
     |      
     |      The entire Python program exits when no alive non-daemon threads are
     |      left.
     |  
     |  ident
     |      Thread identifier of this thread or None if it has not been started.
     |      
     |      This is a nonzero integer. See the thread.get_ident() function. Thread
     |      identifiers may be recycled when a thread exits and another thread is
     |      created. The identifier is available even after the thread has exited.
     |  
     |  name
     |      A string used for identification purposes only.
     |      
     |      It has no semantics. Multiple threads may be given the same name. The
     |      initial name is set by the constructor.
    
    class ftTXTControllerInfo(builtins.object)
     |  A class that represents master, slave TXT-controller information
     |  
     |  Methods defined here:
     |  
     |  __init__(self, txt, num)
     |      :param txt: master ft.fttxt2
     |      :param num: int
     |  
     |  __str__(self)
     |      Return str(self).
     |  
     |  get_name(self)
     |      Get controller name from info
     |  
     |  get_role(self)
     |      Get controller role from info
     |  
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |  
     |  __dict__
     |      dictionary for instance variables (if defined)
     |  
     |  __weakref__
     |      list of weak references to the object (if defined)
    
    class ftdevice(builtins.object)
     |  The class that represents the device connected to the TXT4-controller
     |  
     |  Methods defined here:
     |  
     |  __del__ lambda self
     |  
     |  __getattr__ lambda self, name
     |  
     |  __init__(self)
     |      The class that represents the device connected to the TXT4-controller
     |  
     |  __repr__ = _swig_repr(self)
     |  
     |  __setattr__ lambda self, name, value
     |  
     |  __str__(self)
     |      Return str(self).
     |  
     |  __swig_destroy__ = delete_ftdevice(...)
     |  
     |  brightness_set(self, value)
     |      Set brightness [0-512] for a lamp
     |  
     |  coast(self, *motors)
     |      Use coast mode to stop a motor or a group of motors defined as ftdevice
     |  
     |  extend_range(self, mode)
     |      Set extended range for I1-I8, mode: 0 - normal, 1 - extended range
     |  
     |  finished(self)
     |      Check that the encoder is not running and the previous operation is finished
     |  
     |  getCurrentDistance(self)
     |      Get current encoder distance
     |  
     |  motor_coast(self, mask)
     |      Use coast mode to stop a group of motors, defined by mask [0-15]
     |  
     |  ntcTemperature(self)
     |      Get a temperature
     |  
     |  pwm_set(self, value)
     |      Set pwm value [0-512] for O1-O8 output, for example, lamp
     |  
     |  reset(self)
     |      Reset counter/encoder value
     |  
     |  setDistance(self, distance, syncto=None)
     |      Start the encoder (or pair of encoders) to travel a given distance
     |  
     |  setLevel(self, level)
     |      Set pwm level
     |      :param level: new level 0-512
     |  
     |  setSpeed(self, speed)
     |      Start the motor with selected speed
     |      :param speed: new speed -512 - 512
     |  
     |  speed_set(self, value)
     |      Set a motor speed [-512, 512], for next distance operation
     |  
     |  start_distance(self, distance, syncto=None)
     |  
     |  start_speed(self, value)
     |      Start a motor with speed [-512, 512]
     |  
     |  start_sync_distance(self, distance, mask)
     |      Start a group of motors defined by mask [0, 15]
     |  
     |  state(self)
     |      Get current state
     |      :return: 0-1 for digital input (I1-I8, C1-C4), voltage (mv) or distance
     |  
     |  stop(self)
     |      Stop a motor
     |  
     |  stop_sync(self, mask)
     |      Stop a group of motors defined by mask [0, 15]
     |  
     |  syncDistance(self, distance, *motors)
     |      Start for a motor or a group of motors defined as ftdevice
     |  
     |  syncStart(self, *motors)
     |      Start for a motor or a group of motors defined as ftdevice
     |  
     |  syncStop(self, *motors)
     |      Stop for a motor or a group of motors defined as ftdevice
     |  
     |  unconfigure(self)
     |      Unconfigure an object and exclude from input cycle
     |  
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |  
     |  __dict__
     |      dictionary for instance variables (if defined)
     |  
     |  __weakref__
     |      list of weak references to the object (if defined)
     |  
     |  conn
     |      Device connection
     |  
     |  distance
     |      Current distance for a ultrasonic device
     |  
     |  isrunning
     |      Current running state for a motor/encoder device
     |  
     |  motor
     |      Motor number
     |  
     |  motor_distance
     |      Current distance for a encoder device
     |  
     |  pwm
     |      Current pwm value for a output device
     |  
     |  resistance
     |      Resistance for a resistor
     |  
     |  temperature
     |      Current temperature for a NTC device
     |  
     |  val
     |      Current value for a device
     |  
     |  voltage
     |      Current volatage for a device
     |  
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |  
     |  __swig_getmethods__ = {'conn': <built-in function ftdevice_conn_get>, ...
     |  
     |  __swig_setmethods__ = {}
    
    class fttxt2(builtins.object)
     |  The class that represents the master/slave TXT4-controller
     |  
     |  Methods defined here:
     |  
     |  __del__ lambda self
     |  
     |  __getattr__ lambda self, name
     |  
     |  __init__(self, *args)
     |      The class that represents the master/slave TXT4-controller
     |  
     |  __repr__ = _swig_repr(self)
     |  
     |  __setattr__ lambda self, name, value
     |  
     |  __str__(self)
     |      Return str(self).
     |  
     |  __swig_destroy__ = delete_fttxt2(...)
     |  
     |  can_set_bitrate(self, speed)
     |      Set FDCAN bitrate
     |  
     |  close(self)
     |      Close TXT connection
     |  
     |  coast(self, *motors)
     |      Use coast mode to stop a group of motors
     |      :param motors: one or more motors
     |  
     |  colorsensor(self, num)
     |      Create colorsensor-object connected to I1-I8, num - 1-8
     |  
     |  counter(self, num)
     |      Create counter-object connected to C1-C4, num - 1-4
     |  
     |  dicode(self, num)
     |      Check device code connected to I1-I8, num - 1-8
     |  
     |  digital(self, num)
     |      Create digital-object connected to I1-I8, num - 1-8
     |  
     |  dimode(self, num)
     |      Check device mode connected to I1-I8, num - 1-8
     |  
     |  encoder(self, num)
     |      Create encoder-object connected to M1-M4, num - 1-4
     |  
     |  get_finfo(self)
     |      Get TXT2 controller fault values
     |  
     |  get_name(self)
     |      Get master/slave TXT-controller name
     |  
     |  get_role(self)
     |      Get master/slave TXT-controller role
     |  
     |  get_slave_by_uid(self, uid)
     |  
     |  get_txt_SN(self, num)
     |      Get slave TXT2 controller serial number
     |  
     |  get_txt_name(self, num)
     |      Get slave TXT2 controller name
     |  
     |  get_txt_uid(self, num)
     |      Get slave TXT2 controller uid
     |  
     |  get_values(self)
     |      Get TXT2 controller I1-I8 and C1-C4 raw values
     |  
     |  input(self, num)
     |      Create switch-object connected to I1-I8, num - 1-8
     |  
     |  lamp(self, num)
     |      Create lamp-object connected to O1-O8, num - 1-8
     |  
     |  motor(self, num)
     |      Create motor-object connected to M1-M4, num - 1-4
     |  
     |  motor_coast(self, mask)
     |      Use coast mode to stop a group of motors defined by mask 0-15
     |  
     |  ncttermistor(self, num)
     |      Create NTC-object connected to I1-I8, num - 1-8
     |  
     |  output(self, num)
     |      Create lamp-object connected to O1-O8, num - 1-8
     |  
     |  resistor(self, num)
     |      Create resistor-object connected to I1-I8, num - 1-8
     |  
     |  servo(self, num)
     |      Create servo motor-object connected to S1-S3, num - 1-3
     |  
     |  switch(self, num)
     |      Create switch-object connected to I1-I8, num - 1-8
     |  
     |  terminator(self, mode)
     |      Set FDCAN terminator mode, 0 - don't use terminator, 1 - use terminator
     |  
     |  trail_follower(self, num)
     |      Create trail_follower-object connected to I1-I8, num - 1-8
     |  
     |  typename(self, t)
     |      Get string for typename defined by int
     |  
     |  ultrasonic(self, num)
     |      Create ultrasonic-object connected to I1-I8, num - 1-8
     |  
     |  update_config(self)
     |      Send config to the TXT2 controller
     |  
     |  voltmeter(self, num)
     |      Create voltmeter-object connected to I1-I8, num - 1-8
     |  
     |  wait_event(self, mask)
     |      Wait TXT2 controller event
     |  
     |  xsmotor(self, num)
     |      Create motor-object connected to M1-M4, num - 1-4
     |  
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |  
     |  __dict__
     |      dictionary for instance variables (if defined)
     |  
     |  __weakref__
     |      list of weak references to the object (if defined)
     |  
     |  firmware
     |      TXT4 controller firmware version
     |  
     |  name
     |      TXT4 controller name
     |  
     |  nslaves
     |      Number of slave controllers connected to the TXT4 controller
     |  
     |  version
     |      TXT4 controller board version
     |  
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |  
     |  __swig_getmethods__ = {'firmware': <built-in function fttxt2_firmware_...
     |  
     |  __swig_setmethods__ = {}

FUNCTIONS
    default_data_handler(ftTXT2)
    
    default_error_handler(message, exception)
    
    default_fault_handler(txt2, fts)
    
    ftdevice_swigregister(...)
    
    fttxt2_swigregister(...)
    
    getControllerInfoList(txt)
        Get list of controllers
        :param txt: master ft.fttxt2
        :return: list of controllers info (master + slaves)
    
    log(...)
        log(x[, base])
        
        Return the logarithm of x to the given base.
        If the base not specified, returns the natural logarithm (base e) of x.
    
    sqrt(...)
        sqrt(x)
        
        Return the square root of x.

FILE
    /usr/lib/python3.5/site-packages/ft.py


