Slave.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 "Slave.h"
00024 #include "Master.h"
00025 #include "TestMasterSlave.h"
00026 
00027 /*****************************************************************************/
00028 void TestSlave_heartbeatError(UNS8 heartbeatID)
00029 {
00030         eprintf("TestSlave_heartbeatError %d\n", heartbeatID);
00031 }
00032 
00033 void TestSlave_initialisation()
00034 {
00035         eprintf("TestSlave_initialisation\n");
00036 }
00037 
00038 void TestSlave_preOperational()
00039 {
00040         eprintf("TestSlave_preOperational\n");
00041 }
00042 
00043 void TestSlave_operational()
00044 {
00045         eprintf("TestSlave_operational\n");
00046 }
00047 
00048 void TestSlave_stopped()
00049 {
00050         eprintf("TestSlave_stopped\n");
00051 }
00052 
00053 void TestSlave_post_sync()
00054 {
00055       eprintf("TestSlave_post_sync\n");
00056       
00057       SlaveMap1=1;
00058       SlaveMap2=1;
00059       SlaveMap3=0;
00060       SlaveMap4=0;
00061       SlaveMap5=1;
00062       SlaveMap6=0;
00063       SlaveMap7=1;
00064       SlaveMap8=0;
00065       SlaveMap9=16;
00066       SlaveMap10 = 0xff00ff00;
00067       SlaveMap11 = 0xabcd;
00068       eprintf("Slave: %d %d %d %d %d %d %d %d %d %x %x\n",SlaveMap1, SlaveMap2, SlaveMap3, SlaveMap4, SlaveMap5, SlaveMap6, SlaveMap7, SlaveMap8, SlaveMap9, SlaveMap10,SlaveMap11);
00069 }
00070 
00071 void TestSlave_post_TPDO()
00072 {
00073         eprintf("TestSlave_post_TPDO\n");
00074 }
00075 
00076 void TestSlave_storeODSubIndex(UNS16 wIndex, UNS8 bSubindex)
00077 {
00078         /*TODO : 
00079          * - call getODEntry for index and subindex, 
00080          * - save content to file, database, flash, nvram, ...
00081          * 
00082          * To ease flash organisation, index of variable to store
00083          * can be established by scanning d->objdict[d->ObjdictSize]
00084          * for variables to store.
00085          * 
00086          * */
00087         eprintf("TestSlave_storeODSubIndex : %4.4x %2.2x\n", wIndex,  bSubindex);
00088 }

Generated on Fri Jun 8 08:51:39 2007 for CanFestival by  doxygen 1.5.1