Revision 255, 1.4 KB
(checked in by wrodgers, 15 years ago)
|
Implemented service DB, transfer methods
|
Line | |
---|
1 | /* Virginia Tech Cognitive Radio Open Source Systems |
---|
2 | * Virginia Tech, 2009 |
---|
3 | * |
---|
4 | * LICENSE INFORMATION GOES HERE |
---|
5 | */ |
---|
6 | |
---|
7 | /* This header contains commonly used data container structs in VT-CROSS |
---|
8 | * systems. |
---|
9 | */ |
---|
10 | |
---|
11 | #ifndef CONTAINERS_H |
---|
12 | #define CONTAINERS_H |
---|
13 | |
---|
14 | |
---|
15 | #include <netdb.h> |
---|
16 | #include <stdint.h> |
---|
17 | #include <string> |
---|
18 | |
---|
19 | |
---|
20 | /* TODO |
---|
21 | * |
---|
22 | */ |
---|
23 | struct Radio_Info { |
---|
24 | uint32_t numUtilities; |
---|
25 | uint32_t numParameters; |
---|
26 | uint32_t numObservables; |
---|
27 | uint32_t policy_engine; |
---|
28 | uint32_t policy_socket; |
---|
29 | uint32_t ce_socket; |
---|
30 | }; |
---|
31 | |
---|
32 | |
---|
33 | /* TODO |
---|
34 | * |
---|
35 | */ |
---|
36 | struct Utility { |
---|
37 | std::string name; |
---|
38 | std::string units; |
---|
39 | std::string goal; |
---|
40 | float target; |
---|
41 | float value; |
---|
42 | }; |
---|
43 | |
---|
44 | |
---|
45 | /* TODO |
---|
46 | * |
---|
47 | */ |
---|
48 | struct Affect { |
---|
49 | Utility *u; |
---|
50 | std::string relation; |
---|
51 | }; |
---|
52 | |
---|
53 | |
---|
54 | /* TODO |
---|
55 | * |
---|
56 | */ |
---|
57 | struct Parameter { |
---|
58 | std::string name; |
---|
59 | std::string units; |
---|
60 | float min; |
---|
61 | uint32_t numAffects; |
---|
62 | Affect affection_list[10]; |
---|
63 | float max; |
---|
64 | float step; |
---|
65 | float value; |
---|
66 | }; |
---|
67 | |
---|
68 | |
---|
69 | /* TODO |
---|
70 | * |
---|
71 | */ |
---|
72 | struct Observable { |
---|
73 | std::string name; |
---|
74 | Affect affection_list[10]; |
---|
75 | uint32_t numAffects; |
---|
76 | float value; |
---|
77 | }; |
---|
78 | |
---|
79 | |
---|
80 | /* TODO |
---|
81 | * |
---|
82 | */ |
---|
83 | struct Service { |
---|
84 | std::string name; |
---|
85 | uint16_t socketFD; |
---|
86 | }; |
---|
87 | |
---|
88 | |
---|
89 | /* TODO |
---|
90 | * |
---|
91 | */ |
---|
92 | struct Mission { |
---|
93 | std::string name; |
---|
94 | uint32_t missionID; |
---|
95 | uint32_t numServices; |
---|
96 | Service *services; |
---|
97 | }; |
---|
98 | |
---|
99 | /* Registration data for Cognitive Engines for use in communication |
---|
100 | */ |
---|
101 | struct CE_Reg { |
---|
102 | int32_t ID_num; |
---|
103 | sockaddr_in *sock_ptr; |
---|
104 | socklen_t sock_len; |
---|
105 | }; |
---|
106 | |
---|
107 | #endif |
---|