57 package com.boschrexroth.mlpi;
65 public class System extends MlpiComponent {
69 final public String VERSION_FIRMWARE =
"VERSION_FIRMWARE";
70 final public String VERSION_HARDWARE =
"VERSION_HARDWARE";
71 final public String VERSION_LOGIC =
"VERSION_LOGIC";
72 final public String VERSION_BSP =
"VERSION_BSP";
73 final public String VERSION_MLPI_SERVER_CORE =
"VERSION_MLPI_SERVER_CORE";
92 LANGUAGE_USER_DEFINED (99);
95 int getCode() {
return _code; }
96 Language(
int code) { this._code = code; }
99 if (code == value.getCode())
return value;
123 SYSTEMMODE_P0 (0x00),
124 SYSTEMMODE_P1 (0x01),
125 SYSTEMMODE_P2 (0x02),
126 SYSTEMMODE_P3 (0x03),
127 SYSTEMMODE_BB (0x04),
128 SYSTEMMODE_SWITCHING (0xFF);
131 int getCode() {
return _code; }
135 if (code == value.getCode())
return value;
154 DIAGNOSIS_PASSIVE (0x00),
155 DIAGNOSIS_ACTIVE (0x01),
156 DIAGNOSIS_RESET (0x02),
157 DIAGNOSIS_UNKNOWN (0x03);
160 int getCode() {
return _code; }
164 if (code == value.getCode())
return value;
185 DESPATCHER_CONTROL (0x00),
186 DESPATCHER_DRIVE (0x01),
187 DESPATCHER_LOGIC (0x02),
188 DESPATCHER_AXIS (0x03),
189 DESPATCHER_KINEMATIC (0x04),
190 DESPATCHER_PCI (0x05);
193 int getCode() {
return _code; }
197 if (code == value.getCode())
return value;
223 MLPI_LED_PATTERN_GREEN ( 0),
224 MLPI_LED_PATTERN_GREEN_250 ( 1),
225 MLPI_LED_PATTERN_GREEN_500 ( 2),
226 MLPI_LED_PATTERN_GREEN_1000 ( 3),
227 MLPI_LED_PATTERN_GREEN_ORANGE_250 ( 4),
228 MLPI_LED_PATTERN_GREEN_ORANGE_500 ( 5),
229 MLPI_LED_PATTERN_GREEN_ORANGE_1000 ( 6),
230 MLPI_LED_PATTERN_GREEN_RED_250 ( 7),
231 MLPI_LED_PATTERN_GREEN_RED_500 ( 8),
232 MLPI_LED_PATTERN_GREEN_RED_1000 ( 9),
233 MLPI_LED_PATTERN_INVALID ( -1);
236 int getCode() {
return _code; }
240 if (code == value.getCode())
return value;
277 PATH_PROJECTDATAPROTECTED (0x03),
278 PATH_PROJECTDATA (0x04),
279 PATH_PROJECTDATA_BUNDLES (0x05),
280 PATH_PROJECTDATA_PLC (0x06),
281 PATH_PROJECTDATA_TMP (0x07),
282 PATH_PROJECTDATA_JVM (0x08),
283 PATH_PROJECTDATA_JVM_BUNDLES (0x09),
284 PATH_PROJECTDATA_JVM_LIC (0x0A),
285 PATH_PROJECTDATA_JVM_USER (0x0B),
286 PATH_PROJECTDATAPROTECTED_BUNDLES (0x0C),
287 PATH_PROJECTDATAPROTECTED_JVM (0x0D),
288 PATH_PROJECTDATAPROTECTED_JVM_BUNDLES (0x0E),
289 PATH_PROJECTDATAPROTECTED_JVM_LIC (0x0F),
290 PATH_PROJECTDATAPROTECTED_JVM_USER (0x10);
293 int getCode() {
return _code; }
297 if (code == value.getCode())
return value;
317 DIAGNOSIS_ERROR_FATAL (0xF8),
318 DIAGNOSIS_ERROR_NONFATAL_CONTROL (0xF5),
319 DIAGNOSIS_ERROR_NONFATAL (0xF0),
320 DIAGNOSIS_WARNING (0xE0),
321 DIAGNOSIS_MESSAGE (0xA0);
324 int getCode() {
return _code; }
328 if (code == value.getCode())
return value;
351 MAX_APPLICATIONS ( 0),
356 MAX_TOUCHPROBES ( 5),
357 MAX_OSCI_CHANNELS ( 6),
361 int getCode() {
return _code; }
365 if (code == value.getCode())
return value;
405 public String toString()
407 return String.format(
"%04d-%02d-%02d %02d:%02d:%02d.%03d", year,month,day,hour,minute,second,milliSecond);
438 public String toString()
440 String numberAsString = Long.toHexString(number);
441 return numberAsString.substring(0,4) +
"." + numberAsString.substring(4,numberAsString.length()) +
"\t" + dateTime.toString() +
"\t" + text;
456 public static class MemoryInfo
458 public long totalVolatileBytes;
459 public long totalNonvolatileBytes;
460 public long freeVolatileBytes;
461 public long freeNonvolatileBytes;
464 public String toString()
466 return "total volatile memory:\t" + convertBytes(totalVolatileBytes) +
"\t free volatile memory:\t" + convertBytes(freeVolatileBytes) +
467 "\ttotal non-volatile memory:\t" + convertBytes(totalNonvolatileBytes) +
"\t free non-volatile memory:\t" + convertBytes(freeNonvolatileBytes);
470 private String convertBytes(
long bytes)
472 if(bytes < 1024)
return bytes +
" Bytes";
473 int exp = (int) (Math.log(bytes) / Math.log(1024));
474 String unit =
"KMGTPE".charAt(exp-1) +
"i";
475 return String.format(
"%.1f %sB", bytes / Math.pow(1024, exp), unit);
494 public String toString()
496 return "free diskspace:\t" + convertBytes(freeDiskspace) +
"\ttotal diskspace\t" + convertBytes(totalDiskspace);
499 private String convertBytes(
long bytes)
501 if(bytes < 1024)
return bytes +
" Bytes";
502 int exp = (int) (Math.log(bytes) / Math.log(1024));
503 String unit =
"KMGTPE".charAt(exp-1) +
"i";
504 return String.format(
"%.1f %sB", bytes / Math.pow(1024, exp), unit);
513 System(MlpiHandle connection) {
530 public native String
getName();
548 public native
void setName(String name);
690 public native
void setGateway(String gateway);
936 public native
void reboot();
native String getGateway()
native void setTargetMode(SystemMode mode)
native void setIpAddress(String ipAddress)
Class definition of the SystemLib.
String text
Diagnosis text with diagnosis description.
native String[] getRootPaths()
native long getLimit(MlpiSystemLimit limit)
native void setDateAndTimeUtcByNtp(long timeout, String server, int port)
native void clearBootLed()
native Language getLanguage()
short second
Seconds after minute.
long freeDiskspace
Free disk space of the partition in bytes.
native void resetTemperature()
native long getOperationHours()
native long getTargetId()
native String getVersionInfo(String component)
This enumeration provides different LED status resp. diagnosis pattern.
native void setSubnetMask(String subnetMask)
This enumeration must be used when accessing language settings in the device.
native String getMacAddress()
native void setName(String name)
This enumeration must be used when accessing the diagnostic details in the device.
short minute
Minutes after hour.
native long getNewestDiagnosisIndex()
native void resetCpuLoad()
native MemoryInfo getMemoryInfo()
native void setDiagnosis(DiagnosisCategory category, int number, String diagnosisText)
native String convertDiagnosisNumberToText(int diagnosisNumber)
native String getHardwareDetails()
int logicalAddress
Logical address of the device(e.g. axis, touchprobe,...) that dispatched the diagnosis.
This enumeration provides different limit defines.
This enumeration contains different diagnosis categories on the device.
long totalDiskspace
Total size of the partition in bytes.
native String getIpAddress()
native String getLicenseInformation()
This structure defines the broken date and time information.
This enumeration must be used when accessing the mode settings in the device.
native Diagnosis getDisplayedDiagnosis()
native String getSubnetMask()
long number
Identity number described in the help manual and used to identify the diagnosis.
native SpecialPathInfo getSpecialPathInfo(SpecialPath pathIdentifier)
DiagnosisState state
State of a diagnostic message.
short milliSecond
Milliseconds after second.
native void setDateAndTimeUtc(DateAndTime dateTime)
native float getCpuLoadMax()
native String getSpecialPath(SpecialPath pathIdentifier)
long index
Index of the diagnosis inside the diagnosis ring buffer.
DiagnosisDespatcher despatcher
Identifying source of diagnosis.
native String getSerialNumber()
This structure defines the special path information.
native void setBootLed(MlpiLedPattern pattern, int count)
short microSecond
Microseconds after milliseconds.
native void setGateway(String gateway)
short hour
Hours after midnight.
native SystemMode getCurrentMode()
short dayOfYear
Day of year.
int physicalAddress
Physical address of a physical device possibly connected to the logical object, e.g. drive of an axis.
native float getTemperatureMax()
native float getTemperature()
native DateAndTime getDateAndTimeUtc()
native long getOldestDiagnosisIndex()
native float getCpuLoad()
This enumeration contains different logical paths on the device.
This structure defines the broken date and time information.
short dayOfWeek
Day of week.
native Diagnosis[] getDiagnosisLog(long startIndex, long numToRead)
This enumeration must be used when accessing the diagnostic details in the device.
native void setLanguage(Language language)