nico@207: nico@207: nico@207: CanFestival: /home/epimerde/documents/tc11/CanFestival-3/src/lifegrd.c File Reference nico@207: nico@207: nico@207: nico@207: nico@207:
nico@207:
nico@207:
nico@207:
nico@207:

/home/epimerde/documents/tc11/CanFestival-3/src/lifegrd.c File Reference

#include <data.h>
nico@207: #include "lifegrd.h"
nico@207: #include "canfestival.h"
nico@207: nico@207:

nico@210: Include dependency graph for lifegrd.c:

nico@210: nico@210:

nico@207: Go to the source code of this file. nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207:

Functions

void ConsumerHearbeatAlarm (CO_Data *d, UNS32 id)
void ProducerHearbeatAlarm (CO_Data *d, UNS32 id)
UNS32 OnHearbeatProducerUpdate (CO_Data *d, const indextable *unsused_indextable, UNS8 unsused_bSubindex)
e_nodeState getNodeState (CO_Data *d, UNS8 nodeId)
void proceedNODE_GUARD (CO_Data *d, Message *m)
UNS32 OnHeartbeatProducerUpdate (CO_Data *d, const indextable *unsused_indextable, UNS8 unsused_bSubindex)
void heartbeatInit (CO_Data *d)
void heartbeatStop (CO_Data *d)
void _heartbeatError (UNS8 heartbeatID)
nico@210:


Detailed Description

nico@210:
Author:
Edouard TISSERANT
nico@210:
Date:
Mon Jun 4 17:19:24 2007
nico@210: nico@210:

nico@210: Definition in file lifegrd.c.


Function Documentation

nico@207: nico@207:
nico@207:
nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207:
void _heartbeatError (UNS8  heartbeatID  ) 
nico@207:
nico@207:
nico@207: nico@207:

nico@210:

Parameters:
nico@210: nico@210: nico@210:
heartbeatID 
nico@210:
nico@210: nico@210:

nico@210: Definition at line 252 of file lifegrd.c. nico@207:

nico@207:

nico@207: nico@207:

nico@207:
nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207:
void ConsumerHearbeatAlarm (CO_Data *  d,
UNS32  id 
)
nico@207:
nico@207:
nico@207: nico@207:

nico@210: The Consumer Timer Callback

nico@210:

Parameters:
nico@210: nico@210: nico@210: nico@210:
d 
id 
nico@210:
nico@210: nico@210:

nico@210: call heartbeat error with NodeId nico@210:

nico@210: Definition at line 67 of file lifegrd.c. nico@210:

nico@210: Referenced by heartbeatInit(), and proceedNODE_GUARD(). nico@207:

nico@207:

nico@207: nico@207:

nico@207:
nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207:
e_nodeState getNodeState (CO_Data *  d,
UNS8  nodeId 
)
nico@207:
nico@207:
nico@207: nico@207:

nico@210:

Parameters:
nico@210: nico@210: nico@210: nico@210:
d 
nodeId 
nico@210:
nico@210:
Returns:
nico@210: nico@210:

nico@210: Definition at line 55 of file lifegrd.c. nico@207:

nico@207:

nico@207: nico@207:

nico@207:
nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207:
void heartbeatInit (CO_Data *  d  ) 
nico@207:
nico@207:
nico@207: nico@207:

nico@210:

Parameters:
nico@210: nico@210: nico@210:
d 
nico@210:
nico@210: nico@210:

nico@210: Index to scan the table of heartbeat consumers

nico@210: MSG_WAR(0x3121, "should_time : ", should_time ) ; nico@210:

nico@210: Definition at line 206 of file lifegrd.c. nico@210:

nico@210: References ConsumerHearbeatAlarm(), OnHeartbeatProducerUpdate(), ProducerHearbeatAlarm(), RegisterSetODentryCallBack(), and SetAlarm(). nico@210:

nico@210: Referenced by OnHeartbeatProducerUpdate(), and switchCommunicationState(). nico@210:

nico@210: Here is the call graph for this function:

nico@210: nico@210: nico@210: nico@210: nico@210: nico@210: nico@210: nico@210: nico@210: nico@210: nico@210: nico@207:
nico@207:

nico@207: nico@207:

nico@207:
nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207:
void heartbeatStop (CO_Data *  d  ) 
nico@207:
nico@207:
nico@207: nico@207:

nico@210:

Parameters:
nico@210: nico@210: nico@210:
d 
nico@210:
nico@210: nico@210:

nico@210: Definition at line 236 of file lifegrd.c. nico@210:

nico@210: References DelAlarm(). nico@210:

nico@210: Referenced by OnHeartbeatProducerUpdate(), and switchCommunicationState(). nico@210:

nico@210: Here is the call graph for this function:

nico@210: nico@210: nico@210: nico@210: nico@207:
nico@207:

nico@207: nico@207:

nico@207:
nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207:
UNS32 OnHearbeatProducerUpdate (CO_Data *  d,
const indextable *  unsused_indextable,
UNS8  unsused_bSubindex 
)
nico@207:
nico@207:
nico@207: nico@207:

nico@207: nico@207:

nico@207:

nico@207: nico@207:

nico@207:
nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207:
UNS32 OnHeartbeatProducerUpdate (CO_Data *  d,
const indextable *  unsused_indextable,
UNS8  unsused_bSubindex 
)
nico@207:
nico@207:
nico@207: nico@207:

nico@210: This is called when Index 0x1017 is updated.

nico@210:

Parameters:
nico@210: nico@210: nico@210: nico@210: nico@210:
d 
unsused_indextable 
unsused_bSubindex 
nico@210:
nico@210:
Returns:
nico@210: nico@210:

nico@210: Definition at line 194 of file lifegrd.c. nico@210:

nico@210: References heartbeatInit(), and heartbeatStop(). nico@210:

nico@210: Referenced by heartbeatInit(). nico@210:

nico@210: Here is the call graph for this function:

nico@210: nico@210: nico@210: nico@210: nico@210: nico@210: nico@210: nico@210: nico@210: nico@210: nico@210: nico@207:
nico@207:

nico@207: nico@207:

nico@207:
nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207:
void proceedNODE_GUARD (CO_Data *  d,
Message *  m 
)
nico@207:
nico@207:
nico@207: nico@207:

nico@210:

Parameters:
nico@210: nico@210: nico@210: nico@210:
d 
m 
nico@210:
nico@210: nico@210:

nico@210: Notice that only the master can have sent this node guarding request

nico@210: Receiving a NMT NodeGuarding (request of the state by the master) Only answer to the NMT NodeGuarding request, the master is not checked (not implemented)

nico@210: send the nodeguard response.

nico@210: Not a request CAN

nico@210: the slave's state receievd is stored in the NMTable

nico@210: The state is stored on 7 bit

nico@210: Boot-Up frame reception

nico@210: The device send the boot-up message (Initialisation) to indicate the master that it is entered in pre_operational mode Because the device enter automaticaly in pre_operational mode, the pre_operational mode is stored NMTable[bus_id][nodeId] = Pre_operational nico@210:

nico@210: Definition at line 81 of file lifegrd.c. nico@210:

nico@210: References ConsumerHearbeatAlarm(), DelAlarm(), and SetAlarm(). nico@210:

nico@210: Referenced by canDispatch(). nico@210:

nico@210: Here is the call graph for this function:

nico@210: nico@210: nico@210: nico@210: nico@210: nico@210: nico@207:
nico@207:

nico@207: nico@207:

nico@207:
nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207: nico@207:
void ProducerHearbeatAlarm (CO_Data *  d,
UNS32  id 
)
nico@207:
nico@207:
nico@207: nico@207:

nico@210: The Consumer Timer Callback

nico@210:

Parameters:
nico@210: nico@210: nico@210: nico@210:
d 
id 
nico@210:
nico@210: nico@210:

nico@210: Time expired, the heartbeat must be sent immediately generate the correct node-id: this is done by the offset 1792 (decimal) and additionaly the node-id of this device.

nico@210: No toggle for heartbeat !

nico@210: send the heartbeat nico@210:

nico@210: Definition at line 161 of file lifegrd.c. nico@210:

nico@210: References DelAlarm(). nico@210:

nico@210: Referenced by heartbeatInit(). nico@210:

nico@210: Here is the call graph for this function:

nico@210: nico@210: nico@210: nico@210: nico@210:
nico@210:

nico@210:


Generated on Tue Jun 5 18:32:06 2007 for CanFestival by  nico@207: nico@207: doxygen 1.5.1
nico@207: nico@207: