Revision 115, 1.1 KB
(checked in by bhilburn, 15 years ago)
|
Added preproc code to headers to prevent multiple scans, told git to ignore swap
files, playing with autoconf.
|
Rev | Line | |
---|
[102] | 1 | /* Virginia Tech Cognitive Radio Open Source Systems |
---|
| 2 | * Virginia Tech, 2009 |
---|
| 3 | * |
---|
| 4 | * LICENSE INFORMATION GOES HERE |
---|
| 5 | */ |
---|
| 6 | |
---|
[104] | 7 | /* This header contains commonly used data container structs in VT-CROSS |
---|
| 8 | * systems. |
---|
| 9 | */ |
---|
| 10 | |
---|
[115] | 11 | #ifndef COMPONENTS_H |
---|
| 12 | #define COMPONENTS_H |
---|
[104] | 13 | |
---|
| 14 | /* Until the new C++ i99 standard is made permanent, allow use of otherwise |
---|
| 15 | * legacy C-libraries. |
---|
| 16 | */ |
---|
[102] | 17 | #ifdef GCC_EXPERIMENTAL |
---|
| 18 | #include <cstdint> |
---|
| 19 | #else |
---|
| 20 | #include <stdint.h> |
---|
| 21 | #endif |
---|
| 22 | |
---|
| 23 | |
---|
| 24 | struct CE_Info { |
---|
[103] | 25 | uint32_t numUtilities; |
---|
| 26 | uint32_t numParameters; |
---|
| 27 | uint32_t numObservables; |
---|
[102] | 28 | uint32_t policy_engine; |
---|
| 29 | uint32_t policy_socket; |
---|
| 30 | uint32_t ce_socket; |
---|
| 31 | }; |
---|
| 32 | |
---|
| 33 | struct Utility { |
---|
[104] | 34 | std::string name; |
---|
| 35 | std::string units; |
---|
| 36 | std::string goal; |
---|
[103] | 37 | float target; |
---|
[102] | 38 | float value; |
---|
| 39 | }; |
---|
| 40 | |
---|
| 41 | struct Affect { |
---|
[103] | 42 | Utility *u; |
---|
[104] | 43 | std::string relation; |
---|
[102] | 44 | }; |
---|
| 45 | |
---|
| 46 | struct Parameter { |
---|
[104] | 47 | std::string name; |
---|
| 48 | std::string units; |
---|
[103] | 49 | float min; |
---|
| 50 | uint32_t numAffects; |
---|
| 51 | Affect affection_list[10]; |
---|
| 52 | float max; |
---|
| 53 | float step; |
---|
[102] | 54 | float value; |
---|
| 55 | }; |
---|
| 56 | |
---|
| 57 | struct Observable { |
---|
[104] | 58 | std::string name; |
---|
[103] | 59 | Affect affection_list[10]; |
---|
| 60 | uint32_t numAffects; |
---|
[102] | 61 | float value; |
---|
| 62 | }; |
---|
| 63 | |
---|
[115] | 64 | #endif |
---|