Line | |
---|
1 | #ifndef SDOLIST_H
|
---|
2 | #define SDOLIST_H
|
---|
3 |
|
---|
4 | #include <pthread.h>
|
---|
5 |
|
---|
6 | #include "gendef.h"
|
---|
7 |
|
---|
8 | class PendingSDO
|
---|
9 | {
|
---|
10 | public:
|
---|
11 | BYTE_t Node;
|
---|
12 | WORD_t Idx;
|
---|
13 | BYTE_t Subidx;
|
---|
14 | PendingSDO *Next;
|
---|
15 |
|
---|
16 | PendingSDO(BYTE_t n=0, WORD_t i=0, BYTE_t s=0)
|
---|
17 | : Node(n), Idx(i), Subidx(s), Next(NULL) {}
|
---|
18 | };
|
---|
19 |
|
---|
20 | class PendingSDOList
|
---|
21 | {
|
---|
22 | private:
|
---|
23 | PendingSDO *fFirst;
|
---|
24 | PendingSDO *fLast;
|
---|
25 |
|
---|
26 | pthread_mutex_t fMux;
|
---|
27 |
|
---|
28 | public:
|
---|
29 | PendingSDOList();
|
---|
30 | ~PendingSDOList();
|
---|
31 |
|
---|
32 | void Add(BYTE_t node, WORD_t idx, BYTE_t subidx);
|
---|
33 | void Del(BYTE_t node, WORD_t idx, BYTE_t subidx);
|
---|
34 | void DelAll();
|
---|
35 |
|
---|
36 | int IsPending() const;
|
---|
37 | int IsPending(BYTE_t node);
|
---|
38 | int IsPending(BYTE_t node, WORD_t idx, BYTE_t subidx);
|
---|
39 | };
|
---|
40 |
|
---|
41 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.