Open Core Interface - MLPI
MLPI-MotionLogicProgrammingInterface(mlpi4MATLAB)  1.26.2
ApiLib
Collaboration diagram for ApiLib:
API Functions

API Functions

Description

The API function group contains elementary functions used to establish a connection between your client application and a target system. This has to be done before any other MLPI function can be called.

The MLPI is session oriented. This means, that you need to connect to a target before you can use any other MLPI function calls. There are a just few functions like m4MApiGetClientCoreVersion that do not need an online communication to the target.

After successfully connecting to the target using m4MApiConnect you will get a handle object which identifies your connection and which can be used for any further MLPI function call. Please have a look at the documentation and examples of the function m4MApiConnect for more information.

You will find some additional functions to test if the session is still established with m4MApiIsConnected, to test the connection performance with m4MApiTestConnection or to get version information with m4MApiGetClientCoreVersion and m4MApiGetServerCoreVersion.

Note: Make sure that mlpi4MATLAB functions are called with a valid connection handle. Invalid handles can cause unexpected behaviour.

More Information

For further information, refer to the mlpiCore documentation: ApiLib

Copyright

Legal notice and version: © 2017 Bosch Rexroth Corporation http://www.boschrexroth.com DC-AE/EAS1 (MGo) Library version: 1.26.2.0.0

m4MApiCloseConnectionByUid

m4MApiCloseConnectionByUid

m4MApiCloseConnectionByUid

API-Function: Close connection by unique identifier (uid).

Description

This function closes a connection defined by the unique identifier (uid) of a connection. You can determine the uid by using the function m4MApiGetOwnConnectionDescription.

Note: A connection can not be closed if it runs in a protected mode (see MlpiApiProtection). In this case the function will be returned an error.

Syntax

m4MApiCloseConnectionByUid(connection, uid)
result = m4MApiCloseConnectionByUid(connection, uid)

Input Arguments

connection defines the connection that will be used. The argument must be scalar and of type MlpiConnection.

uid specifies the unique identifier of the connection. The argument must be a scalar uint64 value.

Output Arguments

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore function: mlpiApiCloseConnectionByUid

Copyright

Legal notice and version: © 2017 Bosch Rexroth Corporation http://www.boschrexroth.com DC-AE/EAS1 (MGo) Library version: 1.26.2.0.0

m4MApiCloseConnectionsByUri

m4MApiCloseConnectionsByUri

m4MApiCloseConnectionsByUri

API-Function: Close connections by uniform resource identifier (URI).

Description

This function closes one or multiple connections define by a combination of the uniform resource identifier (URI) and the placeholder '*'.

Note: A connection can not be closed if it runs in a protected mode (see MlpiApiProtection). In this case the function will be returned with an error.

Syntax

m4MApiCloseConnectionsByUri(connection, uri)
result = m4MApiCloseConnectionsByUri(connection, uri)

Input Arguments

connection defines the connection that will be used. The argument must be scalar and of type MlpiConnection.

uri specifies the uniform resource identifier and a placeholder. The argument must be a 1xL char array. The URI can be defined in the following format: e.g. 'mlpi.tcp://"IP-address":"port"').

Output Arguments

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore function: mlpiApiCloseConnectionsByUri

Copyright

Legal notice and version: © 2017 Bosch Rexroth Corporation http://www.boschrexroth.com DC-AE/EAS1 (MGo) Library version: 1.26.2.0.0

m4MApiCloseConnectionsByUser

m4MApiCloseConnectionsByUser

m4MApiCloseConnectionsByUser

API-Function: Close connections of a user.

Description

This function closes one or multiple connections opened by a user.

Note: A connection can not be closed if it runs in a protected mode (see MlpiApiProtection). In this case the function will be returned with an error.

Syntax

m4MApiCloseConnectionsByUser(connection, user)
result = m4MApiCloseConnectionsByUser(connection, user)

Input Arguments

connection defines the connection that will be used. The argument must be scalar and of type MlpiConnection.

user specifies the user name. The argument must be a 1xL char array. The argument can be empty if no user name has been configured in the target.

Output Arguments

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore function: mlpiApiCloseConnectionsByUser

Copyright

Legal notice and version: © 2017 Bosch Rexroth Corporation http://www.boschrexroth.com DC-AE/EAS1 (MGo) Library version: 1.26.2.0.0

m4MApiConnect

m4MApiConnect

m4MApiConnect

API-Function: Connect to control and get a connection handle.

Description

This function connects MATLAB to a MLPI device and generates a MlpiConnection object which represents this connection. This object is provided to other MLPI functions and serves as a connection handle.

Note: Do not call m4MApiConnect with an invalid handle. This might cause unexpected behaviour.

Syntax

[connection]         = m4MApiConnect(ipAddress)
[connection, result] = m4MApiConnect(ipAddress)

Input Arguments

ipAddress specifies a string with the internet protocol (IP) address. The argument must be a 1xN char array. In addition to the mandatory IP address in dot format the char array may include additional options to configure the connection individually.

Options for Input Argument ipAddress

Options for the connection can be entered as a tag-value-list in the char array ipAddress. The syntax for argument ipAddress without options is:

ipAddress = '192.169.128.10'

The syntax for argument ipAddress with options is:

ipAddress = '192.169.128.10 -guest=anonymous -password=anonymous'

The following options can be used:

suppressThrow=value: Set error reaction of MLPI functions. See Fundamentals of MLPI Programming for more information about the error handling (default: true). value must be true or false.

user=value: Login name of user. See Fundamentals of MLPI Programming for more information about user and permission system. value must be a string.

password=value: Password of user. See Fundamentals of MLPI Programming for more information about user and permission system. value must be a string.

address=value: IP or URL path of connection. value must be a string.

timeout_connect=value: Timeout used for connecting in milliseconds. value must be a string of a positive integer number.

timeout_send=value: Timeout of MLPI client used for sending data to server (target) in milliseconds (default: 0). value must be a string of a positive integer number.

timeout_receive=value: Timeout of MLPI client used for receiving data from server (target) in milliseconds (default: 0). value must be a string of a positive integer number.

auto_reconnect=value: If set to 1 or true, then the MLPI will try to reconnect with each new call of any MLPI function after connection was lost. For connecting, the same timeout settings are used as given for the first connect (default: false). value must be true or false.

keepalive_mode_server=value: If set to 1 (default, if not set), then the MLPI server will send a MLPI keepalive telegram after keepalive timeout, if the client does not send any request before. If set to 0, then MLPI server will not send any MLPI keepalive telegrams. value must be 0 or 1.

keepalive_timeout_server=value: Timeout used for sending MLPI keepalive telegram in milliseconds (default: 30000). value must be a string of a positive integer number.

keepalive_probes_server=value: Number of probes for sending MLPI keepalive telegram (default: 10). value must be a string of a positive integer number.

timeout_send_server=value: Timeout of MLPI server used for sending data to client in milliseconds (default: 60000). value must be a string of a positive integer number.

require_hash=value: If true, then only logins to servers which support hashed password logins are allowed. Server version has to be greater than 1.1.1.0 (default: false). Note: It's highly recommended to use this option if your control firmware is equal or newer then 13V06. value must be true or false.

protection=value: Select your protection level using values of MlpiApiProtection to protect your connection against closing by an other connection with the assistance of call of m4MApiCloseConnectionByUid, m4MApiCloseConnectionsByUser or m4MApiCloseConnectionsByUri. Note: This option can be also used as an attribute of an account of the user management. See Fundamentals of MLPI Programming for more information about user and permission system. value can be:

*value = 0: The connection is not protected and can be closed by an other connection (default).

*value = 1: The connection is protected against closing by an other connection if the connection watchdog is active (enabled and not fired).

*value = 2: The connection is protected against closing by an other connection completely.

A timeout value of 0 means that the timeout value is to be chosen automatically by the operating system. If no timeout is specified here, the global default value as set by the function m4MApiSetDefaultTimeout is used. This means that any option given here will override the value as set by m4MApiSetDefaultTimeout. In most cases it is not recommended to override the timeout values. Especially the send and receive timeouts should stay at their default values of 0.

If no request telegram of the MLPI client will be received by the MLPI server, by default the MLPI server will send on each keepalive_timeout_server milliseconds timeout an empty MLPI keepalive telegram. This is done to check if the client machine is still reachable or if the connection can be closed and freed again. The server will repeat this keepalive telegram for keepalive_probes_server times. After this time (keepalive_timeout_server * keepalive_probes_server) the MLPI server waits timeout_send_server milliseconds until the connection is closed finally.

Overall timeout until close of connection: t(close) = ( t(keepalive_timeout_server) * n(keepalive_probes_server) ) + t(timeout_send_server)

Note: The server cannot detect whether the client application is still running. It can only be checked if the telegrams reached the client machine and the socket is still available. For setup a right connection it can also be helpful to implement the function m4MApiNotifyAlive.

Example

m4MApiConnect('192.168.0.42:5300 -timeout_connect=2000 -timeout_send=5000 -timeout_receive=5000 -user=guest -password=guest -auto_reconnect=true')

If the user enters an invalid option or an option with a spelling error the function will not return an error.

Output Arguments

connection contains the connection that will be used for further MLPI function calls. The argument is an object of class MlpiConnection.

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. If the function call fails, other output arguments will be set to NaN. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore function: mlpiApiConnect

Copyright

Legal notice and version: © 2017 Bosch Rexroth Corporation http://www.boschrexroth.com DC-AE/EAS1 (MGo) Library version: 1.26.2.0.0

m4MApiDelay

m4MApiDelay

m4MApiDelay

API-Function: Set communication delay on the server side.

Description

This function applies a delay of communication on the server side for the specified number of of milliseconds. It can be used during development or debugging of your application to simulate high traffic on the network. This way you can test the behaviour of your client application when MLPI communication slows down. The delay has no impact on the performance of the device.

Syntax

m4MApiDelay(connection, delayMilliseconds)
result = m4MApiDelay(connection, delayMilliseconds)

Input Arguments

connection defines the connection that will be used. The argument must be scalar and of type MlpiConnection.

delayMilliseconds specifies the delay in milliseconds. The argument must be a scalar numeric value. Internally it will be converted to type uint32.

Output Arguments

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore function: mlpiApiDelay

Copyright

Legal notice and version: © 2017 Bosch Rexroth Corporation http://www.boschrexroth.com DC-AE/EAS1 (MGo) Library version: 1.26.2.0.0

m4MApiDisconnect

m4MApiDisconnect

m4MApiDisconnect

API-Function: Terminate connection to MLPI device.

Description

This function terminates a connection. Since the control's firmware can only handle a limited amount of parallel connections, every connection should be terminated, when not needed anymore. m4MApiDisconnect is called implicitly when a MlpiConnection object is destroyed. This mechanism ensures also, that if the user calls clear active connections are terminated correctly.

Syntax

m4MApiDisconnect(connection)
result = m4MApiDisconnect(connection)

Input Arguments

connection defines the connection that will be used. The argument must be scalar and of type MlpiConnection.

Output Arguments

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore function: mlpiApiDisconnect

Copyright

Legal notice and version: © 2017 Bosch Rexroth Corporation http://www.boschrexroth.com DC-AE/EAS1 (MGo) Library version: 1.26.2.0.0

m4MApiGetClientCoreVersion

m4MApiGetClientCoreVersion

m4MApiGetClientCoreVersion

API-Function: Get client core version.

Description

This function returns the version info of the MLPI client library.

Syntax

[versionInfo]         = m4MApiGetClientCoreVersion()
[versionInfo, result] = m4MApiGetClientCoreVersion()

Input Arguments

No input arguments.

Output Arguments

versionInfo contains the version information of the MLPI client library. The argument is a scalar MlpiVersion structure.

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. If the function call fails, other output arguments will be set to NaN. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore function: mlpiApiGetClientCoreVersion

Copyright

Legal notice and version: © 2017 Bosch Rexroth Corporation http://www.boschrexroth.com DC-AE/EAS1 (MGo) Library version: 1.26.2.0.0

m4MApiGetDefaultTimeout

m4MApiGetDefaultTimeout

m4MApiGetDefaultTimeout

API-Function: Get default timeout value.

Description

This function reads the default timeout for remote procedure calls done by the API. This might not be the value that is set for a currently active connection.

Syntax

[timeout]         = m4MApiGetDefaultTimeout()
[timeout, result] = m4MApiGetDefaultTimeout()

Input Arguments

No input arguments.

Output Arguments

timeout contains the default timeout value in milliseconds. The argument is a scalar and of type uint32.

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. If the function call fails, other output arguments will be set to NaN. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore function: mlpiApiGetDefaultTimeout

Copyright

Legal notice and version: © 2017 Bosch Rexroth Corporation http://www.boschrexroth.com DC-AE/EAS1 (MGo) Library version: 1.26.2.0.0

m4MApiGetOwnConnectionDescription

m4MApiGetOwnConnectionDescription

m4MApiGetOwnConnectionDescription

API-Function: Get connection description.

Description

This function returns information about the own connection.

Syntax

[description]         = m4MApiGetOwnConnectionDescription(connection)
[description, result] = m4MApiGetOwnConnectionDescription(connection)

Input Arguments

connection defines the connection that will be used. The argument must be scalar and of type MlpiConnection.

Output Arguments

description contains a detailed description of the connection. The argument is a scalar MlpiConnectionDescription structure.

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. If the function call fails, other output arguments will be set to NaN. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore function: mlpiApiGetOwnConnectionDescription

Copyright

Legal notice and version: © 2017 Bosch Rexroth Corporation http://www.boschrexroth.com DC-AE/EAS1 (MGo) Library version: 1.26.2.0.0

m4MApiGetOwnPermissions

m4MApiGetOwnPermissions

m4MApiGetOwnPermissions

API-Function: Get permissions of connection.

Description

This function reads the permissions of the used connection based on the account manifest 'accounts.xml'. Details are described in the section Permission and User Management of Fundamentals of MLPI Programming.

This function does not support code generation.

Syntax

[permissions, countOfPermissions]         = ...
m4MApiGetOwnPermissions(connection)
[permissions, countOfPermissions, result] = ...
m4MApiGetOwnPermissions(connection)

Input Arguments

connection defines the connection that will be used. The argument must be scalar and of type MlpiConnection.

Output Arguments

permissions contains the list of permissions of the connection. The argument is a Mx1 cell array. Each cell is a 1xL char array with the permission.

countOfPermissions contains the number M of permissions in the argument permissions. The argument is a scalar uint32 value.

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. If the function call fails, other output arguments will be set to NaN. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore function: mlpiApiGetOwnPermissions

Copyright

Legal notice and version: © 2017 Bosch Rexroth Corporation http://www.boschrexroth.com DC-AE/EAS1 (MGo) Library version: 1.26.2.0.0

m4MApiGetServerCoreVersion

m4MApiGetServerCoreVersion

m4MApiGetServerCoreVersion

API-Function: Get server core version.

Description

This function returns the version info of the MLPI server library.

Syntax

[versionInfo]         = m4MApiGetServerCoreVersion(connection)
[versionInfo, result] = m4MApiGetServerCoreVersion(connection)

Input Arguments

connection defines the connection that will be used. The argument must be scalar and of type MlpiConnection.

Output Arguments

versionInfo contains the version information of the MLPI server library. The argument is a scalar MlpiVersion structure.

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. If the function call fails, other output arguments will be set to NaN. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore function: mlpiApiGetServerCoreVersion

Copyright

Legal notice and version: © 2017 Bosch Rexroth Corporation http://www.boschrexroth.com DC-AE/EAS1 (MGo) Library version: 1.26.2.0.0

m4MApiIsConnected

m4MApiIsConnected

m4MApiIsConnected

API-Function: Returns current state of MLPI connection.

Description

If false is returned, then the connection is either not yet established or closed because of a communication error or because m4MApiDisconnect has been called. In all cases a reconnect using m4MApiConnect has to be made to call further MLPI functions. If a connection is lost for unknown reasons, try increasing the connection timeout using m4MApiSetDefaultTimeout. The function m4MApiConnect allows also to set an auto-reconnect option.

Syntax

[isConnected]         = m4MApiIsConnected(connection)
[isConnected, result] = m4MApiIsConnected(connection)

Input Arguments

connection defines the connection that will be used. The argument must be scalar and of type MlpiConnection.

Output Arguments

isConnected contains the logical value if the connection is established. The argument is scalar and of type logical.

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. If the function call fails, other output arguments will be set to NaN. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore function: mlpiApiIsConnected

Copyright

Legal notice and version: © 2017 Bosch Rexroth Corporation http://www.boschrexroth.com DC-AE/EAS1 (MGo) Library version: 1.26.2.0.0

m4MApiNotifyAlive

m4MApiNotifyAlive

m4MApiNotifyAlive

API-Function: Notify MLPI server that MLPI client is alive.

Description

This function notifies the MLPI server that the client is still alive. You may need this function if you use the keepalive mechanism of the MLPI server (refer to m4MApiConnect).

Note: With using of keepalive options the server will send keepalive telegrams to the client until the server recognize a zombie connection. This is because the keepalive telegrams of the MLPI server also fills the receive buffer of the client until the client sends any new request or until the client buffer is full and causes an error. To prevent this error and empty the client buffer from keepalive telegrams use this or any other function.

Syntax

m4MApiNotifyAlive(connection)
result = m4MApiNotifyAlive(connection)

Input Arguments

connection defines the connection that will be used. The argument must be scalar and of type MlpiConnection.

Output Arguments

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore function: mlpiApiNotifyAlive

Copyright

Legal notice and version: © 2017 Bosch Rexroth Corporation http://www.boschrexroth.com DC-AE/EAS1 (MGo) Library version: 1.26.2.0.0

m4MApiSetDefaultTimeout

m4MApiSetDefaultTimeout

m4MApiSetDefaultTimeout

API-Function: Set default connection timeout.

Description

This function sets the default timeout for remote procedure calls done by the API. The timeout is used for connecting, sending and receiving data. During debugging of your application you might want to set this value to M4M_CONST.INFINITE.

Note: The value has to be set before connecting to a target. The value can be overridden by options which are given as an argument list to mlpiApiConnect.

Syntax

m4MApiSetDefaultTimeout(timeout)
result = m4MApiSetDefaultTimeout(timeout)

Input Arguments

timeout defines the timeout value in milliseconds. The argument must be a scalar numeric value. Internally the numeric value will be casted to uint32.

Output Arguments

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore function: mlpiApiSetDefaultTimeout

Copyright

Legal notice and version: © 2017 Bosch Rexroth Corporation http://www.boschrexroth.com DC-AE/EAS1 (MGo) Library version: 1.26.2.0.0

m4MApiSetLabelOfConnection

m4MApiSetLabelOfConnection

m4MApiSetLabelOfConnection

API-Function: Set label of a connection.

Description

This function can be used to assign a short descriptive label to your connection. It is not necessary to assign a label to your connection, but the label might be useful for debugging and maintaining your connections.

Syntax

m4MApiSetLabelOfConnection(connection, label)
result = m4MApiSetLabelOfConnection(connection, label)

Input Arguments

connection defines the connection that will be used. The argument must be scalar and of type MlpiConnection.

label defines the label of the connection. The argument must be a 1xL char array.

Output Arguments

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore function: mlpiApiSetLabelOfConnection

Copyright

Legal notice and version: © 2017 Bosch Rexroth Corporation http://www.boschrexroth.com DC-AE/EAS1 (MGo) Library version: 1.26.2.0.0

m4MApiSetNameOfConnection

m4MApiSetNameOfConnection

m4MApiSetNameOfConnection

API-Function: Set name of a connection.

Description

This function can be used to assign a short descriptive name to your connection. It is not necessary to assign a name to your connection, but the name might be useful for debugging and maintaining your connections.

Syntax

m4MApiSetNameOfConnection(connection, name)
result = m4MApiSetNameOfConnection(connection, name)

Input Arguments

connection defines the connection that will be used. The argument must be scalar and of type MlpiConnection.

name defines the name of the connection. The argument must be a 1xL char array.

Output Arguments

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore function: mlpiApiSetNameOfConnection

Copyright

Legal notice and version: © 2017 Bosch Rexroth Corporation http://www.boschrexroth.com DC-AE/EAS1 (MGo) Library version: 1.26.2.0.0

m4MApiTestConnection

m4MApiTestConnection

m4MApiTestConnection

API-Function: Performs benchmark on MLPI communication mechanism.

Description

Use this function to measure the duration of a MLPI function call with the given payload in bytes. The resulting timing values are the durations which are necessary to marshal the payload, send the payload to the MLPI server, unmarshal it on the MLPI server, perform the remote procedure call, marshal the results, send them back to the MLPI client unmarshal them again and return them to the client thread program. This is the basic cost needed for nearly every MLPI call.

Syntax

[info]         = m4MApiTestConnection(connection, payload,...
numMeasurements)
[info, result] = m4MApiTestConnection(connection, payload,...
numMeasurements)

Input Arguments

connection defines the connection that will be used. The argument must be scalar and of type MlpiConnection.

payload specifies the number of bytes that is used for the MLPI communication to be measured. The argument must be a numeric scalar value. Internally it will be converted into type uint32.

numMeasurements specifies the number of measurements to do for calculating the average resulting timing values. The argument must be a numeric scalar value. Internally it will be converted into type uint32.

Output Arguments

info contains the connection information. The argument is a scalar MlpiConnectionInfo structure.

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. If the function call fails, other output arguments will be set to NaN. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore function: mlpiApiTestConnection

Copyright

Legal notice and version: © 2017 Bosch Rexroth Corporation http://www.boschrexroth.com DC-AE/EAS1 (MGo) Library version: 1.26.2.0.0

m4MApiUserAccountControlReload

m4MApiUserAccountControlReload

m4MApiUserAccountControlReload

API-Function: Reload user account control settings.

Description

This function reloads the user accounts based on account definition accounts.xml.

For details about the user account management refer to the section Permission and User Management in Fundamentals of MLPI Programming.

Note: The permissions of an established connection will not be influenced from new account settings.

Caution: A fail of reloading of user accounts requires a reboot of the control because another new connection can not be established anymore.

Syntax

m4MApiUserAccountControlReload(connection)
result = m4MApiUserAccountControlReload(connection)

Input Arguments

connection defines the connection that will be used. The argument must be scalar and of type MlpiConnection.

Output Arguments

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore function: mlpiApiUserAccountControlReload

Copyright

Legal notice and version: © 2017 Bosch Rexroth Corporation http://www.boschrexroth.com DC-AE/EAS1 (MGo) Library version: 1.26.2.0.0