Open Core Interface - MLPI
MLPI-MotionLogicProgrammingInterface(mlpiCore)  1.26.2
mlpiGlobal.h
Go to the documentation of this file.
1 #ifndef __MLPIGLOBAL_H__
2 #define __MLPIGLOBAL_H__
3 
4 // -----------------------------------------------------------------------
5 // MLPI - <mlpiGlobal.h>
6 // -----------------------------------------------------------------------
7 // Copyright (c) 2013 Bosch Rexroth. All rights reserved.
8 // Redistribution and use in source and binary forms of this MLPI software
9 // (SW) provided to you, with or without modification, are permitted
10 // without prior approval provided that the following conditions are met:
11 //
12 // 1. Redistributions of source code of SW must retain the above copyright
13 // notice, this list of conditions and the following disclaimer.
14 //
15 // 2. Redistributions in binary form of SW must reproduce the above copyright
16 // notice, this list of conditions and the following disclaimer in the
17 // documentation and/or other materials provided with the distribution.
18 //
19 // 3. User recognizes and acknowledges that it acquires no right,
20 // title or interest in or to any of the names or trademarks used in
21 // connection with the SW ("names") by virtue of this License and waives
22 // any right to or interest in the names. User recognizes and acknowledges
23 // that names of companies or names or products of companies displayed
24 // in the documentation of SW to indicate the interoperability of products
25 // with the SW are the names of their respective owners. The use of such
26 // names in the documentation of SW does not imply any sponsorship,
27 // approval, or endorsement by such companies of this product.
28 //
29 // 4. Modified code versions, i.e. any addition to or deletion from
30 // the substance or structure of the original code of the SW running
31 // the MLPI must be plainly marked as such and must not be misrepresented
32 // as being original SW.
33 //
34 // 5. The SW may only be used in connection with a Bosch Rexroth product.
35 //
36 // THIS INFORMATION IS PROVIDED BY BOSCH REXROTH CORPORATION "AS IS"
37 // AND WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED, INCLUDING
38 // (BUT NOTLIMITED TO) ANY IMPLIED WARRANTIES OF MERCHANTABILITY,
39 // FITNESS FOR ANY PARTICULAR PURPOSE, OR NON-INFRINGEMENT. WHILE THE
40 // INFORMATION PROVIDED IS BELIEVED TO BE ACCURATE, IT MAY INCLUDE
41 // ERRORS OR INACCURACIES.
42 // SUBJECT TO COMPULSORY STATUTORY PROVISIONS OF THE GERMAN LAW AS
43 // THE APPLICABLE LAW FOR THIS LICENSE BOSCH REXROTH CORPORATION WILL
44 // NOT BE LIABLE FOR ANY DAMAGES OF ANY KIND ARISING FROM THE USE OF
45 // THE SOFTWARE DISTRIBUTED HEREUNDER, INCLUDING BUT NOT LIMITED TO
46 // DIRECT, INDIRECT, INCIDENTAL, PUNITIVE, AND CONSEQUENTIAL DAMAGES.
47 // -----------------------------------------------------------------------
48 //
58 //
59 // -----------------------------------------------------------------------
60 
61 
62 #ifndef __cplusplus
63  #error MLPI requires C++ compilation (use a .cpp suffix)
64 #endif
65 
66 #include "targetinfo.h"
67 
68 // Needed only when RTP is used.
69 // Because when RTP is used. The ACI includes the libBase type definition headers and they cause conflic with the
70 // VxWorks header semLib.h added in marshal.h
71 // The conflict hierarchy occurs as follows:
72 // mlpiApiLibClient.cpp -> mlpiApiLibId.h -> mlpiGlobalId.h -> marshal.h -> semLib.h -> vxWorks.h -> vxWorksCommon.h -> vxTypesOld.h (VOID defined here)
73 // mlpiApiLibClient.cpp -> mlpiApiLib.h -> mlpiGlobal.h -> globtype.h (VOID defined here)
74 #if defined(__RTP__)
75 #undef VOID
76 #endif
77 
78 // In case ACI is used, then the Atomic Double is used to avoid redefine conflicts
79 #if defined(__ACI_MLPI__) && defined(GLOBTYPE_USE_ATOMIC_DOUBLE)
80  #include "AtomicDouble.h"
81 #endif
82 
83 #if defined (TARGET_OS_LINUX) && (_SYS_SYSMACROS_H)
84  // There is a capital mistake within sysmacros.h by define 'major',
85  // which cause the error 'class 'MlpiVersion' does not have any field named 'gnu_dev_major''
86  // therefore we switched it off.
87  // Note: You have to add the 'major' define of sysmacros.h (below) again if needed.
88  // #define major(dev) gnu_dev_major(dev)
89  #undef major
90 #endif
91 
92 #if defined (TARGET_OS_LINUX) && (_SYS_SYSMACROS_H)
93  // There is a capital mistake within sysmacros.h by define 'minor',
94  // which cause the error 'class 'MlpiVersion' does not have any field named 'gnu_dev_minor''
95  // therefore we switched it off.
96  // Note: You have to add the 'minor' define of sysmacros.h (below) again if needed.
97  // #define minor(dev) gnu_dev_minor(dev)
98  #undef minor
99 #endif
100 
101 
102 //
103 // supported platforms
104 //
105 #if defined (TARGET_OS_VXWORKS_KERNEL)
106  // compiling under VxWorks environment
107 #elif defined (TARGET_OS_VXWORKS_RTP)
108  // compiling under WIN64 environment
109 #elif defined (TARGET_OS_WINNT64)
110  // compiling under WIN64 environment
111 #elif defined (TARGET_OS_WINNT32)
112  // compiling under WIN32 environment
113 #elif defined (TARGET_OS_WINCE32)
114  // compiling under WINCE environment
115 #elif defined (TARGET_OS_MAC)
116  // compiling under Mac OS environment
117 #elif defined (TARGET_OS_IOS)
118  // compiling under iOS environment
119 #elif defined (TARGET_OS_ANDROID)
120  // compiling under Android environment
121 #elif defined (TARGET_OS_LINUX)
122  // compiling under Linux environment
123 #else
124  #pragma warning "unknown operating system"
125 #endif
126 
127 //
128 // supported compilers
129 //
130 #if defined(TARGET_COMPILER_GCC)
131  // compiling with GNU GCC/G++ Compiler
132 #elif defined(TARGET_COMPILER_MSVC)
133  // compiling with Microsoft Visual Studio Compiler
134 #elif defined(TARGET_COMPILER_INTEL)
135  // compiling with Intel ICC/ICPC Compiler
136 #elif defined(TARGET_COMPILER_LLVM)
137  // compiling with Clang/LLVM Compiler
138 #else
139  // unknown compiler
140  #pragma warning "unknown compiler"
141 #endif
142 
143 //
144 // additional defines
145 //
146 // - MLPI_SERVER_LIB: to be used only in the server lib. do not set in the client application!
147 // - MLPI_CLIENT_LIB: to be used only in the client lib. do not set in the server application!
148 
149 
150 
151 // -----------------------------------------------------------------------
152 // GLOBAL TYPES
153 // -----------------------------------------------------------------------
154 
155 //
156 // MLPI basic data types
157 //
158 typedef signed char BOOL8;
159 typedef char CHAR;
160 typedef unsigned char UCHAR;
161 typedef short SHORT;
162 typedef unsigned short USHORT;
163 #if !defined (TARGET_COMPILER_MSVC) && !defined (TARGET_OS_VXWORKS)
164 typedef int LONG;
165 typedef unsigned int ULONG;
166 #else
167 typedef long LONG;
168 typedef unsigned long ULONG;
169 #endif
170 typedef long long LLONG;
171 typedef unsigned long long ULLONG;
172 typedef float FLOAT;
173 #if !defined(MLPI_SERVER_LIB)
174  #if defined(__ACI_MLPI__) && defined(GLOBTYPE_USE_ATOMIC_DOUBLE)
175  typedef AtomicDouble DOUBLE;
176  #else
177  typedef double DOUBLE;
178  #endif
179 #endif
180 #if defined(MLPI_SHORT_WCHAR16)
181 // This is the setting for all unix platforms, as they have buildin 4 byte wchar_t (__APPLE__, __ANDROID__, __linux__).
182 typedef unsigned short WCHAR16;
183 #else
184  #if (__cplusplus > 201103L)
185  // This is the alternative setting for all unix platforms with C++11 support (__APPLE__, __ANDROID__, __linux__).
186  typedef char16_t WCHAR16;
187  #else
188  // This is the alternative settings on unix platforms without C++11 support (__APPLE__, __ANDROID__, __linux__) and all
189  // other platforms (_WIN32, __VXWORKS__).
190  //
191  // Note: Unix platforms (__APPLE__, __ANDROID__, __linux__) has to be used with compiler option '-fshort-wchar' to make
192  // wchar 2 byte wide.
193  typedef wchar_t WCHAR16;
194  #endif
195 #endif
196 
197 #if !defined (TARGET_COMPILER_MSVC) && !defined (TARGET_OS_VXWORKS)
198 typedef int MLPIRESULT;
199 #else
200 typedef long MLPIRESULT;
201 #endif
202 
203 #if defined (TARGET_BITNESS_64BIT)
204 typedef unsigned long long MLPIHANDLE;
205 #else
206 typedef unsigned long MLPIHANDLE;
207 #endif
208 
209 typedef unsigned long long MLPITASKHANDLE;
210 
211 typedef unsigned long PROCESSHANDLE;
212 
213 
214 
217 typedef enum MlpiType
218 {
220 
231 
242 
245 
250 }MlpiType;
251 
254 typedef enum MlpiProcessState
255 {
262 
263 // -----------------------------------------------------------------------
264 // Alignment
265 // -----------------------------------------------------------------------
266 
267 #if defined(TARGET_COMPILER_GCC)
268  // compiling with GNU GCC/G++ Compiler
269  #define MLPI_DATA_ALIGN(x) __attribute__ ((aligned(x)))
270 #elif defined(TARGET_COMPILER_MSVC)
271  // compiling with Microsoft Visual Studio Compiler
272  #define MLPI_DATA_ALIGN(x) __declspec(align(x))
273 #elif defined(TARGET_COMPILER_INTEL)
274  // compiling with Intel ICC/ICPC Compiler
275  #define MLPI_DATA_ALIGN(x) __declspec(align(x))
276 #elif defined(TARGET_COMPILER_LLVM)
277  // compiling with Clang/LLVM Compiler
278  #define MLPI_DATA_ALIGN(x) __attribute__ ((aligned(x)))
279 #else
280  // unknown compiler
281  #pragma warning "unknown compiler"
282 #endif
283 
284 
285 // NOTE: Macros for alignment and packing of data structures within MLPI structs.
286 
287 #define MLPI_STRUCT_ALIGN_BOOL8 MLPI_DATA_ALIGN(1)
288 
289 #define MLPI_STRUCT_ALIGN_CHAR MLPI_DATA_ALIGN(1)
290 #define MLPI_STRUCT_ALIGN_SHORT MLPI_DATA_ALIGN(2)
291 #define MLPI_STRUCT_ALIGN_LONG MLPI_DATA_ALIGN(4)
292 #define MLPI_STRUCT_ALIGN_LLONG MLPI_DATA_ALIGN(8)
293 
294 #define MLPI_STRUCT_ALIGN_UCHAR MLPI_DATA_ALIGN(1)
295 #define MLPI_STRUCT_ALIGN_USHORT MLPI_DATA_ALIGN(2)
296 #define MLPI_STRUCT_ALIGN_ULONG MLPI_DATA_ALIGN(4)
297 #define MLPI_STRUCT_ALIGN_ULLONG MLPI_DATA_ALIGN(8)
298 
299 #define MLPI_STRUCT_ALIGN_FLOAT MLPI_DATA_ALIGN(4)
300 #define MLPI_STRUCT_ALIGN_DOUBLE MLPI_DATA_ALIGN(8)
301 
302 #define MLPI_STRUCT_ALIGN_ENUM MLPI_DATA_ALIGN(4)
303 
304 #define MLPI_STRUCT_ALIGN_WCHAR16 MLPI_DATA_ALIGN(2)
305 
306 #define MLPI_STRUCT_ALIGN_STRUCT
307 
308 
309 // NOTE: Macros for alignment and packing of data structures regarding a PLC interface.
310 // It's recommended to use these MLPI IEC types for data types within structures
311 // which represent a interface of a external implemented IEC POU (see also
312 // mlpiLogicPouExtensionRegister etc.).
313 
314 typedef BOOL8 MLPI_DATA_ALIGN(1) MLPI_IEC_BOOL;
315 
316 typedef CHAR MLPI_DATA_ALIGN(1) MLPI_IEC_SINT;
317 typedef SHORT MLPI_DATA_ALIGN(2) MLPI_IEC_INT;
318 typedef LONG MLPI_DATA_ALIGN(4) MLPI_IEC_DINT;
319 typedef LLONG MLPI_DATA_ALIGN(8) MLPI_IEC_LINT;
320 
321 typedef UCHAR MLPI_DATA_ALIGN(1) MLPI_IEC_USINT;
322 typedef USHORT MLPI_DATA_ALIGN(2) MLPI_IEC_UINT;
323 typedef ULONG MLPI_DATA_ALIGN(4) MLPI_IEC_UDINT;
324 typedef ULLONG MLPI_DATA_ALIGN(8) MLPI_IEC_ULINT;
325 
326 typedef UCHAR MLPI_DATA_ALIGN(1) MLPI_IEC_BYTE;
327 typedef USHORT MLPI_DATA_ALIGN(2) MLPI_IEC_WORD;
328 typedef ULONG MLPI_DATA_ALIGN(4) MLPI_IEC_DWORD;
329 typedef ULLONG MLPI_DATA_ALIGN(8) MLPI_IEC_LWORD;
330 
331 typedef FLOAT MLPI_DATA_ALIGN(4) MLPI_IEC_REAL;
332 typedef DOUBLE MLPI_DATA_ALIGN(8) MLPI_IEC_LREAL;
333 
334 typedef ULONG MLPI_DATA_ALIGN(4) MLPI_IEC_TIME;
335 typedef ULONG MLPI_DATA_ALIGN(4) MLPI_IEC_DATE;
336 typedef ULONG MLPI_DATA_ALIGN(4) MLPI_IEC_DAT;
337 typedef ULONG MLPI_DATA_ALIGN(4) MLPI_IEC_TOD;
338 typedef SHORT MLPI_DATA_ALIGN(4) MLPI_IEC_ENUM;
339 
340 typedef CHAR MLPI_DATA_ALIGN(1) MLPI_IEC_STRING;
341 typedef SHORT MLPI_DATA_ALIGN(2) MLPI_IEC_WSTRING;
342 
343 
344 
345 // -----------------------------------------------------------------------
346 // GLOBAL CONSTANTS
347 // -----------------------------------------------------------------------
348 
349 #ifndef TRUE
350 #define TRUE ( 1 ) /* Boolean true */
351 #endif
352 
353 #ifndef FALSE
354 #define FALSE ( 0 ) /* Boolean false */
355 #endif
356 
357 //
358 // MLPI error codes
359 //
360 // NOTE: here are the most common basic return codes given by the API.
361 // It is not possible to list all codes here. See user documentation of the device for
362 // specific error codes.
363 #define MLPI_S_OK ((MLPIRESULT) 0x00360000L)
364 #define MLPI_E_FAIL ((MLPIRESULT) 0xF0360001L)
365 #define MLPI_E_NOTSUPPORTED ((MLPIRESULT) 0xF0360002L)
366 #define MLPI_E_INVALIDARG ((MLPIRESULT) 0xF0360003L)
367 #define MLPI_E_OUTOFMEMORY ((MLPIRESULT) 0xF0360004L)
368 #define MLPI_E_TIMEOUT ((MLPIRESULT) 0xF0360005L)
369 #define MLPI_E_SERVEREXCEPTION ((MLPIRESULT) 0xF0360006L)
370 #define MLPI_E_CONNECTFAILED ((MLPIRESULT) 0xF0360007L)
371 #define MLPI_E_CREATEERROR ((MLPIRESULT) 0xF0360008L)
372 #define MLPI_E_SYSTEMERROR ((MLPIRESULT) 0xF0360009L)
373 #define MLPI_E_BUFFERTOOSHORT ((MLPIRESULT) 0xF036000AL)
374 #define MLPI_E_INVALIDSIGNATURE ((MLPIRESULT) 0xF036000BL)
375 #define MLPI_E_STARTERROR ((MLPIRESULT) 0xF036000CL)
376 #define MLPI_E_WATCHDOGWARNING ((MLPIRESULT) 0xF036000DL)
377 #define MLPI_E_WATCHDOGERROR ((MLPIRESULT) 0xF536000EL)
378 #define MLPI_E_UNIMPLEMENTED ((MLPIRESULT) 0xF036000FL)
379 #define MLPI_E_LIMIT_MIN ((MLPIRESULT) 0xF0360010L)
380 #define MLPI_E_LIMIT_MAX ((MLPIRESULT) 0xF0360011L)
381 #define MLPI_E_VERSION ((MLPIRESULT) 0xF0360012L)
382 #define MLPI_E_DEPRECATED ((MLPIRESULT) 0xF0360013L)
383 #define MLPI_E_PERMISSION ((MLPIRESULT) 0xF0360014L)
384 #define MLPI_E_TYPE_MISSMATCH ((MLPIRESULT) 0xF0360015L)
385 #define MLPI_E_SIZE_MISSMATCH ((MLPIRESULT) 0xF0360016L)
386 #define MLPI_E_INVALID_HANDLE ((MLPIRESULT) 0xF0360017L)
387 #define MLPI_E_NOCONNECTION ((MLPIRESULT) 0xF0360018L)
388 #define MLPI_E_RD_WR_PROTECTION ((MLPIRESULT) 0xF0360019L)
389 #define MLPI_E_INVALID_FLOATINGPOINT ((MLPIRESULT) 0xF036001AL)
390 #define MLPI_E_NOTINITIALIZED ((MLPIRESULT) 0xF036001BL)
391 #define MLPI_E_STREAM_OUT_OF_SYNC ((MLPIRESULT) 0xF036001CL)
392 #define MLPI_E_INVALID_PRIVATEKEY_FILE ((MLPIRESULT) 0xF036001DL)
393 #define MLPI_E_INVALID_CERTIFICATE_FILE ((MLPIRESULT) 0xF036001EL)
394 #define MLPI_E_KEYPAIR_MISSMATCH ((MLPIRESULT) 0xF036001FL)
395 #define MLPI_E_TLS_HANDSHAKE_FAILED ((MLPIRESULT) 0xF0360020L)
396 #define MLPI_E_GENERAL_AC_ERROR ((MLPIRESULT) 0xF0360021L)
397 #define MLPI_E_POLICY_VIOLATION_AC ((MLPIRESULT) 0xF0360022L)
398 #define MLPI_E_USER_ALREADY_EXISTS ((MLPIRESULT) 0xF0360023L)
399 #define MLPI_E_GROUP_ALREADY_EXISTS ((MLPIRESULT) 0xF0360024L)
400 #define MLPI_E_MEMBERSHIP_ALREADY_EXISTS ((MLPIRESULT) 0xF0360025L)
401 #define MLPI_E_USER_NOT_EXISTING ((MLPIRESULT) 0xF0360026L)
402 #define MLPI_E_GROUP_NOT_EXISTING ((MLPIRESULT) 0xF0360027L)
403 #define MLPI_E_MEMBERSHIP_NOT_EXISTING ((MLPIRESULT) 0xF0360028L)
404 #define MLPI_E_PERMISSION_NOT_EXISTING ((MLPIRESULT) 0xF0360029L)
405 
406 #define MLPI_SUCCEEDED(hr) ((MLPIRESULT)(hr) >= 0)
407 #define MLPI_FAILED(hr) ((MLPIRESULT)(hr) < 0)
408 
409 
410 //
411 // Common constants
412 //
413 #if defined (TARGET_BITNESS_64BIT)
414 #define MLPI_INVALIDHANDLE ((MLPIHANDLE) 0xFFFFFFFFFFFFFFFF)
415 #else
416 #define MLPI_INVALIDHANDLE ((MLPIHANDLE) 0xFFFFFFFF)
417 #endif
418 
419 
420 
421 // -----------------------------------------------------------------------
422 // GLOBAL TYPEDEFS
423 // -----------------------------------------------------------------------
424 
425 // message packing follows 8 byte natural alignment
426 #if !defined(TARGET_OS_VXWORKS)
427  #pragma pack(push,8)
428 #endif
429 
446 typedef struct MlpiDateAndTime
447 {
448  SHORT year;
449  SHORT month;
450  SHORT day;
451  SHORT hour;
452  SHORT minute;
453  SHORT second;
454  SHORT milliSecond;
455  SHORT microSecond;
456  SHORT dayOfWeek;
457  SHORT dayOfYear;
459 
460 
488 typedef struct MlpiVersion
489 {
490 public:
491  MlpiVersion()
492  :major(0)
493  ,minor(0)
494  ,bugfix(0)
495  ,patch(0)
496  ,build(0){}
497 
498  MlpiVersion(ULONG major, ULONG minor, ULONG bugfix, ULONG patch, ULONG build)
499  :major(major)
500  ,minor(minor)
501  ,bugfix(bugfix)
502  ,patch(patch)
503  ,build(build){}
504 
505  MlpiVersion(ULONG major, ULONG minor, ULONG bugfix, ULONG patch)
506  :major(major)
507  ,minor(minor)
508  ,bugfix(bugfix)
509  ,patch(patch)
510  ,build(0){}
511 
512  ULONG major;
513  ULONG minor;
514  ULONG bugfix;
515  ULONG patch;
516  ULONG build;
517 } MlpiVersion;
518 
519 
520 #if !defined(TARGET_OS_VXWORKS)
521  #pragma pack(pop)
522 #endif
523 
524 
525 
526 // -----------------------------------------------------------------------
527 // GLOBAL MACROS
528 // -----------------------------------------------------------------------
529 
530 // unfortunately missing on some platforms
531 #ifndef _countof
532  #define _countof(x) (sizeof(x)/sizeof(x[0]))
533 #endif
534 
535 // convert a given literal to WCHAR16 format
536 #define MLPI_ADAPT_STRING_WCHAR16_(x) L ## x
537 #define MLPI_ADAPT_STRING_WCHAR16(x) MLPI_ADAPT_STRING_WCHAR16_(x) // convert normal string always to WCHAR16 literal
538 #ifndef MLPI_SERVER_LIB
539  #define MLPI_ADAPT_STRING(x) MLPI_ADAPT_STRING_WCHAR16_(x) // convert normal string to WCHAR16 literal on client side
540 #else
541  #define MLPI_ADAPT_STRING(x) x // convert normal string NOT to WCHAR16 literal on server side
542 #endif
543 
544 
545 
546 // -----------------------------------------------------------------------
547 // GLOBAL FUNCTIONS
548 // -----------------------------------------------------------------------
549 
550 // Use to check whether FLOAT or DOUBLE 'data' contains a valid floating point number
551 class MlpiTestFpu
552 {
553 public:
554  MlpiTestFpu(const FLOAT *in) {
555  test(in);
556  }
557  MlpiTestFpu(const DOUBLE *in) {
558  test(in);
559  }
560  template <typename T> MlpiTestFpu(const FLOAT *in, T numElements)
561  : out(TRUE)
562  {
563  for(T i=0; (i<numElements) && (out==TRUE); i++) {
564  test(in+i);
565  }
566  }
567  template <typename T> MlpiTestFpu(const DOUBLE *in, T numElements)
568  : out(TRUE)
569  {
570  for(T i=0; (i<numElements) && (out==TRUE); i++) {
571  test(in+i);
572  }
573  }
574  inline BOOL8 isValid(void) {return out;}
575 
576 private:
577  inline void test(const FLOAT *in)
578  {
579  ULONG ul = *reinterpret_cast<const ULONG*>(in);
580  out = ((ul&0x7fffffff)==0) ? TRUE : ( ((ul&0x7f800000)==0) ? FALSE : ( ((ul&0x7f800000)==0x7f800000) ? FALSE : TRUE ) );
581  }
582  inline void test(const DOUBLE *in)
583  {
584  ULLONG ull = *reinterpret_cast<const ULLONG*>(in);
585  out = ((ull&0x7fffffffffffffffLL)==0) ? TRUE : ( ((ull&0x7ff0000000000000LL)==0) ? FALSE : ( ((ull&0x7ff0000000000000LL)==0x7ff0000000000000LL) ? FALSE : TRUE ) );
586  }
587  BOOL8 out;
588 };
589 
590 // Use to check whether FLOAT 'data' contains a valid floating point number
591 inline BOOL8 MLPI_TEST_IS_FLOAT(const FLOAT data) { return(MlpiTestFpu(&data).isValid()); }
592 
593 // Use to check whether DOUBLE 'data' contains a valid floating point number
594 inline BOOL8 MLPI_TEST_IS_DOUBLE(const DOUBLE data) { return(MlpiTestFpu(&data).isValid()); }
595 
596 // Use to check whether FLOAT array 'data' contains a valid array of floating point numbers with 'numElements' number of elements
597 template <typename T> inline BOOL8 MLPI_TEST_IS_FLOAT_ARRAY(const FLOAT *data, T numElements) { return(MlpiTestFpu(data, numElements).isValid()); }
598 
599 // Use to check whether DOUBLE array 'data' contains a valid array of floating point numbers with 'numElements' number of elements
600 template <typename T> inline BOOL8 MLPI_TEST_IS_DOUBLE_ARRAY(const DOUBLE *data, T numElements) { return(MlpiTestFpu(data, numElements).isValid()); }
601 
602 
603 #endif // endof: #ifndef __MLPIGLOBAL_H__
604 
605 
8 byte signed integer
Definition: mlpiGlobal.h:227
Initialization of process.
Definition: mlpiGlobal.h:257
string array with 1 byte per character
Definition: mlpiGlobal.h:248
unsigned char UCHAR
1 byte unsigned integer
Definition: mlpiGlobal.h:160
string with 2 bytes per character
Definition: mlpiGlobal.h:247
invalid or not supported type
Definition: mlpiGlobal.h:219
struct MlpiVersion MlpiVersion
Describes the API version information. The build number counts continuously within a major release...
4 byte signed integer array
Definition: mlpiGlobal.h:236
unsigned long long ULLONG
8 byte unsigned integer
Definition: mlpiGlobal.h:171
int LONG
4 byte signed integer
Definition: mlpiGlobal.h:164
2 byte signed integer
Definition: mlpiGlobal.h:223
char CHAR
1 byte signed integer
Definition: mlpiGlobal.h:159
signed char BOOL8
1 byte boolean
Definition: mlpiGlobal.h:158
unsigned short USHORT
2 byte unsigned integer
Definition: mlpiGlobal.h:162
4 byte floating point
Definition: mlpiGlobal.h:229
MlpiProcessState
This enumeration defines the state of a process.
Definition: mlpiGlobal.h:254
unsigned long PROCESSHANDLE
MLPI handle value used for a process.
Definition: mlpiGlobal.h:211
2 byte unsigned integer array
Definition: mlpiGlobal.h:235
1 byte boolean array
Definition: mlpiGlobal.h:244
Process not started.
Definition: mlpiGlobal.h:256
1 byte boolean
Definition: mlpiGlobal.h:243
1 byte signed integer array
Definition: mlpiGlobal.h:232
short SHORT
2 byte signed integer
Definition: mlpiGlobal.h:161
8 byte unsigned integer
Definition: mlpiGlobal.h:228
string with 1 byte per character
Definition: mlpiGlobal.h:246
wchar_t WCHAR16
UTF16 string.
Definition: mlpiGlobal.h:193
unsigned int ULONG
4 byte unsigned integer
Definition: mlpiGlobal.h:165
unsigned long long MLPITASKHANDLE
MLPI-API handle value used for tasks.
Definition: mlpiGlobal.h:209
8 byte signed integer array
Definition: mlpiGlobal.h:238
4 byte floating point array
Definition: mlpiGlobal.h:240
8 byte floating point array
Definition: mlpiGlobal.h:241
1 byte unsigned integer
Definition: mlpiGlobal.h:222
Process is in work.
Definition: mlpiGlobal.h:258
struct MlpiDateAndTime MlpiDateAndTime
This structure defines the broken date and time information.
Process has finished.
Definition: mlpiGlobal.h:259
4 byte unsigned integer array
Definition: mlpiGlobal.h:237
8 byte floating point
Definition: mlpiGlobal.h:230
1 byte signed integer
Definition: mlpiGlobal.h:221
MlpiType
This enumeration defines the basic types of as used by the MLPI.
Definition: mlpiGlobal.h:217
2 byte unsigned integer
Definition: mlpiGlobal.h:224
2 byte signed integer array
Definition: mlpiGlobal.h:234
4 byte unsigned integer
Definition: mlpiGlobal.h:226
long long LLONG
8 byte signed integer
Definition: mlpiGlobal.h:170
float FLOAT
4 byte floating point
Definition: mlpiGlobal.h:172
double DOUBLE
8 byte floating point
Definition: mlpiGlobal.h:177
8 byte unsigned integer array
Definition: mlpiGlobal.h:239
unsigned long MLPIHANDLE
common MLPI-API handle value
Definition: mlpiGlobal.h:206
BOOL8 MLPI_DATA_ALIGN(1) MLPI_IEC_BOOL
1 byte boolean, aligned to IEC data type BOOL
Definition: mlpiGlobal.h:314
Process stopped due to internal errors.
Definition: mlpiGlobal.h:260
int MLPIRESULT
common MLPI-API return value
Definition: mlpiGlobal.h:198
string array with 2 bytes per character
Definition: mlpiGlobal.h:249
1 byte unsigned integer array
Definition: mlpiGlobal.h:233
4 byte signed integer
Definition: mlpiGlobal.h:225