Ignore:
Timestamp:
01/23/03 13:32:58 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/candrv/nodedrv.h

    r1703 r1727  
    2020class Network;
    2121
    22 class NodeDrv : public Log
     22class NodeDrv : public Log, public TObject
    2323{
    2424private:
     
    3030    int fError;
    3131
     32    Bool_t fIsZombie; // A Zombie node is a node which doesn't answer...
     33
     34    TTimer  *fTimeout;
     35    Int_t    fGuardTime;      // Guardtime [ms]
     36    Int_t    fLifeTimeFactor;
     37    Double_t fTimeoutTime;
     38    Bool_t   fTimerOn;
     39
     40    Bool_t HandleTimer(TTimer *t);
     41
    3242protected:
    3343    void SetError(int err) { fError = err; }
    3444    void DelError()        { fError = 0; }
    3545
    36     Bool_t fIsZombie; // A Zombie node is a node which doesn't answer...
     46    Int_t GetLifeTimeFactor() const { return fLifeTimeFactor; }
     47    Int_t GetGuardTime() const      { return fGuardTime; }
     48
     49    virtual void SetZombie();
    3750
    3851public:
     
    5669
    5770    virtual void HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, timeval_t *tv);
    58     virtual void HandleSDOOK(WORD_t idx, BYTE_t subidx);
     71    virtual void HandleSDOOK(WORD_t idx, BYTE_t subidx, timeval_t *tv);
    5972    virtual void HandleSDOError(LWORD_t data);
    6073
    61     virtual void HandlePDO1(BYTE_t *data, timeval_t *tv) {};
    62     virtual void HandlePDO2(BYTE_t *data, timeval_t *tv) {};
    63     virtual void HandlePDO3(BYTE_t *data, timeval_t *tv) {};
    64     virtual void HandlePDO4(BYTE_t *data, timeval_t *tv) {};
     74    virtual void HandlePDO1(BYTE_t *data, timeval_t *tv) {}
     75    virtual void HandlePDO2(BYTE_t *data, timeval_t *tv) {}
     76    virtual void HandlePDO3(BYTE_t *data, timeval_t *tv) {}
     77    virtual void HandlePDO4(BYTE_t *data, timeval_t *tv) {}
     78    virtual void HandleNodeguard(timeval_t *tv);
     79    virtual void HandleEmergency(timeval_t *tv) {}
    6580
    6681    bool SendPDO1(BYTE_t data[8]);
     
    8095
    8196    bool SendNMT(BYTE_t cmd);
     97    virtual void SendNodeguard();
    8298
    8399    bool RequestSDO(WORD_t idx, BYTE_t subidx=0);
     
    93109    void EnableCanMsg(BYTE_t fcode);
    94110
     111    void StartGuarding();
     112    void StartGuarding(Int_t ms, Int_t ltf);
     113    void StopGuarding();
     114
    95115    ClassDef(NodeDrv, 0) // base class for an object describing hardware
    96116};
Note: See TracChangeset for help on using the changeset viewer.