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