source: trunk/Cosy/candrv/sdolist.h@ 10332

Last change on this file since 10332 was 8810, checked in by tbretz, 17 years ago
*** empty log message ***
File size: 928 bytes
Line 
1#ifndef COSY_SdoList
2#define COSY_SdoList
3
4#ifdef __CINT__
5typedef Byte_t BYTE_t;
6typedef UShort_t WORD_t;
7#else
8#include <TROOT.h>
9#include "gendef.h"
10#endif
11
12#ifndef ROOT_TMutex
13#include <TMutex.h>
14#endif
15
16class PendingSDO
17{
18public:
19 BYTE_t Node;
20 WORD_t Idx;
21 BYTE_t Subidx;
22 PendingSDO *Next;
23
24 PendingSDO(BYTE_t n=0, WORD_t i=0, BYTE_t s=0)
25 : Node(n), Idx(i), Subidx(s), Next(NULL) {}
26 virtual ~PendingSDO() { }
27
28 ClassDef(PendingSDO, 0)
29};
30
31class PendingSDOList
32{
33private:
34 PendingSDO *fFirst;
35 PendingSDO *fLast;
36
37 TMutex fMux;
38
39public:
40 PendingSDOList();
41 virtual ~PendingSDOList();
42
43 void Add(BYTE_t node, WORD_t idx, BYTE_t subidx);
44 void Del(BYTE_t node, WORD_t idx, BYTE_t subidx);
45 void DelAll();
46
47 int IsPending() const;
48 int IsPending(BYTE_t node);
49 int IsPending(BYTE_t node, WORD_t idx, BYTE_t subidx);
50
51 ClassDef(PendingSDOList, 0)
52};
53
54#endif
Note: See TracBrowser for help on using the repository browser.