diff -r 2cb34a4ac65a -r 6b5a4c21e061 doc/doxygen/html/nmtMaster_8c-source.html --- a/doc/doxygen/html/nmtMaster_8c-source.html Tue Jun 05 17:34:33 2007 +0200 +++ b/doc/doxygen/html/nmtMaster_8c-source.html Tue Jun 05 18:43:21 2007 +0200 @@ -16,90 +16,74 @@
  • Globals
  • /home/epimerde/documents/tc11/CanFestival-3/src/nmtMaster.c

    Go to the documentation of this file.
    00001 /*
    -00002 This file is part of CanFestival, a library implementing CanOpen Stack. 
    -00003 
    -00004 Copyright (C): Edouard TISSERANT and Francis DUPIN
    -00005 
    -00006 See COPYING file for copyrights details.
    -00007 
    -00008 This library is free software; you can redistribute it and/or
    -00009 modify it under the terms of the GNU Lesser General Public
    -00010 License as published by the Free Software Foundation; either
    -00011 version 2.1 of the License, or (at your option) any later version.
    -00012 
    -00013 This library is distributed in the hope that it will be useful,
    -00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
    -00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    -00016 Lesser General Public License for more details.
    -00017 
    -00018 You should have received a copy of the GNU Lesser General Public
    -00019 License along with this library; if not, write to the Free Software
    -00020 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    -00021 */
    -00022 
    -00023 #include "nmtMaster.h"
    -00024 #include "canfestival.h"
    -00025 
    -00026 /******************************************************************************/
    -00027 UNS8 masterSendNMTstateChange(CO_Data* d, UNS8 Node_ID, UNS8 cs)
    -00028 {
    -00029   Message m;
    -00030 
    -00031   MSG_WAR(0x3501, "Send_NMT cs : ", cs);
    -00032   MSG_WAR(0x3502, "    to node : ", Node_ID);
    -00033   /* message configuration */
    -00034   m.cob_id.w = 0x0000; /*(NMT) << 7*/
    -00035   m.rtr = NOT_A_REQUEST;
    -00036   m.len = 2;
    -00037   m.data[0] = cs;
    -00038   m.data[1] = Node_ID;
    -00039   
    -00040   return canSend(d->canHandle,&m);
    -00041 }
    -00042 
    -00043 
    -00044 /****************************************************************************/
    -00045 UNS8 masterSendNMTnodeguard(CO_Data* d, UNS8 nodeId)
    +00002   This file is part of CanFestival, a library implementing CanOpen
    +00003   Stack.
    +00004 
    +00005   Copyright (C): Edouard TISSERANT and Francis DUPIN
    +00006 
    +00007   See COPYING file for copyrights details.
    +00008 
    +00009   This library is free software; you can redistribute it and/or
    +00010   modify it under the terms of the GNU Lesser General Public
    +00011   License as published by the Free Software Foundation; either
    +00012   version 2.1 of the License, or (at your option) any later version.
    +00013 
    +00014   This library is distributed in the hope that it will be useful,
    +00015   but WITHOUT ANY WARRANTY; without even the implied warranty of
    +00016   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    +00017   Lesser General Public License for more details.
    +00018 
    +00019   You should have received a copy of the GNU Lesser General Public
    +00020   License along with this library; if not, write to the Free Software
    +00021   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
    +00022   USA
    +00023 */
    +00033 #include "nmtMaster.h"
    +00034 #include "canfestival.h"
    +00035 
    +00045 UNS8 masterSendNMTstateChange(CO_Data* d, UNS8 Node_ID, UNS8 cs)
     00046 {
     00047   Message m;
    -00048   
    -00049   MSG_WAR(0x3503, "Send_NODE_GUARD to node : ", nodeId);
    -00050         
    -00051   /* message configuration */
    -00052   m.cob_id.w = nodeId | (NODE_GUARD << 7);
    -00053   m.rtr = REQUEST;
    -00054   m.len = 1;
    -00055   
    -00056   return canSend(d->canHandle,&m);
    -00057 }
    -00058 
    -00059 /******************************************************************************/
    -00060 void masterRequestNodeState(CO_Data* d, UNS8 nodeId)
    -00061 {
    -00062   /* FIXME: should warn for bad toggle bit. */
    -00063 
    -00064   /* NMTable configuration to indicate that the master is waiting
    -00065    * for a Node_Guard frame from the slave whose node_id is ID */
    -00066   d->NMTable[nodeId] = Unknown_state; /* A state that does not exist */
    -00067 
    -00068   if (nodeId == 0) { /* NMT broadcast */
    -00069     UNS8 i = 0;
    -00070     for (i = 0 ; i < NMT_MAX_NODE_ID ; i++) {
    -00071       d->NMTable[i] = Unknown_state;
    -00072     }
    -00073   }
    -00074   masterSendNMTnodeguard(d,nodeId);
    -00075 }
    -00076 
    -00077 
    -00078 
    -00079 
    +00048 
    +00049   MSG_WAR(0x3501, "Send_NMT cs : ", cs);
    +00050   MSG_WAR(0x3502, "    to node : ", Node_ID);
    +00052   m.cob_id.w = 0x0000; /*(NMT) << 7*/
    +00053   m.rtr = NOT_A_REQUEST;
    +00054   m.len = 2;
    +00055   m.data[0] = cs;
    +00056   m.data[1] = Node_ID;
    +00057 
    +00058   return canSend(d->canHandle,&m);
    +00059 }
    +00060 
    +00061 
    +00070 UNS8 masterSendNMTnodeguard(CO_Data* d, UNS8 nodeId)
    +00071 {
    +00072   Message m;
    +00073 
    +00074   MSG_WAR(0x3503, "Send_NODE_GUARD to node : ", nodeId);
    +00075 
    +00076   /* message configuration */
    +00077   m.cob_id.w = nodeId | (NODE_GUARD << 7);
    +00078   m.rtr = REQUEST;
    +00079   m.len = 1;
     00080 
    -00081 
    -00082 
    +00081   return canSend(d->canHandle,&m);
    +00082 }
     00083 
    -00084 
    -

    Generated on Mon Jun 4 17:09:26 2007 for CanFestival by  +00090 void masterRequestNodeState(CO_Data* d, UNS8 nodeId) +00091 { +00097 d->NMTable[nodeId] = Unknown_state; +00100 if (nodeId == 0) { +00101 UNS8 i = 0; +00102 for (i = 0 ; i < NMT_MAX_NODE_ID ; i++) { +00103 d->NMTable[i] = Unknown_state; +00104 } +00105 } +00106 masterSendNMTnodeguard(d,nodeId); +00107 } +00108 +
    Generated on Tue Jun 5 18:32:05 2007 for CanFestival by  doxygen 1.5.1