nico@207: nico@207:
nico@207:#include <applicfg.h>
#include "data.h"
nico@207: Go to the source code of this file.
Typedefs | |
typedef void(*) | heartbeatError_t (UNS8) |
Functions | |
void | _heartbeatError (UNS8 heartbeatID) |
e_nodeState | getNodeState (CO_Data *d, UNS8 nodeId) |
void | heartbeatInit (CO_Data *d) |
void | heartbeatStop (CO_Data *d) |
void | proceedNODE_GUARD (CO_Data *d, Message *m) |
typedef void(*) heartbeatError_t(UNS8) | nico@207:
nico@207:
void _heartbeatError | nico@207:( | nico@207:UNS8 | nico@207:heartbeatID | nico@207:) | nico@207:nico@207: |
e_nodeState getNodeState | nico@207:( | nico@207:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:nodeId | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@207: To read the state of a node This can be used by the master after having sent a life guard request, of by any node if it is waiting for heartbeat. nico@207:
nico@207: Definition at line 33 of file lifegrd.c. nico@207:
nico@207: References struct_s_timer_entry::d, and struct_CO_Data::NMTable. nico@207:
void heartbeatInit | nico@207:( | nico@207:CO_Data * | nico@207:d | nico@207:) | nico@207:nico@207: |
nico@207: Start heartbeat consumer and producer with respect to 0x1016 and 0x1017 object dictionary entries nico@207:
nico@207: Definition at line 147 of file lifegrd.c. nico@207:
nico@207: References ConsumerHearbeatAlarm(), struct_CO_Data::ConsumerHeartbeatCount, struct_CO_Data::ConsumerHeartbeatEntries, struct_CO_Data::ConsumerHeartBeatTimers, struct_s_timer_entry::d, MS_TO_TIMEVAL, OnHeartbeatProducerUpdate(), ProducerHearbeatAlarm(), struct_CO_Data::ProducerHeartBeatTime, struct_CO_Data::ProducerHeartBeatTimer, RegisterSetODentryCallBack(), SetAlarm(), TIMEVAL, struct_CO_Data::toggle, UNS16, UNS32, and UNS8. nico@207:
void heartbeatStop | nico@207:( | nico@207:CO_Data * | nico@207:d | nico@207:) | nico@207:nico@207: |
nico@207: Stop heartbeat consumer and producer nico@207:
nico@207: Definition at line 173 of file lifegrd.c. nico@207:
nico@207: References struct_CO_Data::ConsumerHeartbeatCount, struct_CO_Data::ConsumerHeartBeatTimers, struct_s_timer_entry::d, DelAlarm(), struct_CO_Data::ProducerHeartBeatTimer, and UNS8. nico@207:
void proceedNODE_GUARD | nico@207:( | nico@207:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | Message * | nico@207:m | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@207: This function 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.
Message | The CAN-message which has to be analysed. If a BootUp message is detected, it will return the nodeId of the Slave who booted up |
nico@207: Definition at line 50 of file lifegrd.c. nico@207:
nico@207: References struct_CO_Data::bDeviceNodeId, struct_CO_Data::canHandle, canSend(), Message::cob_id, ConsumerHearbeatAlarm(), struct_CO_Data::ConsumerHeartbeatCount, struct_CO_Data::ConsumerHeartbeatEntries, struct_CO_Data::ConsumerHeartBeatTimers, struct_s_timer_entry::d, Message::data, DelAlarm(), GET_NODE_ID, Initialisation, Message::len, MS_TO_TIMEVAL, MSG_WAR, struct_CO_Data::NMTable, struct_CO_Data::nodeState, Message::rtr, SetAlarm(), TIMEVAL, struct_CO_Data::toggle, Unknown_state, UNS32, UNS8, and SHORT_CAN::w. nico@207:
nico@207: