00001 /*************************************************************************** 00002 lifegrd.h - description 00003 ------------------- 00004 begin : Fri May 17 2002 00005 copyright : (C) 2002 by Raphael Zulliger 00006 email : zulli@hsr.ch 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This library is Copyright (c) Raphael Zulliger <zulli@gmx.net>. * 00012 * It is licensed under the GNU Library General Public License (LGPL). * 00013 * * 00014 ***************************************************************************/ 00015 00016 00024 #ifndef __lifegrd_h__ 00025 #define __lifegrd_h__ 00026 00027 #include <def.h> 00028 #include <objdict.h> 00029 #include <canop.h> 00030 00031 00035 extern BOOL bErrorOccured; 00036 00040 typedef struct td_s_heartbeat_entry 00041 { 00044 WORD id; 00048 WORD should_time; 00052 WORD time; 00053 } s_heartbeat_entry; 00054 00057 extern s_heartbeat_entry heartBeatTable[]; 00058 00059 00064 typedef struct td_s_ourHeartBeatValues 00065 { 00068 WORD ourShouldTime; 00071 WORD ourTime; 00075 WORD ourLastTime; 00076 } s_ourHeartBeatValues; 00077 00080 extern s_ourHeartBeatValues ourHeartBeatValues; 00081 00082 00083 //*************************************************************************/ 00084 //Functions 00085 //*************************************************************************/ 00086 00092 void lifeguardInit(void); 00093 00100 void processLifeGuard(void); 00101 00113 void lifeguardCallback( BYTE bReason ); 00114 00121 void processReceivedNMTErrorControl( s_rx_buffer_message* canopenMessage ); 00122 00123 #endif //__lifegrd_h__