276
|
1 #ifndef INCLUDED_TASK
|
|
2 #define INCLUDED_TASK
|
|
3
|
307
|
4 #include "base.h"
|
|
5 #include "types.h"
|
|
6 #include "ListData.h"
|
276
|
7
|
|
8 #define MAX_PARAMS 8
|
|
9
|
|
10 class Task {
|
|
11 public: // variables
|
|
12
|
|
13 BASE_NEW_DELETE(Task);
|
|
14
|
|
15 int command; // 4 byte
|
|
16 ListDataPtr inData; // 4 byte
|
|
17 ListDataPtr outData; // 4 byte
|
|
18 uint32 self; // 4 byte
|
|
19
|
|
20 int param_size; // 4 byte
|
|
21 int param[MAX_PARAMS]; // 4*MAX_PARAMS byte
|
|
22
|
|
23 public: // functions
|
|
24 int add_inData_t(unsigned int addr, int size);
|
|
25 int add_outData_t(unsigned int addr, int size);
|
|
26 int add_data(ListDataPtr list, unsigned int addr, int size);
|
|
27 int add_param(int param);
|
|
28
|
|
29 #define add_inData(addr, size) \
|
|
30 add_inData_t((unsigned int)(addr), (size));
|
|
31 #define add_outData(addr, size) \
|
|
32 add_outData_t((unsigned int)(addr), (size));
|
|
33 };
|
|
34
|
|
35 typedef Task* TaskPtr;
|
|
36
|
|
37 #endif
|