Inherits com.boschrexroth.mlpi.MlpiComponent.MlpiHandle.
Classes | |
enum | ApiProtection |
class | ConnectionDescription |
class | ConnectionInfo |
class | Library |
class | Version |
Definition of the MlpiConnection which is the root object of a connection to a MLPI Device.
The MlpiConnection class is the root object of the MLPI object hierarchy. It represents a single connection to a device that supports the MLPI. The MlpiConnection class contains properties and subobjects which contain further MLPI methods.
Definition at line 66 of file MlpiConnection.java.
|
inline |
Default constructor.
Definition at line 268 of file MlpiConnection.java.
|
inline |
Destructor. Calls disconnect.
Definition at line 273 of file MlpiConnection.java.
References com.boschrexroth.mlpi.MlpiConnection.disconnect().
|
inline |
This function connects the user application with a MLPI Device. The first argument is used to specify the target device to which you want to connect. This can either be a control running on the same physical device as your application or a control that is connected via a network, for example, by UnsecCommunication. In this case, you have to give the IP or host name of the target. For MLPIS the argument 'tls' must be specified (as seen below), if it is not given, then non secure MLPI connection is used by default. The client is not required to provide credentials (i.e. private key and certificate), however, the server must provide them. These credentials are automatically generated in targets with Firmware versions starting with version 14V18.
It is also possible to set additional options in the connect string as an argument list.
address=value IP
or URL path of connection. timeout_connect=value Timeout
used for connecting in milliseconds. timeout_send=value Timeout
used for sending data to target in milliseconds. timeout_receive=value Timeout
used for receiving data from target in milliseconds. 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. user=value Login
name of user. See Permission and user management for more information about user and permission system. password=value Password
of user. tls=value If
set to 'active', then MLPI is tunneled through TLS rather than TCP, thus providing data confidentiality and integrity for the connection (default: false). It is highly recommended to change this setting to true if possible.A timeout value of 0 means that the timeout value should be chosen automatically by the operating system.
Android.permission.ACCESS_NETWORK_STATE
and Android.permission.INTERNET
. These can be found in the AndroidManifest.xml
of your application. See also in the manual IntroductionmlpiApiConnect
, where you can find further documentation. Definition at line 324 of file MlpiConnection.java.
References com.boschrexroth.mlpi.MlpiConnection.disconnect(), and com.boschrexroth.mlpi.MlpiConnection.getConnectionHandle().
|
inline |
This function disconnects the user application from the MlpiConnection. After closing the MLPI connection, no more method calls to the MLPI device can be made.
mlpiApiDisconnect
, where you can find further documentation. Definition at line 354 of file MlpiConnection.java.
References com.boschrexroth.mlpi.MlpiConnection.getConnectionHandle().
Referenced by com.boschrexroth.mlpi.MlpiConnection.connect(), and com.boschrexroth.mlpi.MlpiConnection.finalize().
|
inline |
This function returns the connection handle of the MLPI connection.
Definition at line 377 of file MlpiConnection.java.
Referenced by com.boschrexroth.mlpi.MlpiConnection.connect(), and com.boschrexroth.mlpi.MlpiConnection.disconnect().
|
inline |
Property to access the Logic methods of the MLPI device.
Definition at line 385 of file MlpiConnection.java.
|
inline |
Property to access the System methods of the MLPI device.
Definition at line 393 of file MlpiConnection.java.
|
inline |
Property to access the Watchdog methods of the MLPI device.
Definition at line 400 of file MlpiConnection.java.
|
inline |
Property to access the Motion methods of the MLPI device.
Definition at line 407 of file MlpiConnection.java.
|
inline |
Property to access the Io methods of the MLPI device.
Definition at line 414 of file MlpiConnection.java.
|
inline |
Property to access the Parameter methods of the MLPI device.
Definition at line 421 of file MlpiConnection.java.
|
inline |
Property to access the Robot methods of the MLPI device.
Definition at line 428 of file MlpiConnection.java.
|
inline |
Property to access the Container methods of the MLPI device.
Definition at line 435 of file MlpiConnection.java.
|
inline |
Property to access the Task methods of the MLPI device.
Definition at line 442 of file MlpiConnection.java.
|
inline |
Property to access the Security methods of the MLPI device.
Definition at line 449 of file MlpiConnection.java.
|
inline |
Definition at line 457 of file MlpiConnection.java.
|
inline |
Property to access the Access Control methods of the MLPI device.
Definition at line 464 of file MlpiConnection.java.
|
inline |
Definition at line 472 of file MlpiConnection.java.
References com.boschrexroth.mlpi.MlpiConnection.closeConnectionByUid(), com.boschrexroth.mlpi.MlpiConnection.closeConnectionsByUri(), com.boschrexroth.mlpi.MlpiConnection.closeConnectionsByUser(), com.boschrexroth.mlpi.MlpiConnection.delay(), com.boschrexroth.mlpi.MlpiConnection.getAccountPermissions(), com.boschrexroth.mlpi.MlpiConnection.getAccounts(), com.boschrexroth.mlpi.MlpiConnection.getAllConnectionDescription(), com.boschrexroth.mlpi.MlpiConnection.getClientCoreVersion(), com.boschrexroth.mlpi.MlpiConnection.getLibrarySupport(), com.boschrexroth.mlpi.MlpiConnection.getOwnConnectionDescription(), com.boschrexroth.mlpi.MlpiConnection.getOwnPermissions(), com.boschrexroth.mlpi.MlpiConnection.getServerCoreVersion(), com.boschrexroth.mlpi.MlpiConnection.isConnected(), com.boschrexroth.mlpi.MlpiConnection.setLabelOfConnection(), com.boschrexroth.mlpi.MlpiConnection.setNameOfConnection(), com.boschrexroth.mlpi.MlpiConnection.testConnection(), com.boschrexroth.mlpi.MlpiConnection.userAccountControlLoadAccounts(), com.boschrexroth.mlpi.MlpiConnection.userAccountControlReload(), and com.boschrexroth.mlpi.MlpiConnection.userAccountControlUnloadAccounts().
native boolean com.boschrexroth.mlpi.MlpiConnection.isConnected | ( | ) |
This function returns the current state of the MLPI connection. If false
is returned, then the connection is either not yet established or closed due to a communication error or because disconnect has been called. In all cases, a reconnect using connect has to be made to make new MLPI method calls. If the connection has been lost for an unknown reason, try increasing the connection timeout using connect.
mlpiApiIsConnected
, where you can find further documentation. Referenced by com.boschrexroth.mlpi.MlpiConnection.AccessControl().
native Version com.boschrexroth.mlpi.MlpiConnection.getClientCoreVersion | ( | ) |
This function returns the client core version of the MLPI connection using a Version object.
mlpiApiGetClientCoreVersion
, where you can find further documentation. Referenced by com.boschrexroth.mlpi.MlpiConnection.AccessControl().
native Version com.boschrexroth.mlpi.MlpiConnection.getServerCoreVersion | ( | ) |
This function returns the server core version of the MLPI connection using a version object.
mlpiApiGetServerCoreVersion
, where you can find further documentation. Referenced by com.boschrexroth.mlpi.MlpiConnection.AccessControl().
native void com.boschrexroth.mlpi.MlpiConnection.delay | ( | int | delayMilliseconds | ) |
This function does a simple delay on the server side. All this function does is a blocking delay on the server side in the given amount of milliseconds. Use it during development or debugging of your application to simulate high traffic on your network. This way you can test the behavior of your client application when MLPI communication slows down. The delay has no impact on the performance of the control.
[in] | delayMilliseconds | Delay in milliseconds to block. |
mlpiApiDelay
, where you can find further documentation. Referenced by com.boschrexroth.mlpi.MlpiConnection.AccessControl().
native ConnectionInfo com.boschrexroth.mlpi.MlpiConnection.testConnection | ( | int | payloadBytes, |
int | numMeasurements | ||
) |
This function performs a benchmark on the MLPI communication mechanism. Use it 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. These are the basic costs needed for nearly every MLPI call.
[in] | payloadBytes | Payload in number of bytes that is used for the MLPI communication to be measured. |
[in] | numMeasurements | Number of measurements to do for calculating the average resulting timing values. |
mlpiApiTestConnection
, where you can find further documentation. Referenced by com.boschrexroth.mlpi.MlpiConnection.AccessControl().
native void com.boschrexroth.mlpi.MlpiConnection.setNameOfConnection | ( | String | name | ) |
Using this function, you can assign a short descriptive name to your connection. It is not necessary to give your connection a name, but the name might be useful for debugging and maintaining your connections.
[in] | name | User-defined name of connection. |
mlpiApiSetNameOfConnection
, where you can find further documentation. Referenced by com.boschrexroth.mlpi.MlpiConnection.AccessControl().
native void com.boschrexroth.mlpi.MlpiConnection.setLabelOfConnection | ( | String | label | ) |
Using this function, you can assign a long descriptive label to your connection. It is not necessary to set the connection label, but the label might be useful for debugging and maintaining your connections.
[in] | label | User-defined label of connection. |
mlpiApiSetLabelOfConnection
, where you can find further documentation. Referenced by com.boschrexroth.mlpi.MlpiConnection.AccessControl().
native ConnectionDescription com.boschrexroth.mlpi.MlpiConnection.getOwnConnectionDescription | ( | ) |
This function will return information about the connection.
mlpiApiGetOwnConnectionDescription
, where you can find further documentation. Referenced by com.boschrexroth.mlpi.MlpiConnection.AccessControl().
native ConnectionDescription [] com.boschrexroth.mlpi.MlpiConnection.getAllConnectionDescription | ( | ) |
This function will return information about all established connections of the device.
mlpiApiGetAllConnectionDescription
, where you can find further documentation. Referenced by com.boschrexroth.mlpi.MlpiConnection.AccessControl().
native void com.boschrexroth.mlpi.MlpiConnection.closeConnectionByUid | ( | long | uid | ) |
This function performs the closing of a connection selected by the unique identifier (uid) of a connection. You can determine the uid by using the function getOwnConnectionDescription.
[in] | uid | Unique identifier of connection. |
mlpiApiCloseConnectionByUid
, where you can find further documentation. Referenced by com.boschrexroth.mlpi.MlpiConnection.AccessControl().
native void com.boschrexroth.mlpi.MlpiConnection.closeConnectionsByUser | ( | String | user | ) |
This function performs the closing of multiple connections selected by the user.
[in] | user | Login user name of connection. |
mlpiApiCloseConnectionsByUser
, where you can find further documentation. Referenced by com.boschrexroth.mlpi.MlpiConnection.AccessControl().
native void com.boschrexroth.mlpi.MlpiConnection.closeConnectionsByUri | ( | String | uri | ) |
This function performs the closing of multiple connections selected by a combination of the uniform resource identifier (uri) and the placeholder '*'.
[in] | uri | URI of connection (e.g. "mlpi.tcp://'IP-address':'port'"). |
mlpiApiCloseConnectionsByUri
, where you can find further documentation. Referenced by com.boschrexroth.mlpi.MlpiConnection.AccessControl().
native void com.boschrexroth.mlpi.MlpiConnection.userAccountControlReload | ( | ) |
This function performs the reloading of all currently loaded account manifests know as 'accounts.xml'.
mlpiApiUserAccountControlReload
, where you can find further documentation. Referenced by com.boschrexroth.mlpi.MlpiConnection.AccessControl().
native void com.boschrexroth.mlpi.MlpiConnection.userAccountControlLoadAccounts | ( | String | path | ) |
This function performs the loading of the accounts of an additional account manifest.
path | String |
mlpiApiUserAccountControlLoadAccounts
, where you can find further documentation. Referenced by com.boschrexroth.mlpi.MlpiConnection.AccessControl().
native void com.boschrexroth.mlpi.MlpiConnection.userAccountControlUnloadAccounts | ( | String | path | ) |
This function performs the unloading of the accounts of an additional account manifest.
path | String |
mlpiApiUserAccountControlUnloadAccounts
, where you can find further documentation. Referenced by com.boschrexroth.mlpi.MlpiConnection.AccessControl().
native String [] com.boschrexroth.mlpi.MlpiConnection.getOwnPermissions | ( | ) |
This function provides the reading of own permissions based on account manifest 'accounts.xml'.
mlpiApiGetOwnPermissions
, where you can find further documentation. Referenced by com.boschrexroth.mlpi.MlpiConnection.AccessControl().
native String [] com.boschrexroth.mlpi.MlpiConnection.getAccounts | ( | ) |
This function provides the reading of all available accounts based on account manifest 'accounts.xml'.
mlpiApiGetAccounts
, where you can find further documentation. Referenced by com.boschrexroth.mlpi.MlpiConnection.AccessControl().
native String [] com.boschrexroth.mlpi.MlpiConnection.getAccountPermissions | ( | String | account | ) |
This function provides the reading of the permissions of an account based on account manifest 'accounts.xml'.
[in] | account | String that identifies the account for which permissions were read. Set to NULL to get your own permissions. |
mlpiApiGetAccountPermissions
, where you can find further documentation. Referenced by com.boschrexroth.mlpi.MlpiConnection.AccessControl().
native Library [] com.boschrexroth.mlpi.MlpiConnection.getLibrarySupport | ( | ) |
This function provides names and IDs of supported libraries.
mlpiApiGetLibrarySupport
, where you can find further documentation. Referenced by com.boschrexroth.mlpi.MlpiConnection.AccessControl().