root/vtcross/branches/bhilburn/include/containers.h @ 109

Revision 104, 1.0 KB (checked in by bhilburn, 15 years ago)

Little reformatting regarding spacing and comments. Also, fixed parameter list
in components.h to properly use container struct types.

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
12/* Until the new C++ i99 standard is made permanent, allow use of otherwise
13 * legacy C-libraries.
14 */
15#ifdef GCC_EXPERIMENTAL
16    #include <cstdint>
17#else
18    #include <stdint.h>
19#endif
20
21
22struct CE_Info {
23    uint32_t numUtilities;
24    uint32_t numParameters;
25    uint32_t numObservables;
26    uint32_t policy_engine;
27    uint32_t policy_socket;
28    uint32_t ce_socket;
29};
30
31struct Utility {
32    std::string name;
33    std::string units;
34    std::string goal;
35    float target;
36    float value;
37};
38
39struct Affect {
40    Utility *u;
41    std::string relation;
42};
43
44struct Parameter {
45    std::string name;
46    std::string units;
47    float min;
48    uint32_t numAffects;
49    Affect affection_list[10];
50    float max;
51    float step;
52    float value;
53};
54
55struct Observable {
56    std::string name;
57    Affect affection_list[10];
58    uint32_t numAffects;
59    float value;
60};
61
62
Note: See TracBrowser for help on using the browser.