Luis Silvio Cordova Rivadeneira
/
Can_open_masternode
Can_open_masternode
framework/include/nmtSlave.h@7:537bae5a6fc6, 2012-09-26 (annotated)
- Committer:
- sam_grove
- Date:
- Wed Sep 26 05:48:14 2012 +0000
- Revision:
- 7:537bae5a6fc6
- Parent:
- 0:9dd7c6129683
Pushing the project into the new repo
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sam_grove |
0:9dd7c6129683 | 1 | /* |
sam_grove |
0:9dd7c6129683 | 2 | This file is part of CanFestival, a library implementing CanOpen Stack. |
sam_grove |
0:9dd7c6129683 | 3 | |
sam_grove |
0:9dd7c6129683 | 4 | Copyright (C): Edouard TISSERANT and Francis DUPIN |
sam_grove |
0:9dd7c6129683 | 5 | |
sam_grove |
0:9dd7c6129683 | 6 | See COPYING file for copyrights details. |
sam_grove |
0:9dd7c6129683 | 7 | |
sam_grove |
0:9dd7c6129683 | 8 | This library is free software; you can redistribute it and/or |
sam_grove |
0:9dd7c6129683 | 9 | modify it under the terms of the GNU Lesser General Public |
sam_grove |
0:9dd7c6129683 | 10 | License as published by the Free Software Foundation; either |
sam_grove |
0:9dd7c6129683 | 11 | version 2.1 of the License, or (at your option) any later version. |
sam_grove |
0:9dd7c6129683 | 12 | |
sam_grove |
0:9dd7c6129683 | 13 | This library is distributed in the hope that it will be useful, |
sam_grove |
0:9dd7c6129683 | 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
sam_grove |
0:9dd7c6129683 | 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
sam_grove |
0:9dd7c6129683 | 16 | Lesser General Public License for more details. |
sam_grove |
0:9dd7c6129683 | 17 | |
sam_grove |
0:9dd7c6129683 | 18 | You should have received a copy of the GNU Lesser General Public |
sam_grove |
0:9dd7c6129683 | 19 | License along with this library; if not, write to the Free Software |
sam_grove |
0:9dd7c6129683 | 20 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
sam_grove |
0:9dd7c6129683 | 21 | */ |
sam_grove |
0:9dd7c6129683 | 22 | |
sam_grove |
0:9dd7c6129683 | 23 | /** @defgroup nmtslave NMT Slave |
sam_grove |
0:9dd7c6129683 | 24 | * @brief The NMT Slave methods are called automatically when a NMT message from Master are received. |
sam_grove |
0:9dd7c6129683 | 25 | * @ingroup networkmanagement |
sam_grove |
0:9dd7c6129683 | 26 | */ |
sam_grove |
0:9dd7c6129683 | 27 | |
sam_grove |
0:9dd7c6129683 | 28 | #ifndef __nmtSlave_h__ |
sam_grove |
0:9dd7c6129683 | 29 | #define __nmtSlave_h__ |
sam_grove |
0:9dd7c6129683 | 30 | |
sam_grove |
0:9dd7c6129683 | 31 | #include <applicfg.h> |
sam_grove |
0:9dd7c6129683 | 32 | #include "data.h" |
sam_grove |
0:9dd7c6129683 | 33 | |
sam_grove |
0:9dd7c6129683 | 34 | #ifdef __cplusplus |
sam_grove |
0:9dd7c6129683 | 35 | extern "C"{ |
sam_grove |
0:9dd7c6129683 | 36 | #endif |
sam_grove |
0:9dd7c6129683 | 37 | |
sam_grove |
0:9dd7c6129683 | 38 | /** |
sam_grove |
0:9dd7c6129683 | 39 | * @brief Threat the reception of a NMT message from the master. |
sam_grove |
0:9dd7c6129683 | 40 | * @param *d Pointer to the CAN data structure |
sam_grove |
0:9dd7c6129683 | 41 | * @param *m Pointer to the message received |
sam_grove |
0:9dd7c6129683 | 42 | * @return |
sam_grove |
0:9dd7c6129683 | 43 | * - 0 if OK |
sam_grove |
0:9dd7c6129683 | 44 | * - -1 if the slave is not allowed, by its state, to receive the message |
sam_grove |
0:9dd7c6129683 | 45 | */ |
sam_grove |
0:9dd7c6129683 | 46 | void proceedNMTstateChange (CO_Data* d, Message * m); |
sam_grove |
0:9dd7c6129683 | 47 | |
sam_grove |
0:9dd7c6129683 | 48 | /** |
sam_grove |
0:9dd7c6129683 | 49 | * @brief Transmit the boot-Up frame when the slave is moving from initialization |
sam_grove |
0:9dd7c6129683 | 50 | * state to pre_operational state. |
sam_grove |
0:9dd7c6129683 | 51 | * @param *d Pointer on the CAN data structure |
sam_grove |
0:9dd7c6129683 | 52 | * @return canSend(bus_id,&m) |
sam_grove |
0:9dd7c6129683 | 53 | */ |
sam_grove |
0:9dd7c6129683 | 54 | UNS8 slaveSendBootUp (CO_Data* d); |
sam_grove |
0:9dd7c6129683 | 55 | |
sam_grove |
0:9dd7c6129683 | 56 | #ifdef __cplusplus |
sam_grove |
0:9dd7c6129683 | 57 | } |
sam_grove |
0:9dd7c6129683 | 58 | #endif |
sam_grove |
0:9dd7c6129683 | 59 | |
sam_grove |
0:9dd7c6129683 | 60 | #endif /* __nmtSlave_h__ */ |