ECP-VELOC Components
User documentation for all components
|
asynchronous transfer library More...
Go to the source code of this file.
Enumerations | |
enum | axl_xfer_t { AXL_XFER_NULL = 0, AXL_XFER_DEFAULT, AXL_XFER_SYNC, AXL_XFER_ASYNC_DAEMON, AXL_XFER_ASYNC_DW, AXL_XFER_ASYNC_BBAPI, AXL_XFER_NATIVE, AXL_XFER_PTHREAD, AXL_XFER_STATE_FILE } |
Functions | |
int | AXL_Init (void) |
int | AXL_Finalize (void) |
int | AXL_Create (axl_xfer_t xtype, const char *name, const char *state_file) |
kvtree * | AXL_Config (const kvtree *config) |
int | AXL_Add (int id, const char *source, const char *destination) |
int | AXL_Dispatch (int id) |
int | AXL_Resume (int id) |
int | AXL_Test (int id) |
int | AXL_Wait (int id) |
int | AXL_Cancel (int id) |
int | AXL_Free (int id) |
int | AXL_Stop (void) |
enum axl_xfer_t |
int AXL_Add | ( | int | id, |
const char * | source, | ||
const char * | destination | ||
) |
Add a file to an existing transfer handle
int AXL_Cancel | ( | int | id | ) |
Cancel an existing transfer, must call Wait on cancelled transfers, if cancelled wait returns an error
kvtree* AXL_Config | ( | const kvtree * | config | ) |
Get/set AXL configuration values.
config: The new configuration. Global variables are in top level of the tree, and per-ID values are subtrees. If config=NULL, then return a kvtree with all the configuration values (globals and all per-ID trees).
Thread safety: setting the DEBUG or any per-transfer configuration value after the transfer has been dispatched entails a race contion between the main thread and the worker threads. Changing configuration options after a transfer has been dispatched is not supported.
Return value: If config != NULL, then return config on success. If config=NULL (you're querying the config) then return a new kvtree on success. Return NULL on any failures.
[in] | config | [IN] - kvtree of options |
int AXL_Create | ( | axl_xfer_t | xtype, |
const char * | name, | ||
const char * | state_file | ||
) |
int AXL_Dispatch | ( | int | id | ) |
Initiate a transfer for all files in handle ID
int AXL_Finalize | ( | void | ) |
Shutdown any vendor services
int AXL_Free | ( | int | id | ) |
Perform cleanup of internal data associated with ID
int AXL_Init | ( | void | ) |
int AXL_Resume | ( | int | id | ) |
AXL_Resume works the same as AXL_Dispatch(), but resumes any transfers where they left off. In the case of a BB API transfer, it will leave ongoing transfers running. If there are no ongoing or canceled transfers, AXL_Resume() behaves the same as an AXL_Dispatch().
AXL_Resume() is typically used in conjunction with passing an existing state_file is passed to AXL_Create().
int AXL_Stop | ( | void | ) |
Stop (cancel and free) all transfers, useful to clean the plate when restarting
int AXL_Test | ( | int | id | ) |
Non-blocking call to test if a transfer has completed, returns AXL_SUCCESS if the transfer has completed, does not indicate whether transfer was successful, only whether it's done
int AXL_Wait | ( | int | id | ) |
BLOCKING Wait for a transfer to complete, and finalize the transfer