Ignore:
Timestamp:
12/18/02 17:48:44 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Cosy/candrv
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/candrv/network.cc

    r1273 r1690  
    237237            lout << "- Setting up Node #" << dec << i << endl;
    238238            fNodes[i]->InitDevice(this);
    239             fNodeInitialized[i] = TRUE;
     239            if (!fNodes[i]->IsZombieNode())
     240                fNodeInitialized[i] = TRUE;
     241            else
     242                fNodes[i]=NULL;
    240243        }
    241244    lout << "- All Nodes setup." << endl;
  • trunk/MagicSoft/Cosy/candrv/nodedrv.cc

    r1273 r1690  
    5656// and the node name. The name is a name for debug output.
    5757//
    58 NodeDrv::NodeDrv(BYTE_t nodeid, const char *name, MLog &out) : Log(out), fNetwork(NULL), fId(32), fError(0)
     58NodeDrv::NodeDrv(BYTE_t nodeid, const char *name, MLog &out) : Log(out), fNetwork(NULL), fId(32), fError(0), fIsZombie(kFALSE)
    5959{
    6060    if (nodeid>0x1f)
     
    311311// this device has been received.
    312312// 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//
     315bool NodeDrv::WaitForSdo(WORD_t idx, BYTE_t subidx, WORDS_t timeout)
     316{
     317    return fNetwork->WaitForSdo(fId, idx, subidx, timeout);
    317318}
    318319
  • trunk/MagicSoft/Cosy/candrv/nodedrv.h

    r1272 r1690  
    3434    void DelError()        { fError = 0; }
    3535
     36    Bool_t fIsZombie;
     37
    3638public:
    3739    NodeDrv(BYTE_t nodeid, const char *name=NULL, MLog &out=gLog);
     
    4749    int  GetError() const { return fError; }
    4850    bool HasError() const { return fError; }
     51
     52    bool IsZombieNode() const { return fIsZombie; }
    4953
    5054    virtual void HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, timeval_t *tv);
     
    8286
    8387    // void WaitForSdos();
    84     void WaitForSdo(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);
    8589
    8690    void EnableCanMsg(BYTE_t fcode);
Note: See TracChangeset for help on using the changeset viewer.