uFCoder 2.62
|
If you want to communicate and use multiple readers from an application, you have to follow the initial procedure for enumerating uFR compatible devices and getting their handles. More...
Functions | |
UFR_STATUS DL_API | ReaderList_Add (UFR_HANDLE *DeviceHandle, uint32_t reader_type, c_string port_name, uint32_t port_interface, void *arg) |
This method is used for manual addition of uFR devices to the list. Parameters used are the same as in ReaderOpenEx() method. Use this method if the device was not previously discovered by the ReaderList_UpdateAndGetCount() method. | |
UFR_STATUS DL_API | ReaderList_Destroy (UFR_HANDLE *DeviceHandle) |
Force handle deletion when you identify that the reader is no longer connected, and want to release the handle immediately. If the handle exists in the list of opened devices, function would try to close communication port and destroy the handle. When uFR reader is disconnected, ReaderList_UpdateAndGetCount() will do that (destroy) automatically in next execution. | |
UFR_STATUS DL_API | ReaderList_GetFTDIDescriptionByIndex (int32_t DeviceIndex, OUT char **Device_Description) |
Gets devices FTDI description based on the index of the device in the list. | |
UFR_STATUS DL_API | ReaderList_GetFTDISerialByIndex (int32_t DeviceIndex, OUT char **Device_Serial) |
Gets devices FTDI serial port number based on the index of the device in the list. | |
UFR_STATUS DL_API | ReaderList_GetInformation (uint32_t DeviceIndex, VAR UFR_HANDLE *DeviceHandle, OUT c_string *DeviceSerialNumber, VAR int *DeviceType, OUT c_string *DeviceFWver, VAR int *DeviceCommID, VAR int *DeviceCommSpeed, OUT c_string *DeviceCommFTDISerial, OUT c_string *DeviceCommFTDIDescription, VAR int *DeviceIsOpened, VAR int *DeviceStatus) |
Used to retrieve information about a reader found & connected via ReaderList_UpdateAndGetCount(). This should be executed for each device based on number of devices found, providing valid index. | |
UFR_STATUS DL_API | ReaderList_GetSerialByIndex (int32_t DeviceIndex, VAR uint32_t *lpulSerialNumber) |
Gets reader’s reader serial number as a pointer to 4 byte value, based on the index of the device in the list. | |
UFR_STATUS DL_API | ReaderList_GetSerialDescriptionByIndex (int32_t DeviceIndex, OUT uint8_t pSerialDescription[8]) |
Gets reader’s descriptive name as a array of 8 chars, based on the index of the device in the list. | |
UFR_STATUS DL_API | ReaderList_GetTypeByIndex (int32_t DeviceIndex, VAR uint32_t *lpulReaderType) |
Gets devices reader type based on the index of the device in the list. | |
UFR_STATUS DL_API | ReaderList_OpenByIndex (const int32_t DeviceIndex, VAR UFR_HANDLE *hndUFR) |
Tries to re-open the device based on the device index. This method should be called when you use ReaderCloseM() to close the communication with the reader opened by ReaderList_UpdateAndGetCount(). | |
UFR_STATUS DL_API | ReaderList_OpenBySerial (VAR UFR_HANDLE *hndUFR, const char Device_SN[16]) |
Tries to re-open the device based on the serial number of the device. This method should be called when you use ReaderCloseM() to close the communication with the reader opened by ReaderList_UpdateAndGetCount(). | |
UFR_STATUS DL_API | ReaderList_UpdateAndGetCount (VAR int32_t *NumberOfDevices) |
This is the first function in the order for execution for the multi-reader support. The function prepares the list of connected uF-readers to the system and returns the number of list items - number of connected uFR devices. ReaderList_UpdateAndGetCount() scans all communication ports for compatible devices, probes open readers if still connected, if not close and marks their handles for deletion. If some device is disconnected from the system this function should remove its handle. As of uFCoder version 5.0.73, this function probes both FTDI & COM devices and tries to open them. Each call to this method will close previously opened devices by this function, scan, and open everything found. | |
If you want to communicate and use multiple readers from an application, you have to follow the initial procedure for enumerating uFR compatible devices and getting their handles.
UFR_STATUS DL_API ReaderList_Add | ( | UFR_HANDLE * | DeviceHandle, |
uint32_t | reader_type, | ||
c_string | port_name, | ||
uint32_t | port_interface, | ||
void * | arg ) |
This method is used for manual addition of uFR devices to the list. Parameters used are the same as in ReaderOpenEx() method. Use this method if the device was not previously discovered by the ReaderList_UpdateAndGetCount() method.
DeviceHandle | the handle that will be assigned for interacting with the specified reader on success. |
reader_type | Refer to ReaderOpenEx() for detailed description of this parameter. |
port_name | Refer to ReaderOpenEx() for detailed description of this parameter. |
port_interface | Refer to ReaderOpenEx() for detailed description of this parameter. arg Refer to ReaderOpenEx() for detailed description of this parameter. |
arg | Refer to ReaderOpenEx() for detailed description of this parameter. |
UFR_STATUS DL_API ReaderList_Destroy | ( | UFR_HANDLE * | DeviceHandle | ) |
Force handle deletion when you identify that the reader is no longer connected, and want to release the handle immediately. If the handle exists in the list of opened devices, function would try to close communication port and destroy the handle. When uFR reader is disconnected, ReaderList_UpdateAndGetCount() will do that (destroy) automatically in next execution.
DeviceHandle | The handle that will be destroyed |
UFR_STATUS DL_API ReaderList_GetFTDIDescriptionByIndex | ( | int32_t | DeviceIndex, |
OUT char ** | Device_Description ) |
Gets devices FTDI description based on the index of the device in the list.
DeviceIndex | Index of the device |
Device_Description | FTDI description as c_string |
UFR_STATUS DL_API ReaderList_GetFTDISerialByIndex | ( | int32_t | DeviceIndex, |
OUT char ** | Device_Serial ) |
Gets devices FTDI serial port number based on the index of the device in the list.
DeviceIndex | Index of the device |
Device_Serial | Contains FTDI serial number as c_string |
UFR_STATUS DL_API ReaderList_GetInformation | ( | uint32_t | DeviceIndex, |
VAR UFR_HANDLE * | DeviceHandle, | ||
OUT c_string * | DeviceSerialNumber, | ||
VAR int * | DeviceType, | ||
OUT c_string * | DeviceFWver, | ||
VAR int * | DeviceCommID, | ||
VAR int * | DeviceCommSpeed, | ||
OUT c_string * | DeviceCommFTDISerial, | ||
OUT c_string * | DeviceCommFTDIDescription, | ||
VAR int * | DeviceIsOpened, | ||
VAR int * | DeviceStatus ) |
Used to retrieve information about a reader found & connected via ReaderList_UpdateAndGetCount(). This should be executed for each device based on number of devices found, providing valid index.
DeviceIndex | index of the device in the readers list |
DeviceHandle | assigned Handle |
DeviceSerialNumber | device serial number |
DeviceType | device type - device identification in AIS database |
DeviceFWver | version of firmware |
DeviceCommID | device identification number (master) |
DeviceCommSpeed | communication speed |
DeviceCommFTDISerial | FTDI COM port identification |
DeviceCommFTDIDescription | FTDI COM port description |
DeviceIsOpened | is Device opened |
DeviceStatus | actual device status |
DeviceSerialNumber | / assigned Handle |
DeviceType | / device serial number |
DeviceFWver | / device type - device identification in AIS database |
DeviceCommID | / version of firmware |
DeviceCommSpeed | / device identification number (master) |
DeviceCommFTDISerial | / communication speed |
DeviceCommFTDIDescription | / FTDI COM port identification |
DeviceIsOpened | / FTDI COM port description |
DeviceStatus | / is Device opened/ actual device status |
UFR_STATUS DL_API ReaderList_GetSerialByIndex | ( | int32_t | DeviceIndex, |
VAR uint32_t * | lpulSerialNumber ) |
Gets reader’s reader serial number as a pointer to 4 byte value, based on the index of the device in the list.
DeviceIndex | Index of the device |
lpulSerialNumber | Contains reader serial number as a 4 byte value (uint32_t) |
UFR_STATUS DL_API ReaderList_GetSerialDescriptionByIndex | ( | int32_t | DeviceIndex, |
OUT uint8_t | pSerialDescription[8] ) |
Gets reader’s descriptive name as a array of 8 chars, based on the index of the device in the list.
DeviceIndex | Index of the device |
pSerialDescription | Contains reader serial number as array of 8 chars |
UFR_STATUS DL_API ReaderList_GetTypeByIndex | ( | int32_t | DeviceIndex, |
VAR uint32_t * | lpulReaderType ) |
Gets devices reader type based on the index of the device in the list.
DeviceIndex | Index of the device |
lpulReaderType | Contains reader type as 4 byte value (uint32_t) |
UFR_STATUS DL_API ReaderList_OpenByIndex | ( | const int32_t | DeviceIndex, |
VAR UFR_HANDLE * | hndUFR ) |
Tries to re-open the device based on the device index. This method should be called when you use ReaderCloseM() to close the communication with the reader opened by ReaderList_UpdateAndGetCount().
DeviceIndex | Index of the device |
hndUFR | handle of the uFR device |
UFR_STATUS DL_API ReaderList_OpenBySerial | ( | VAR UFR_HANDLE * | hndUFR, |
const char | Device_SN[16] ) |
Tries to re-open the device based on the serial number of the device. This method should be called when you use ReaderCloseM() to close the communication with the reader opened by ReaderList_UpdateAndGetCount().
hndUFR | handle of the uFR device |
Device_SN | Serial number of the device contained as char array |
UFR_STATUS DL_API ReaderList_UpdateAndGetCount | ( | VAR int32_t * | NumberOfDevices | ) |
This is the first function in the order for execution for the multi-reader support. The function prepares the list of connected uF-readers to the system and returns the number of list items - number of connected uFR devices. ReaderList_UpdateAndGetCount() scans all communication ports for compatible devices, probes open readers if still connected, if not close and marks their handles for deletion. If some device is disconnected from the system this function should remove its handle. As of uFCoder version 5.0.73, this function probes both FTDI & COM devices and tries to open them. Each call to this method will close previously opened devices by this function, scan, and open everything found.
NumberOfDevices | how many compatible devices are connected to the system |