libnifalcon
1.0.1
|
#include <FalconCommFTD2XX.h>
Public Member Functions | |
FalconCommFTD2XX () | |
virtual | ~FalconCommFTD2XX () |
virtual bool | getDeviceCount (unsigned int &count) |
virtual void | poll () |
virtual bool | open (unsigned int index) |
virtual bool | close () |
virtual bool | read (uint8_t *str, unsigned int size) |
virtual bool | write (uint8_t *str, unsigned int size) |
virtual bool | readBlocking (uint8_t *str, unsigned int size) |
virtual bool | writeBlocking (uint8_t *str, unsigned int size) |
virtual bool | setFirmwareMode () |
virtual bool | setNormalMode () |
![]() | |
FalconComm () | |
virtual | ~FalconComm () |
int | getLastBytesRead () |
int | getLastBytesWritten () |
int | getDeviceErrorCode () |
bool | isCommOpen () |
virtual void | reset () |
bool | hasBytesAvailable () |
unsigned int | getBytesAvailable () |
virtual void | setBytesAvailable (unsigned int b) |
![]() | |
FalconCore () | |
virtual | ~FalconCore () |
int | getErrorCode () |
Protected Member Functions | |
int8_t | openDeviceFTD2XX (unsigned int index, bool should_open) |
Protected Attributes | |
void * | m_falconDevice |
![]() | |
int | m_deviceErrorCode |
int | m_lastBytesRead |
int | m_lastBytesWritten |
bool | m_isCommOpen |
bool | m_hasBytesAvailable |
int | m_bytesAvailable |
![]() | |
int | m_errorCode |
Static Protected Attributes | |
static const char * | FALCON_DESCRIPTION = "FALCON HAPTIC" |
![]() | |
static const unsigned int | MAX_DEVICES = 128 |
static const unsigned int | FALCON_VENDOR_ID = 0x0403 |
static const unsigned int | FALCON_PRODUCT_ID = 0xCB48 |
Additional Inherited Members | |
![]() | |
enum | { FALCON_COMM_DEVICE_ERROR = 2000, FALCON_COMM_NOT_INITIALIZED, FALCON_COMM_DEVICE_NOT_FOUND_ERROR, FALCON_COMM_DEVICE_NOT_VALID_ERROR, FALCON_COMM_DEVICE_INDEX_OUT_OF_RANGE_ERROR, FALCON_COMM_FIRMWARE_NOT_FOUND_ERROR, FALCON_COMM_WRITE_ERROR, FALCON_COMM_READ_ERROR } |
FalconCommFTD2XX is the FTD2XX implementation of the falcon communications core. This core is meant to be used on Windows, where the FTD2XX driver is the factory standard driver for the falcon. This means that libnifalcon code can work alongside the regular HDAL drivers.
FalconCommFTD2XX is built directly into the libnifalcon core library, as is chosen for the user by default by the FalconDevice constructor, so it is usually not needed. However, it is left here for code compatibility for code that already used comm behavior setting, which was required before libnifalcon v1.0
|
inline |
Constructor
|
virtual |
Destructor
|
virtual |
Closes the device, if open
Implements libnifalcon::FalconComm.
|
virtual |
Returns the number of devices connected to the system
[out] | count | The number of devices available |
Implements libnifalcon::FalconComm.
|
virtual |
Opens the device at the specified index
[in] | index | Index of the device to open |
Implements libnifalcon::FalconComm.
|
protected |
Internal device opening function
[in] | index | Index of device to open |
[in] | should_open | If true, open. If false, return count |
|
virtual |
Polls the object for confirmation of write/read return
Reimplemented from libnifalcon::FalconComm.
|
virtual |
Read a specified number of bytes from the device
[out] | str | Buffer to read data into |
[in] | size | Amount of bytes to read |
Implements libnifalcon::FalconComm.
|
virtual |
Read a specified number of bytes from the device
[out] | str | Buffer to read data into |
[in] | size | Amount of bytes to read |
Implements libnifalcon::FalconComm.
|
virtual |
Sets the communications mode and initializes the device to load firmware
Implements libnifalcon::FalconComm.
|
virtual |
Sets the communications mode and initializes the device to run in normal operation
Implements libnifalcon::FalconComm.
|
virtual |
Write a specified number of bytes to the device
[in] | str | Buffer to write data from |
[in] | size | Amount of bytes to write |
Implements libnifalcon::FalconComm.
|
inlinevirtual |
Write a specified number of bytes to the device
[in] | str | Buffer to write data from |
[in] | size | Amount of bytes to write |
Implements libnifalcon::FalconComm.
|
staticprotected |
String describing the falcon (used for identification)
|
protected |
Internal pointer to ftdi device struct
This would usually be a FT_HANDLE, but FT_HANDLE is just a void*, so this saves us having to deal with the include at this level.