Open Core Interface - MLPI
MLPI-MotionLogicProgrammingInterface(mlpi4LabVIEW)  1.26.2
Transmission
Collaboration diagram for Transmission:

Functions

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)
 

Detailed Description

The following functions provide access to the transmission functionality on the target device.

Function Documentation

MLPIRESULT mlpiSystemStartTransmission ( const MLPIHANDLE  connection,
const WCHAR16 source,
const WCHAR16 destination,
MLPITASKHANDLE handle 
)

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]connectionHandle for multiple connections.
    [in]sourceString that contains the source URI.
    [in]destinationString that contains the destination URI.
    [out]handleHandle 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);
MLPIRESULT mlpiSystemGetTransmissionStatus ( const MLPIHANDLE  connection,
MlpiTransmissionStatus status,
ULONG  numElements 
)

This function retrieves the status of one or more transmissions.

Parameters
[in]connectionHandle for multiple connections.
[in,out]statusPointer 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]numElementsCount 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);
MLPIRESULT mlpiSystemGetTransmissionInfo ( const MLPIHANDLE  connection,
const MLPITASKHANDLE  handle,
MlpiTransmissionInfo info 
)

This function retrieves detailed information of a transmission.

Parameters
[in]connectionHandle for multiple connections.
[in]handleHandle of a transmission.
[out]infoDetailed information of a TFTP transmission.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 MLPITASKHANDLE handle;
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);
MLPIRESULT mlpiSystemTftpSetTimeout ( const MLPIHANDLE  connection,
const USHORT  seconds 
)

This function sets the timeout of future TFTP transmissions.

Parameters
[in]connectionHandle for multiple connections.
[in]secondsNew 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);
MLPIRESULT mlpiSystemTftpGetTimeout ( const MLPIHANDLE  connection,
USHORT seconds 
)

This function gets the timeout of future TFTP transmissions.

Parameters
[in]connectionHandle for multiple connections.
[out]secondsTimeout of future TFTP transmissions.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // get TFTP timeout
2 USHORT timeout;
3 MLPIRESULT result = mlpiSystemTftpGetTimeout(connection, &timeout);
MLPIRESULT mlpiSystemTftpSetRetransmitCount ( const MLPIHANDLE  connection,
const USHORT  count 
)

This function sets the maximum retransmit count of future TFTP transmissions.

Parameters
[in]connectionHandle for multiple connections.
[in]countNew 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);
MLPIRESULT mlpiSystemTftpGetRetransmitCount ( const MLPIHANDLE  connection,
USHORT count 
)

This function gets the maximum retransmit count of future TFTP transmissions.

Parameters
[in]connectionHandle for multiple connections.
[out]countMaximum 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);