Changeset 1690 for trunk/MagicSoft/Cosy/candrv
- Timestamp:
- 12/18/02 17:48:44 (22 years ago)
- Location:
- trunk/MagicSoft/Cosy/candrv
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/candrv/network.cc
r1273 r1690 237 237 lout << "- Setting up Node #" << dec << i << endl; 238 238 fNodes[i]->InitDevice(this); 239 fNodeInitialized[i] = TRUE; 239 if (!fNodes[i]->IsZombieNode()) 240 fNodeInitialized[i] = TRUE; 241 else 242 fNodes[i]=NULL; 240 243 } 241 244 lout << "- All Nodes setup." << endl; -
trunk/MagicSoft/Cosy/candrv/nodedrv.cc
r1273 r1690 56 56 // and the node name. The name is a name for debug output. 57 57 // 58 NodeDrv::NodeDrv(BYTE_t nodeid, const char *name, MLog &out) : Log(out), fNetwork(NULL), fId(32), fError(0) 58 NodeDrv::NodeDrv(BYTE_t nodeid, const char *name, MLog &out) : Log(out), fNetwork(NULL), fId(32), fError(0), fIsZombie(kFALSE) 59 59 { 60 60 if (nodeid>0x1f) … … 311 311 // this device has been received. 312 312 // You can stop waiting by StopWaitingForSDO. 313 // 314 void NodeDrv::WaitForSdo(WORD_t idx, BYTE_t subidx, WORDS_t timeout) 315 { 316 fNetwork->WaitForSdo(fId, idx, subidx, timeout); 313 // Return false if waiting timed out. 314 // 315 bool NodeDrv::WaitForSdo(WORD_t idx, BYTE_t subidx, WORDS_t timeout) 316 { 317 return fNetwork->WaitForSdo(fId, idx, subidx, timeout); 317 318 } 318 319 -
trunk/MagicSoft/Cosy/candrv/nodedrv.h
r1272 r1690 34 34 void DelError() { fError = 0; } 35 35 36 Bool_t fIsZombie; 37 36 38 public: 37 39 NodeDrv(BYTE_t nodeid, const char *name=NULL, MLog &out=gLog); … … 47 49 int GetError() const { return fError; } 48 50 bool HasError() const { return fError; } 51 52 bool IsZombieNode() const { return fIsZombie; } 49 53 50 54 virtual void HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, timeval_t *tv); … … 82 86 83 87 // void WaitForSdos(); 84 voidWaitForSdo(WORD_t idx, BYTE_t subidx=0, WORDS_t timeout=500);88 bool WaitForSdo(WORD_t idx, BYTE_t subidx=0, WORDS_t timeout=500); 85 89 86 90 void EnableCanMsg(BYTE_t fcode);
Note:
See TracChangeset
for help on using the changeset viewer.