Revision 518, 2.1 KB
(checked in by bhilburn, 14 years ago)
|
Added Doxygen documentation to headers in the include/vtcross directory.
|
Line | |
---|
1 | /* |
---|
2 | Copyright 2009 Virginia Polytechnic Institute and State University |
---|
3 | |
---|
4 | Licensed under the Apache License, Version 2.0 (the "License"); |
---|
5 | you may not use this file except in compliance with the License. |
---|
6 | You may obtain a copy of the License at |
---|
7 | |
---|
8 | http://www.apache.org/licenses/LICENSE-2.0 |
---|
9 | |
---|
10 | Unless required by applicable law or agreed to in writing, software |
---|
11 | distributed under the License is distributed on an "AS IS" BASIS, |
---|
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
13 | See the License for the specific language governing permissions and |
---|
14 | limitations under the License. |
---|
15 | */ |
---|
16 | |
---|
17 | /*! This header contains commonly used data container structs in CROSS |
---|
18 | * systems. |
---|
19 | */ |
---|
20 | |
---|
21 | #ifndef CONTAINERS_H |
---|
22 | #define CONTAINERS_H |
---|
23 | |
---|
24 | |
---|
25 | #include <netdb.h> |
---|
26 | #include <stdint.h> |
---|
27 | #include <string> |
---|
28 | |
---|
29 | |
---|
30 | /*! TODO |
---|
31 | * |
---|
32 | */ |
---|
33 | struct Radio_Info { |
---|
34 | uint32_t numUtilities; |
---|
35 | uint32_t numParameters; |
---|
36 | uint32_t numObservables; |
---|
37 | uint32_t policy_engine; |
---|
38 | uint32_t policy_socket; |
---|
39 | uint32_t ce_socket; |
---|
40 | }; |
---|
41 | |
---|
42 | |
---|
43 | /*! TODO |
---|
44 | * |
---|
45 | */ |
---|
46 | struct Utility { |
---|
47 | std::string name; |
---|
48 | std::string units; |
---|
49 | std::string goal; |
---|
50 | float target; |
---|
51 | float value; |
---|
52 | }; |
---|
53 | |
---|
54 | |
---|
55 | /*! TODO |
---|
56 | * |
---|
57 | */ |
---|
58 | struct Affect { |
---|
59 | Utility *u; |
---|
60 | std::string relation; |
---|
61 | }; |
---|
62 | |
---|
63 | |
---|
64 | /*! TODO |
---|
65 | * |
---|
66 | */ |
---|
67 | struct Parameter{ |
---|
68 | std::string name; |
---|
69 | std::string units; |
---|
70 | float min; |
---|
71 | uint32_t numAffects; |
---|
72 | Affect affection_list[10]; |
---|
73 | float max; |
---|
74 | float step; |
---|
75 | float value; |
---|
76 | }; |
---|
77 | |
---|
78 | |
---|
79 | /*! TODO |
---|
80 | * |
---|
81 | */ |
---|
82 | struct Observable { |
---|
83 | std::string name; |
---|
84 | Affect affection_list[10]; |
---|
85 | uint32_t numAffects; |
---|
86 | float value; |
---|
87 | }; |
---|
88 | |
---|
89 | |
---|
90 | /*! TODO |
---|
91 | * |
---|
92 | */ |
---|
93 | struct Service { |
---|
94 | std::string name; |
---|
95 | int32_t socketFD; |
---|
96 | int32_t componentID; |
---|
97 | uint16_t num_conds; |
---|
98 | std::string parameter; |
---|
99 | std::string input[10]; |
---|
100 | std::string output[10]; |
---|
101 | }; |
---|
102 | |
---|
103 | |
---|
104 | /*! TODO |
---|
105 | * |
---|
106 | */ |
---|
107 | struct Mission { |
---|
108 | std::string name; |
---|
109 | uint32_t missionID; |
---|
110 | uint32_t numServices; |
---|
111 | Service *services; |
---|
112 | std::string input[10]; |
---|
113 | std::string output[10]; |
---|
114 | }; |
---|
115 | |
---|
116 | /*! Registration data for Cognitive Engines for use in communication. |
---|
117 | */ |
---|
118 | struct CE_Reg { |
---|
119 | int32_t ID_num; |
---|
120 | //sockaddr_in *sock_ptr; |
---|
121 | //socklen_t sock_len; |
---|
122 | int32_t FD; |
---|
123 | }; |
---|
124 | |
---|
125 | #endif |
---|