class mrpt::comms::CInterfaceFTDI

A definition of a CStream actually representing a USB connection to a FTDI chip.

This class implements the communication with FT245BM / FT245RL chips. Using this class makes a program to depend on:

  • Windows: “FT2XX.DLL” and the device drivers (see FTDI website).

  • Linux: “” (quite standard!), and “” only if linking against the dynamic library.

If there is any error during the communications (or loading the Windows DLL), a std::exception will be raised.

To write bulk data, use CStream::ReadBuffer and CStream::WriteBuffer.

Warning: Avoid defining an object of this class in a global scope if you want to catch all potential exceptions during the constructors (like DLL not found, etc…)


  • 11/APR/2005: Initial development. JLBC

  • 16/FEB/2007: Integration into the MRPT framework. Support for device serial numbers. JLBC

  • 15/APR/2008: Implemented for Linux using libftdi. JLBC

See also:


#include <mrpt/comms/CInterfaceFTDI.h>

class CInterfaceFTDI: public mrpt::io::CStream
    // construction

    CInterfaceFTDI(const CInterfaceFTDI& o);


    CInterfaceFTDI& operator = (const CInterfaceFTDI& o);

// direct descendants

class CBoardSonars;
class CServoeNeck;

Inherited Members


    virtual size_t Read(void* Buffer, size_t Count) = 0;
    virtual size_t Write(const void* Buffer, size_t Count) = 0;
    virtual uint64_t getTotalBytesCount() const = 0;
    virtual uint64_t getPosition() const = 0;



Constructor, which loads driver interface (the DLL under Windows).

CInterfaceFTDI(const CInterfaceFTDI& o)

This object cannot be copied.


CInterfaceFTDI& operator = (const CInterfaceFTDI& o)

This object cannot be copied.