Open Core Interface - MLPI
MLPI-MotionLogicProgrammingInterface(mlpi4LabVIEW)  1.26.2
mlpiWatchdogLib.h
Go to the documentation of this file.
1 #ifndef __MLPIWATCHDOGLIB_H__
2 #define __MLPIWATCHDOGLIB_H__
3 
4 // -----------------------------------------------------------------------
5 // MLPI - <mlpiWatchdogLib.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 
133 
139 
215 
220 
221 
222 
223 // -----------------------------------------------------------------------
224 // GLOBAL INCLUDES
225 // -----------------------------------------------------------------------
226 #include "mlpiGlobal.h"
227 
228 
229 // -----------------------------------------------------------------------
230 // GLOBAL CONSTANTS
231 // -----------------------------------------------------------------------
232 
235 typedef enum MlpiWatchdogAction
236 {
242 
243 
246 typedef enum MlpiWatchdogState
247 {
252 
253 // -----------------------------------------------------------------------
254 // GLOBAL TYPEDEFS
255 // -----------------------------------------------------------------------
256 
257 // message packing follows 8-byte natural alignment
258 #if !defined(TARGET_OS_VXWORKS)
259 #pragma pack(push,8)
260 #endif
261 
262 
263 #if !defined(TARGET_OS_VXWORKS)
264 #pragma pack(pop)
265 #endif
266 
268 
269 
270 
271 // -----------------------------------------------------------------------
272 // GLOBAL EXPORTS
273 // -----------------------------------------------------------------------
274 #ifdef MLPI_API
275  #undef MLPI_API
276 #endif
277 
278 #if defined(TARGET_OS_WINNT)
279  #if defined(MLPI_EXPORTS)
280  #define MLPI_API __declspec(dllexport)
281  #elif defined(MLPI_IMPORTS)
282  #define MLPI_API __declspec(dllimport)
283  #else
284  #define MLPI_API
285  #endif
286 #else
287  #if defined(MLPI_EXPORTS)
288  #define MLPI_API __attribute__ ((visibility("default")))
289  #elif defined(MLPI_IMPORTS)
290  #define MLPI_API
291  #else
292  #define MLPI_API
293  #endif
294 #endif
295 
296 
297 #ifdef __cplusplus
298 extern "C" {
299 #endif
300 
324 MLPI_API MLPIRESULT mlpiWatchdogSetup(const MLPIHANDLE connection, ULONG timeout, MlpiWatchdogAction action);
325 
326 
334 MLPI_API MLPIRESULT mlpiWatchdogStart(const MLPIHANDLE connection);
335 
336 
350 MLPI_API MLPIRESULT mlpiWatchdogStop(const MLPIHANDLE connection);
351 
352 
373 MLPI_API MLPIRESULT mlpiWatchdogReset(const MLPIHANDLE connection);
374 
375 
405 MLPI_API MLPIRESULT mlpiWatchdogGetState(const MLPIHANDLE connection, MlpiWatchdogState *state);
406 
407 
408 
409 #ifdef __cplusplus
410 }
411 #endif
412 
413 
414 
415 #endif // endof: #ifndef __MLPIWATCHDOGLIB_H__
MlpiWatchdogState
This enumeration must be used to define the action when a watchdog has expired.
Error with class F0 severity (warning, no action) will be generated.
long MLPIRESULT
common MLPI-API return value
Definition: mlpiGlobal.h:200
Watchdog has not started.
Watchdog has expired and was disabled.
MLPIRESULT mlpiWatchdogSetup(const MLPIHANDLE connection, ULONG timeout, MlpiWatchdogAction action)
This function initializes or changes the watchdog functionality.
Watchdog has started.
PLC will be stopped.
Error with class F5 severity (all axes go to error stop) will be generated.
MLPIRESULT mlpiWatchdogReset(const MLPIHANDLE connection)
This function resets the watchdog. Has to be called in an interval which is shorter than the timeout ...
MlpiWatchdogAction
This enumeration must be used to define the action when a watchdog has expired.
MLPIRESULT mlpiWatchdogGetState(const MLPIHANDLE connection, MlpiWatchdogState *state)
This function will return the current state of the watchdog. Once the watchdog fired, the function will return that state until it is reset using mlpiWatchdogReset.
unsigned long ULONG
4 byte unsigned integer
Definition: mlpiGlobal.h:168
MLPIRESULT mlpiWatchdogStart(const MLPIHANDLE connection)
This function starts the watchdog supervision.
unsigned long MLPIHANDLE
common MLPI-API handle value
Definition: mlpiGlobal.h:206
device will be rebooted.
MLPIRESULT mlpiWatchdogStop(const MLPIHANDLE connection)
This function stops the watchdog supervision.