Multi API-DLL Functions

Multi API-DLL Functions

These functions operate on meta-data within the Multi API-DLL and help manage the underlying API-DLL instances. These functions do not directly program target devices. Use these functions to initialize the desired number of FPAs, selected all or one FPA(s), read FPA serial numbers, or clean-up resources used by Elprotronic’s DLLs.

Once the desired FPAs have been successfully opened, use Generic Functions to initialize the FPAs, and configure them for the target device(s) being programmed.

 

1. F_OpenInstancesAndFPAs

General Description

Multi API-DLL scans USB ports or LAN for connected FPAs listed in the setup file, or input string. When an FPA listed in the setup file is found, the corresponding API-DLL is copied on disk if necessary, and loaded. F_Initialization should be called for each FPA after this function succeeds.

Syntax

INT_X F_OpenInstancesAndFPAs( char * FileName )

Input

char * FileName : path to setup file, or list of serial numbers.

Valid FPAs-setup.ini setup file lists FPAs and SN pairs.

FPA-1 20150003 FPA-2 20180134 --or-- FPA-1 20090123 FPA-2 * //any serial number (can only be done at last line)

Valid FPAsIPs.ini, setup file lists FPAs by IP address:

FPAETH-IP-1 192.168.0.101 FPAETH-IP-2 192.168.0.102 FPAETH-IP-3 192.168.0.103 FPAETH-IP-4 192.168.0.104

Invalid example:

FPA-1 * //this line will be read FPA-2 * //this line will be ignored

Valid list of serial numbers as a string:

"*# FPA-1 20090123 FPA-2 20090346"

translates to:

FPA-1 20090123 FPA-2 20090346

input string: "*# *" translates to:

FPA-1 *

In both cases, for the setup file and the input string, if a specified FPA is missing then it will not
affect subsequent entries. Therefore, a setup file with these contents:

FPA-1 20090123 FPA-2 20090346 FPA-3 20090222 FPA-4 20090245

and with FPA-3 missing (not connected, etc.) will initialize the Multi API-DLL to:

FPA-1 20090123 FPA-2 20090346 FPA-3 empty FPA-4 20090245

Output

INT_X : number of instances opened successfully

  • 0 - failed

2. F_CloseInstances

General Description

All FPAs terminate communication with target devices and close target devices according to configuration settings (power setting, adapter line states, etc.). Finally, the USB/Ethernet connections to the FPAs are terminated and API-DLL instances are freed. The Multi API-DLL can now be used to open a new set of FPAs using the function F_OpenInstancesAndFPAs.

Syntax

INT_X F_CloseInstances ( void );

Input

none.

Output

INT_X : success or failed

  • TRUE (1) - success

  • FALSE (0) - failed

3. F_Set_FPA_index

General Description

Select desired FPA index to perform specific tasks (access specific API-DLL instance).

Syntax

INT_X F_Set_FPA_index ( BYTE fpa );

Input

BYTE fpa : desired FPA index, 1 to 64, or 0 for all

Output

INT_X : success or error

IMPORTANT

Other functions that try to access this FPA index will also return FPA_INVALID_NO if this function was not called with a proper parameter.

4. F_Get_FPA_index

General Description

Get current FPA index.

Syntax

BYTE F_Get_FPA_index( void );

Input

none.

Output