|
MLPIRESULT | mlpiSystemStartTransmission (const MLPIHANDLE connection, const WCHAR16 *source, const WCHAR16 *destination, MLPITASKHANDLE *handle) |
|
MLPIRESULT | mlpiSystemGetTransmissionStatus (const MLPIHANDLE connection, MlpiTransmissionStatus *status, ULONG numElements) |
|
MLPIRESULT | mlpiSystemGetTransmissionInfo (const MLPIHANDLE connection, const MLPITASKHANDLE handle, MlpiTransmissionInfo *info) |
|
MLPIRESULT | mlpiSystemTftpSetTimeout (const MLPIHANDLE connection, const USHORT seconds) |
|
MLPIRESULT | mlpiSystemTftpGetTimeout (const MLPIHANDLE connection, USHORT *seconds) |
|
MLPIRESULT | mlpiSystemTftpSetRetransmitCount (const MLPIHANDLE connection, const USHORT count) |
|
MLPIRESULT | mlpiSystemTftpGetRetransmitCount (const MLPIHANDLE connection, USHORT *count) |
|
The following functions provide access to the transmission functionality on the target device.
This function starts a transmission between control and a remote device. A source and destination must be provided in URI format (see RFC 3986). At the moment only "file" and tftp" is supported as scheme. URI format for Scheme "tftp" is defined in RFC 3617.
Examples for valid URI.
- file:///ata0b/localfile.txt
- tftp://172.31.254.1/remotefile.txt
- tftp://172.31.254.1:69/remotefile.txt
Handle is returned to track the transmission. - Parameters
-
[in] | connection | Handle for multiple connections. |
[in] | source | String that contains the source URI. |
[in] | destination | String that contains the destination URI. |
[out] | handle | Handle to track transmission. |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example:
1 // start TFTP put transfer
2 MLPITASKHANDLE tftpHandle;
3 MLPIRESULT result = mlpiSystemStartTransmission(connection, "file:///ata0b/local.txt", "tftp://172.168.31.1:69/remote.txt", &tftpHandle);
This function retrieves the status of one or more transmissions.
- Parameters
-
[in] | connection | Handle for multiple connections. |
[in,out] | status | Pointer to one or more MlpiTransmissionStatus structures containing the status of the transmissions. At least the structure element "handle" must be filled when passing the structure to the function. |
[in] | numElements | Count of status. |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example:
1 // start TFTP get transfer
2 MlpiTransmissionStatus status[2];
3 mlpiSystemStartTransmission(connection, "file:///ata0b/local.txt", "tftp://172.168.31.1/remote.txt", &status[0].handle);
4 mlpiSystemStartTransmission(connection, "file:///ata0b/local.txt", "tftp://172.168.31.2/remote.txt", &status[1].handle);
5 MLPIRESULT result = mlpiSystemGetTransmissionStatus(connection, status, 2);
This function retrieves detailed information of a transmission.
- Parameters
-
[in] | connection | Handle for multiple connections. |
[in] | handle | Handle of a transmission. |
[out] | info | Detailed information of a TFTP transmission. |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example:
2 MlpiTransmissionInfo info;
3 mlpiSystemStartTransmission(connection, "file:///ata0b/local.txt", "tftp://172.168.31.1/remote.txt", &handle);
4 MLPIRESULT result = mlpiSystemGetTransmissionInfo(connection, tftpHandle, &info);
This function sets the timeout of future TFTP transmissions.
- Parameters
-
[in] | connection | Handle for multiple connections. |
[in] | seconds | New timeout of future TFTP transmissions. |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example:
1 // set TFTP timeout to 10 seconds
2 MLPIRESULT result = mlpiSystemTftpSetTimeout(connection, 10);
This function gets the timeout of future TFTP transmissions.
- Parameters
-
[in] | connection | Handle for multiple connections. |
[out] | seconds | Timeout of future TFTP transmissions. |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example:
3 MLPIRESULT result = mlpiSystemTftpGetTimeout(connection, &timeout);
This function sets the maximum retransmit count of future TFTP transmissions.
- Parameters
-
[in] | connection | Handle for multiple connections. |
[in] | count | New maximum retransmit count of future TFTP transmissions. |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example:
1 // set TFTP maximum retransmit count to 5
2 MLPIRESULT result = mlpiSystemTftpSetRetransmitCount(connection, 5);
This function gets the maximum retransmit count of future TFTP transmissions.
- Parameters
-
[in] | connection | Handle for multiple connections. |
[out] | count | Maximum retransmit count of future TFTP transmissions. |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example:
1 // get TFTP maximum retransmit count
2 USHORT maxRetransmitCount;
3 MLPIRESULT result = mlpiSystemTftpGetRetransmitCount(connection, &maxRetransmitCount);