#include <lifegrd.h>
#include <def.h>
#include <general.h>
#include <canop.h>
#include <init.h>
#include <nmt.h>
#include <objacces.h>
#include <basiccan.h>
#include <timer.h>
#include <app.h>
Functions | |
void | processReceivedNMTErrorControl (s_rx_buffer_message *canopenMessage) |
void | processLifeGuard (void) |
void | lifeguardInit (void) |
void | lifeguardCallback (BYTE bReason) |
Variables | |
s_heartbeat_entry | heartBeatTable [COUNT_OF_HEARTBEAT_CONSUMER] |
s_ourHeartBeatValues | ourHeartBeatValues |
BOOL | bErrorOccured |
|
This function is called by processLifeGuard( ) if one or more heartbeat message haven't arrived within the configured time. The argument is one of the following: CONNECTION_OK, CONNECTION_FAILED, GUARDING_MESSAGE_LOST, HEARTBEAT_MESSAGE_LOST, HEARTBEAT_CONSUMER_LOST defined in file def.h
|
|
initialisates all neccessary values for lifeguarding. Therefore this function reads index 1016 and 1017 of the object dictionary and fills in the data into the variable heartBeatTable and ourHeartBeatValues. Everytime the indicies 1016 or 1017 have changed, this function must be called |
|
Checks wheter all heartbeat messages (where this node is a heartbeat consumer) have arrived within the configured time (configuration in the object dictionary). if not all messages have arrived, lifeguardCallback is called, so the user can perform any error-handling. This function also sends the heartbeat messages of this node, if neccessary. |
|
This function is called by proccessRxCanMessages( ). it is responsible to process a canopen-message which seams to be an NMT Error Control Messages. At them moment we assume that every NMT error control message is a heartbeat message.
|
|
This variable indicates wheter the device is in the Notfall-state (this means that one of its heartbeatproducers hasn't send a heartbeat message. |
|
This variable holds all heartbeat related values for our hearbeat consumers. |
|
This variable holds the values about the heartbeat settings of this node |