include/lifegrd.h
author lbessard
Thu, 27 Sep 2007 08:59:22 +0200
changeset 286 85d5361179f3
parent 149 fe50ada8020b
child 343 118c1cabd0b0
permissions -rw-r--r--
Adding support for restricting user to only dynamically set 0 to index 0x1003 subindex 0x00 in gen_cfile.py
0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     1
/*
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     2
This file is part of CanFestival, a library implementing CanOpen Stack. 
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     3
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     4
Copyright (C): Edouard TISSERANT and Francis DUPIN
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     5
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     6
See COPYING file for copyrights details.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     7
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     8
This library is free software; you can redistribute it and/or
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     9
modify it under the terms of the GNU Lesser General Public
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    10
License as published by the Free Software Foundation; either
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    11
version 2.1 of the License, or (at your option) any later version.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    12
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    13
This library is distributed in the hope that it will be useful,
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    14
but WITHOUT ANY WARRANTY; without even the implied warranty of
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    16
Lesser General Public License for more details.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    17
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    18
You should have received a copy of the GNU Lesser General Public
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    19
License along with this library; if not, write to the Free Software
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    20
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    21
*/
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    22
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    23
#ifndef __lifegrd_h__
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    24
#define __lifegrd_h__
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    25
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    26
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    27
#include <applicfg.h>
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    28
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    29
typedef void (*heartbeatError_t)(UNS8);
149
fe50ada8020b Changes in the API:
etisserant
parents: 74
diff changeset
    30
void _heartbeatError(UNS8 heartbeatID);
0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    31
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    32
#include "data.h"
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    33
71
95cd3376cc9f compilator compatitibility
frdupin
parents: 0
diff changeset
    34
/*************************************************************************
95cd3376cc9f compilator compatitibility
frdupin
parents: 0
diff changeset
    35
 * Functions
74
c0b4b2ef7579 compiler compatibility : comments
frdupin
parents: 71
diff changeset
    36
 *************************************************************************/
0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    37
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    38
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    39
/** To read the state of a node
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    40
 *  This can be used by the master after having sent a life guard request,
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    41
 *  of by any node if it is waiting for heartbeat.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    42
 */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    43
e_nodeState getNodeState (CO_Data* d, UNS8 nodeId);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    44
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    45
/** Start heartbeat consumer and producer
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    46
 *  with respect to 0x1016 and 0x1017
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    47
 *  object dictionary entries
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    48
 */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    49
void heartbeatInit(CO_Data* d);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    50
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    51
/** Stop heartbeat consumer and producer
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    52
 */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    53
void heartbeatStop(CO_Data* d);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    54
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    55
/** This function is responsible to process a canopen-message which seams to be an NMT Error Control
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    56
 *  Messages. At them moment we assume that every NMT error control message
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    57
 *  is a heartbeat message.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    58
 *  \param Message The CAN-message which has to be analysed.
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    59
 *  If a BootUp message is detected, it will return the nodeId of the Slave who booted up
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    60
 */
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    61
void proceedNODE_GUARD (CO_Data* d, Message* m);
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    62
71
95cd3376cc9f compilator compatitibility
frdupin
parents: 0
diff changeset
    63
#endif /*__lifegrd_h__ */