57 package com.boschrexroth.mlpi;
68 final static String[] libnames = {
74 "mlpijava-linux-gcc-x64",
75 "mlpijava-linux-gcc-x86",
76 "mlpijava-linux-gcc-armhf",
77 "mlpijava-linux-gcc-arm",
81 final static String[] openssl_libnames = {
89 for(
int i = 0; i < openssl_libnames.length - 1; i=i+2) {
91 java.lang.System.out.print(
"Try to load OpenSSL library '" + openssl_libnames[i]);
92 java.lang.System.loadLibrary(openssl_libnames[i]);
93 java.lang.System.out.println(
"'... succeeded.");
95 java.lang.System.out.print(
"Try to load OpenSSL library '" + openssl_libnames[i+1]);
96 java.lang.System.loadLibrary(openssl_libnames[i+1]);
97 java.lang.System.out.println(
"'... succeeded.");
100 catch (UnsatisfiedLinkError e) {
101 java.lang.System.out.println(
"'... failed.");
107 boolean loaded =
false;
108 for(String libname : libnames ) {
110 java.lang.System.out.print(
"Try to load library '" + libname);
111 java.lang.System.loadLibrary(libname);
112 java.lang.System.out.println(
"'... succeeded.");
116 catch (UnsatisfiedLinkError e) {
117 java.lang.System.out.println(
"'... failed.");
121 throw new UnsatisfiedLinkError(
"Could not find valid MLPI JNI library.");
167 public double minimum;
168 public double maximum;
169 public double average;
170 public double variance;
171 public double standardDeviation;
186 MLPI_API_PROTECTION_NON (0x00),
187 MLPI_API_PROTECTION_WATCHDOG (0x01),
188 MLPI_API_PROTECTION_COMPLETE (0x02);
191 int getCode() {
return _code; }
195 if (code == value.getCode())
return value;
226 public int requestCounter;
227 public int lastRequest;
250 private long _connectionHandle = -1;
255 private Io _io =
new Io(
this);
259 private Task _task =
new Task(
this);
332 long handle = connectInternal2(address);
335 if (handle != -1 && handle != 0) {
336 setConnectionHandle(handle);
338 throw new MlpiException(
"Internal error during MLPI connection!");
341 catch(UnsatisfiedLinkError e) {
342 throw new MlpiException(
"MLPI_E_FAIL: General error during function call. MLPI JNI library mismatch (old native shared library).");
359 catch(UnsatisfiedLinkError e) {
360 throw new MlpiException(
"MLPI_E_FAIL: General error during function call. MLPI JNI library mismatch (old native shared library).");
364 setConnectionHandle(-1);
367 private native
long connectInternal2(String address);
368 private native
void disconnectInternal2(
long handle);
370 private void setConnectionHandle(
long handle) {
371 _connectionHandle = handle;
378 return _connectionHandle;
465 return _accessControl;
473 return _accessControl;
531 public native
void delay(
int delayMilliseconds);
native void userAccountControlLoadAccounts(String path)
Empty class definition which defines global structures/classes.
Class definition of the SystemLib.
Class definition of the TaskLib.
native void userAccountControlUnloadAccounts(String path)
long getConnectionHandle()
AccessControl AccessControl()
Class definition of the AccessControlLib.
Class definition of the mlpiRobotLib.
native void closeConnectionsByUri(String uri)
native String[] getOwnPermissions()
native String[] getAccounts()
This structure is used by the function testConnection to return the results of the timing measurement...
native Version getServerCoreVersion()
Class definition of the LogicLib.
This enumeration defines the protection levels of a connection.
This class defines information about the date and time.
Class definition of the ParameterLib.
AccessControl accessControl()
native ConnectionDescription getOwnConnectionDescription()
native boolean isConnected()
native Version getClientCoreVersion()
This structure is used by getOwnConnectionDescription and getAllConnectionDescription to provide info...
native void delay(int delayMilliseconds)
Describes the API version information.
native ConnectionInfo testConnection(int payloadBytes, int numMeasurements)
native String[] getAccountPermissions(String account)
native void closeConnectionsByUser(String user)
native Library[] getLibrarySupport()
void connect(String address)
Class definition of the MotionLib.
native void userAccountControlReload()
native ConnectionDescription[] getAllConnectionDescription()
native void setNameOfConnection(String name)
native void closeConnectionByUid(long uid)
Class definition of the WatchdogLib.
Definition of the MlpiConnection which is the root object of a connection to a MLPI Device...
native void setLabelOfConnection(String label)
Class definition of the IoLib.
This structure is used by getLibrarySupport to provide getting names and IDs of supported libraries...
Exception class for all MLPI runtime errors.