Open Core Interface - MLPI
MLPI-MotionLogicProgrammingInterface(mlpi4Java)  1.26.2
MlpiGlobal.java
Go to the documentation of this file.
1 // -----------------------------------------------------------------------
2 // MLPI - <MlpiGlobal.java>
3 // -----------------------------------------------------------------------
4 // Copyright (c) 2012 Bosch Rexroth. All rights reserved.
5 // Redistribution and use in source and binary forms of this MLPI software
6 // (SW) provided to you, with or without modification, are permitted
7 // without prior approval provided that the following conditions are met:
8 //
9 // 1. Redistributions of source code of SW must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 //
12 // 2. Redistributions in binary form of SW must reproduce the above copyright
13 // notice, this list of conditions and the following disclaimer in the
14 // documentation and/or other materials provided with the distribution.
15 //
16 // 3. User recognizes and acknowledges that it acquires no right,
17 // title or interest in or to any of the names or trademarks used in
18 // connection with the SW ("names") by virtue of this License and waives
19 // any right to or interest in the names. User recognizes and acknowledges
20 // that names of companies or names or products of companies displayed
21 // in the documentation of SW to indicate the interoperability of products
22 // with the SW are the names of their respective owners. The use of such
23 // names in the documentation of SW does not imply any sponsorship,
24 // approval, or endorsement by such companies of this product.
25 //
26 // 4. Modified code versions, i.e. any addition to or deletion from
27 // the substance or structure of the original code of the SW running
28 // the MLPI must be plainly marked as such and must not be misrepresented
29 // as being original SW.
30 //
31 // 5. The SW may only be used in connection with a Bosch Rexroth product.
32 //
33 // THIS INFORMATION IS PROVIDED BY BOSCH REXROTH CORPORATION "AS IS"
34 // AND WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED, INCLUDING
35 // (BUT NOTLIMITED TO) ANY IMPLIED WARRANTIES OF MERCHANTABILITY,
36 // FITNESS FOR ANY PARTICULAR PURPOSE, OR NON-INFRINGEMENT. WHILE THE
37 // INFORMATION PROVIDED IS BELIEVED TO BE ACCURATE, IT MAY INCLUDE
38 // ERRORS OR INACCURACIES.
39 // SUBJECT TO COMPULSORY STATUTORY PROVISIONS OF THE GERMAN LAW AS
40 // THE APPLICABLE LAW FOR THIS LICENSE BOSCH REXROTH CORPORATION WILL
41 // NOT BE LIABLE FOR ANY DAMAGES OF ANY KIND ARISING FROM THE USE OF
42 // THE SOFTWARE DISTRIBUTED HEREUNDER, INCLUDING BUT NOT LIMITED TO
43 // DIRECT, INDIRECT, INCIDENTAL, PUNITIVE, AND CONSEQUENTIAL DAMAGES.
44 // -----------------------------------------------------------------------
45 //
55 //
56 // -----------------------------------------------------------------------
57 package com.boschrexroth.mlpi;
58 
59 
60 
65 public class MlpiGlobal {
66 
67 
104  public enum Type
105  {
107 
108  TYPE_CHAR ( 1),
109  TYPE_UCHAR ( 2),
110  TYPE_SHORT ( 3),
111  TYPE_USHORT ( 4),
112  TYPE_LONG ( 5),
113  TYPE_ULONG ( 6),
114  TYPE_LLONG ( 7),
115  TYPE_ULLONG ( 8),
116  TYPE_FLOAT ( 9),
117  TYPE_DOUBLE (10),
118 
129 
130  TYPE_BOOL8 (21),
132 
137 
138  private int _code;
139  int getCode() { return _code; }
140  Type(int code) { this._code = code; }
141  static Type valueOf(int code) {
142  for (Type value : values()) {
143  if (code == value.getCode()) return value;
144  }
145  return null;
146  }
147  }
148 
149  /*
150  * Structs
151  */
170  public static class DateAndTime
171  {
172  public short year;
173  public short month;
174  public short day;
175  public short hour;
176  public short minute;
177  public short second;
178  public short milliSecond;
179  public short microSecond;
180  public short dayOfWeek;
181  public short dayOfYear;
182  };
183 }
TYPE_DOUBLE_ARRAY
4 byte floating point array
Empty class definition which defines global structures/classes.
Definition: MlpiGlobal.java:65
TYPE_FLOAT_ARRAY
4 byte floating point array
TYPE_INVALID
invalid or not supported type
TYPE_ULONG_ARRAY
4 byte unsigned integer array
This enumeration defines the basic types of variables used by the MLPI.
TYPE_SHORT_ARRAY
2 byte signed integer array
TYPE_CHAR_UTF8
string with 1 byte per character
TYPE_ULONG
4 byte unsigned integer
TYPE_USHORT
2 byte unsigned integer
TYPE_LONG_ARRAY
4 byte signed integer array
TYPE_CHAR_UTF16
string with 2 bytes per character
TYPE_ULLONG_ARRAY
8 byte unsigned integer array
TYPE_CHAR_UTF8_ARRAY
string array with 1 byte per character
TYPE_LLONG_ARRAY
8 byte signed integer array
This class defines information about the date and time.
TYPE_ULLONG
8 byte unsigned integer
TYPE_CHAR_ARRAY
1 byte signed integer array
TYPE_USHORT_ARRAY
2 byte unsigned integer array
TYPE_CHAR_UTF16_ARRAY
string array with 2 bytes per character
TYPE_BOOL8_ARRAY
1 byte boolean array
TYPE_UCHAR_ARRAY
1 byte unsigned integer array
TYPE_UCHAR
1 byte unsigned integer