source: trunk/MagicSoft/Cosy/candrv/sdolist.h@ 1380

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