| Line | |
|---|
| 1 | #ifndef SDOLIST_H
|
|---|
| 2 | #define SDOLIST_H
|
|---|
| 3 |
|
|---|
| 4 | #ifdef __CINT__
|
|---|
| 5 | struct pthread_mutex_t;
|
|---|
| 6 | #else
|
|---|
| 7 | #include <pthread.h>
|
|---|
| 8 | #endif
|
|---|
| 9 |
|
|---|
| 10 | #ifdef __CINT__
|
|---|
| 11 | typedef Byte_t BYTE_t;
|
|---|
| 12 | typedef UShort_t WORD_t;
|
|---|
| 13 | #else
|
|---|
| 14 | #include <TROOT.h>
|
|---|
| 15 | #include "gendef.h"
|
|---|
| 16 | #endif
|
|---|
| 17 |
|
|---|
| 18 | class PendingSDO
|
|---|
| 19 | {
|
|---|
| 20 | public:
|
|---|
| 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 |
|
|---|
| 32 | class PendingSDOList
|
|---|
| 33 | {
|
|---|
| 34 | private:
|
|---|
| 35 | PendingSDO *fFirst;
|
|---|
| 36 | PendingSDO *fLast;
|
|---|
| 37 |
|
|---|
| 38 | pthread_mutex_t fMux;
|
|---|
| 39 |
|
|---|
| 40 | public:
|
|---|
| 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.