Changeset 1140
- Timestamp:
- 12/21/01 12:36:22 (23 years ago)
- Location:
- trunk/MagicSoft/Cosy
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/candrv/canopen.cc
r1138 r1140 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz , 2001 <mailto:tbretz@uni-sw.gwdg.de>18 ! Author(s): Thomas Bretz <mailto:tbretz@uni-sw.gwdg.de>, 2001 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 … … 78 78 // HandlePDO1/2/3/4:handles received PDOs 79 79 // 80 void CanOpen::HandleCanMessage(WORD_t cobid, BYTE_t *data, struct timeval*tv)80 void CanOpen::HandleCanMessage(WORD_t cobid, BYTE_t *data, timeval_t *tv) 81 81 { 82 82 const WORD_t fcode = cobid >> 7; -
trunk/MagicSoft/Cosy/candrv/network.cc
r1138 r1140 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz , 2001 <mailto:tbretz@uni-sw.gwdg.de>18 ! Author(s): Thomas Bretz <mailto:tbretz@uni-sw.gwdg.de>, 2001 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 … … 85 85 // HandleSDOError: Handles error occursion (see CanOpen standard) 86 86 // 87 void Network::HandleSDO(BYTE_t node, BYTE_t cmd, WORD_t idx, BYTE_t subidx, LWORD_t data, struct timeval*tv)87 void Network::HandleSDO(BYTE_t node, BYTE_t cmd, WORD_t idx, BYTE_t subidx, LWORD_t data, timeval_t *tv) 88 88 { 89 89 switch (cmd) … … 139 139 // Distributes PDO1 messages to the correspoding node calling HandlePDO1 140 140 // 141 void Network::HandlePDO1(BYTE_t node, BYTE_t *data, struct timeval*tv)141 void Network::HandlePDO1(BYTE_t node, BYTE_t *data, timeval_t *tv) 142 142 { 143 143 if (!fNodes[node]) … … 157 157 // Distributes PDO2 messages to the correspoding node calling HandlePDO2 158 158 // 159 void Network::HandlePDO2(BYTE_t node, BYTE_t *data, struct timeval*tv)159 void Network::HandlePDO2(BYTE_t node, BYTE_t *data, timeval_t *tv) 160 160 { 161 161 if (!fNodes[node]) … … 175 175 // Distributes PDO3 messages to the correspoding node calling HandlePDO3 176 176 // 177 void Network::HandlePDO3(BYTE_t node, BYTE_t *data, struct timeval*tv)177 void Network::HandlePDO3(BYTE_t node, BYTE_t *data, timeval_t *tv) 178 178 { 179 179 if (!fNodes[node]) … … 193 193 // Distributes PDO4 messages to the correspoding node calling HandlePDO4 194 194 // 195 void Network::HandlePDO4(BYTE_t node, BYTE_t *data, struct timeval*tv)195 void Network::HandlePDO4(BYTE_t node, BYTE_t *data, timeval_t *tv) 196 196 { 197 197 if (!fNodes[node]) -
trunk/MagicSoft/Cosy/candrv/network.h
r1139 r1140 11 11 int fNodeInitialized[32]; 12 12 13 void HandleSDO(BYTE_t node, BYTE_t cmd, WORD_t idx, BYTE_t subidx, LWORD_t data, structtimeval *tv);14 void HandlePDO1(BYTE_t node, BYTE_t *data, struct timeval*tv);15 void HandlePDO2(BYTE_t node, BYTE_t *data, struct timeval*tv);16 void HandlePDO3(BYTE_t node, BYTE_t *data, struct timeval*tv);17 void HandlePDO4(BYTE_t node, BYTE_t *data, struct timeval*tv);13 void HandleSDO(BYTE_t node, BYTE_t cmd, WORD_t idx, BYTE_t subidx, LWORD_t data, timeval *tv); 14 void HandlePDO1(BYTE_t node, BYTE_t *data, timeval_t *tv); 15 void HandlePDO2(BYTE_t node, BYTE_t *data, timeval_t *tv); 16 void HandlePDO3(BYTE_t node, BYTE_t *data, timeval_t *tv); 17 void HandlePDO4(BYTE_t node, BYTE_t *data, timeval_t *tv); 18 18 19 19 void InitNodes(); -
trunk/MagicSoft/Cosy/candrv/nodedrv.cc
r1139 r1140 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz , 2001 <mailto:tbretz@uni-sw.gwdg.de>18 ! Author(s): Thomas Bretz <mailto:tbretz@uni-sw.gwdg.de>, 2001 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 … … 32 32 // virtual void InitDevice(Network *net) 33 33 // virtual void StopDevice() 34 // virtual void HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, struct timeval*tv)34 // virtual void HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, timeval_t *tv) 35 35 // virtual void HandleSDOOK(WORD_t idx, BYTE_t subidx) 36 36 // virtual void HandleSDOError(LWORD_t data) 37 // virtual void HandlePDO1(BYTE_t *data, struct timeval*tv)38 // virtual void HandlePDO2(BYTE_t *data, struct timeval*tv)39 // virtual void HandlePDO3(BYTE_t *data, struct timeval*tv)40 // virtual void HandlePDO4(BYTE_t *data, struct timeval*tv)37 // virtual void HandlePDO1(BYTE_t *data, timeval_t *tv) 38 // virtual void HandlePDO2(BYTE_t *data, timeval_t *tv) 39 // virtual void HandlePDO3(BYTE_t *data, timeval_t *tv) 40 // virtual void HandlePDO4(BYTE_t *data, timeval_t *tv) 41 41 // 42 42 /////////////////////////////////////////////////////////////////////// … … 141 141 // Prints the received SDo from this device 142 142 // 143 void NodeDrv::HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, struct timeval*tv)143 void NodeDrv::HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, timeval_t *tv) 144 144 { 145 145 cout << "SdoRx: Idx=0x"<< hex << idx << "/" << (int)subidx; -
trunk/MagicSoft/Cosy/candrv/nodedrv.h
r1139 r1140 12 12 typedef UInt_t LWORD_t; 13 13 typedef Int_t LWORDS_t; 14 struct timeval;15 14 #else 16 15 #include "gendef.h" 17 16 #endif 17 18 typedef struct timeval timeval_t; 18 19 19 20 class Network; … … 47 48 bool HasError() { return fError; } 48 49 49 virtual void HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, struct timeval*tv);50 virtual void HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, timeval_t *tv); 50 51 virtual void HandleSDOOK(WORD_t idx, BYTE_t subidx); 51 52 virtual void HandleSDOError(LWORD_t data); 52 53 53 virtual void HandlePDO1(BYTE_t *data, struct timeval*tv) {};54 virtual void HandlePDO2(BYTE_t *data, struct timeval*tv) {};55 virtual void HandlePDO3(BYTE_t *data, struct timeval*tv) {};56 virtual void HandlePDO4(BYTE_t *data, struct timeval*tv) {};54 virtual void HandlePDO1(BYTE_t *data, timeval_t *tv) {}; 55 virtual void HandlePDO2(BYTE_t *data, timeval_t *tv) {}; 56 virtual void HandlePDO3(BYTE_t *data, timeval_t *tv) {}; 57 virtual void HandlePDO4(BYTE_t *data, timeval_t *tv) {}; 57 58 58 59 void SendPDO1(BYTE_t data[8]); -
trunk/MagicSoft/Cosy/candrv/vmodican.cc
r1137 r1140 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz , 2001 <mailto:tbretz@uni-sw.gwdg.de>18 ! Author(s): Thomas Bretz <mailto:tbretz@uni-sw.gwdg.de>, 2001 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2001 … … 110 110 { 111 111 unsigned char c; 112 struct timevaltv;112 timeval_t tv; 113 113 114 114 // … … 183 183 // by the can interface 184 184 // 185 void VmodIcan::HandleMessage(Message *msg, struct timeval*tv)185 void VmodIcan::HandleMessage(Message *msg, timeval_t *tv) 186 186 { 187 187 // -
trunk/MagicSoft/Cosy/candrv/vmodican.h
r1139 r1140 4 4 #include <pthread.h> 5 5 6 #include "unistd.h"// gettimeofday6 #include <unistd.h> // gettimeofday 7 7 8 8 #include "log.h" … … 21 21 class FastMessage; 22 22 23 typedef struct timeval timeval_t; 24 23 25 class VmodIcan : public Log, protected MThread 24 26 { … … 32 34 void *Thread(); 33 35 34 void HandleMessage(Message *msg, struct timeval*tv);35 virtual void HandleCanMessage(WORD_t cobid, BYTE_t *data, struct timeval*tv) {}36 void HandleMessage(Message *msg, timeval_t *tv); 37 virtual void HandleCanMessage(WORD_t cobid, BYTE_t *data, timeval_t *tv) {} 36 38 37 39 int Receive(Message *pm); -
trunk/MagicSoft/Cosy/devdrv/macs.cc
r1109 r1140 24 24 } 25 25 26 void Macs::HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, struct timeval*tv)26 void Macs::HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, timeval_t *tv) 27 27 { 28 28 switch (idx) … … 325 325 } 326 326 327 void Macs::HandlePDO1(BYTE_t *data, struct timeval*tv)327 void Macs::HandlePDO1(BYTE_t *data, timeval_t *tv) 328 328 { 329 329 fPdoPos = (data[4]<<24) | (data[5]<<16) | (data[6]<<8) | data[7]; … … 335 335 } 336 336 337 void Macs::HandlePDO2(BYTE_t *data, struct timeval*tv)337 void Macs::HandlePDO2(BYTE_t *data, timeval_t *tv) 338 338 { 339 339 LWORDS_t errnum = (data[0]<<24) | (data[1]<<16) | (data[2]<<8) | data[3]; -
trunk/MagicSoft/Cosy/devdrv/macs.h
r1109 r1140 46 46 void StopDevice(); 47 47 48 void HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, struct timeval*tv);48 void HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, timeval_t *tv); 49 49 void HandleSDOOK(WORD_t idx, BYTE_t subidx); 50 50 void HandleSDOError(LWORD_t data) { NodeDrv::HandleSDOError(data); } 51 51 52 void HandlePDO1(BYTE_t *data, struct timeval*tv);53 void HandlePDO2(BYTE_t *data, struct timeval*tv);52 void HandlePDO1(BYTE_t *data, timeval_t *tv); 53 void HandlePDO2(BYTE_t *data, timeval_t *tv); 54 54 55 55 void SendMsg(BYTE_t data[6]); -
trunk/MagicSoft/Cosy/devdrv/shaftencoder.cc
r1109 r1140 24 24 } 25 25 26 void ShaftEncoder::HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, struct timeval*tv)26 void ShaftEncoder::HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, timeval_t *tv) 27 27 { 28 28 switch (idx) … … 115 115 } 116 116 117 void ShaftEncoder::HandlePDOType0(BYTE_t *data, struct timeval*tv)117 void ShaftEncoder::HandlePDOType0(BYTE_t *data, timeval_t *tv) 118 118 { 119 119 // … … 129 129 } 130 130 131 void ShaftEncoder::HandlePDOType1(BYTE_t *data, struct timeval*tv)131 void ShaftEncoder::HandlePDOType1(BYTE_t *data, timeval_t *tv) 132 132 { 133 133 // … … 147 147 } 148 148 149 void ShaftEncoder::HandlePDOType2(BYTE_t *data, struct timeval*tv)149 void ShaftEncoder::HandlePDOType2(BYTE_t *data, timeval_t *tv) 150 150 { 151 151 // -
trunk/MagicSoft/Cosy/devdrv/shaftencoder.h
r1109 r1140 26 26 Timer fTime; 27 27 28 void HandlePDOType0(BYTE_t *data, struct timeval*tv);29 void HandlePDOType1(BYTE_t *data, struct timeval*tv);30 void HandlePDOType2(BYTE_t *data, struct timeval*tv);28 void HandlePDOType0(BYTE_t *data, timeval_t *tv); 29 void HandlePDOType1(BYTE_t *data, timeval_t *tv); 30 void HandlePDOType2(BYTE_t *data, timeval_t *tv); 31 31 32 32 void ReqPos(); … … 43 43 void SetDisplay(TGLabel **label) { fLabel = label; } 44 44 45 void HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, struct timeval*tv);45 void HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, timeval_t *tv); 46 46 void HandleSDOOK(WORD_t idx, BYTE_t subidx) { NodeDrv::HandleSDOOK(idx, subidx); } 47 47 void HandleSDOError(LWORD_t data) { NodeDrv::HandleSDOError(data); } 48 48 49 void HandlePDO1(BYTE_t *data, struct timeval*tv) { HandlePDOType2(data, tv); }50 void HandlePDO2(BYTE_t *data, struct timeval*tv) { HandlePDOType2(data, tv); }49 void HandlePDO1(BYTE_t *data, timeval_t *tv) { HandlePDOType2(data, tv); } 50 void HandlePDO2(BYTE_t *data, timeval_t *tv) { HandlePDOType2(data, tv); } 51 51 52 52 LWORDS_t GetPos() { return fPos+fTurn*fTicks; }
Note:
See TracChangeset
for help on using the changeset viewer.