]> rtime.felk.cvut.cz Git - CanFestival-3.git/blob - examples/TestMasterSlaveLSS/SlaveA.c
FastScan review
[CanFestival-3.git] / examples / TestMasterSlaveLSS / SlaveA.c
1 /*
2 This file is part of CanFestival, a library implementing CanOpen Stack. 
3
4 Copyright (C): Edouard TISSERANT and Francis DUPIN
5
6 See COPYING file for copyrights details.
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21 */
22
23 #include "SlaveA.h"
24 #include "Master.h"
25 #include "TestMasterSlaveLSS.h"
26
27 /*****************************************************************************/
28 void TestSlaveA_heartbeatError(CO_Data* d, UNS8 heartbeatID)
29 {
30         eprintf("TestSlaveA_heartbeatError %d\n", heartbeatID);
31 }
32
33 void TestSlaveA_initialisation(CO_Data* d)
34 {
35         eprintf("TestSlaveA_initialisation\n");
36 }
37
38 void TestSlaveA_preOperational(CO_Data* d)
39 {
40         eprintf("TestSlaveA_preOperational\n");
41 }
42
43 void TestSlaveA_operational(CO_Data* d)
44 {
45         eprintf("TestSlaveA_operational\n");
46 }
47
48 void TestSlaveA_stopped(CO_Data* d)
49 {
50         eprintf("TestSlaveA_stopped\n");
51 }
52
53 void TestSlaveA_post_sync(CO_Data* d)
54 {
55       eprintf("TestSlaveA_post_sync\n");
56 }
57
58 void TestSlaveA_post_TPDO(CO_Data* d)
59 {
60         eprintf("TestSlaveA_post_TPDO\n");
61         SlaveAMap1++;
62         SlaveAMap2+=2;
63 }
64
65 void TestSlaveA_storeODSubIndex(CO_Data* d, UNS16 wIndex, UNS8 bSubindex)
66 {
67         /*TODO : 
68          * - call getODEntry for index and subindex, 
69          * - save content to file, database, flash, nvram, ...
70          * 
71          * To ease flash organisation, index of variable to store
72          * can be established by scanning d->objdict[d->ObjdictSize]
73          * for variables to store.
74          * 
75          * */
76         eprintf("TestSlaveA_storeODSubIndex : %4.4x %2.2x\n", wIndex,  bSubindex);
77 }
78
79 void TestSlaveA_post_emcy(CO_Data* d, UNS8 nodeID, UNS16 errCode, UNS8 errReg)
80 {
81         eprintf("SlaveA received EMCY message. Node: %2.2x  ErrorCode: %4.4x  ErrorRegister: %2.2x\n", nodeID, errCode, errReg);
82 }
83
84 void TestSlaveA_NMT_Slave_Communications_Reset_Callback(CO_Data* d)
85 {
86         eprintf("TestSlaveA_NMT_Slave_Communications_Reset_Callback\n");
87 }
88
89 void TestSlaveA_StoreConfiguration(CO_Data* d, UNS8 *error, UNS8 *spec_error)
90 {
91         eprintf("TestSlaveA_StoreConfiguration\n");
92 }
93