root/vtcross/branches/bhilburn/src/include/libvtcross.h @ 115

Revision 115, 3.5 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.

Line 
1/* Virginia Tech Cognitive Radio Open Source Systems
2 * Virginia Tech, 2009
3 *
4 * LICENSE INFORMATION GOES HERE
5 */
6
7/* VTCROSS Cognitive Radio API
8 *
9 * This header exports all public functions that comprise the VTCROSS function
10 * library. 
11 *
12 * PUT MORE STUFF HERE
13 */
14
15#ifndef LIBVTCROSS_H
16#define LIBVTCROSS_H
17
18#ifdef GCC_EXPERIMENTAL
19    #include <cstdint>
20#else
21    #include <stdint.h>
22#endif
23
24#include "components.h"
25#include "containers.h"
26
27
28/* Parses VTCROSS XML configuration file and uses it to configure the radio.
29 *
30 * This function *must* be called when the radio first starts up, and may be
31 * called at any point after that to reconfigure the radio.
32 */
33bool ParseRadioConfiguration();
34
35/* Lists current radio configuration options loaded from the configuration XML
36 * file.
37 *
38 * TODO How are we listing these?  Are we simply returning them to stdout?
39 * Logging them? Returning strings?  Need to figure this out...
40 */
41void ListCurrentRadioConfiguration();
42
43/* View data from the current status of the radio.
44 *
45 * This function allows client code to capture radio properties at any certain
46 * instant.  Note, however, that these properties could be changing at very
47 * rapid rates. There is no guarantee that the return results from these
48 * functions will still be valid by the time the client code receives them.
49 */
50Observables* GetRadioObservables();
51Parameters* GetRadioParameters();
52Utilities* GetRadioUtilities();
53
54/* View components currently connected to the radio by id.
55 *
56 * TODO Should there be another way to list components? If you have 10 cognitive
57 * engines, how are you going to know which is which just by id?
58 */
59uint32_t* GetConnectedCognitiveEngines();
60uint32_t* GetConnectedPolicyEngines();
61uint32_t* GetConnectedManagementServiceLayers();
62uint32_t* GetConnectedComponents();
63
64/* Look up component information by id.
65 *
66 * Note that the return type is of abstract base class component, which can then
67 * be used to reference whatever sub-component type was referenced by the id.
68 */
69Component* GetComponentInformation(uint32_t id);
70
71/* Given a certain set of observables, ask the radio to find the optimum radio
72 * parameters and return them.
73 *
74 * TODO I'm a little confused about this function... why would anyone need to
75 * use this?  Shouldn't this be internal to the radio operation?
76 */
77Parameters* GetOptimalParameters(Observables *radioObservables);
78
79/* Update the radio regarding its performance for a certain set of transmission
80 * parameters, observables, and utilities.
81 *
82 * TODO Where in the function parameters are we accurately representing the
83 * radio's performance?
84 */
85bool UpdateParameterPerformance(Parameters *radioParameters, \
86        Observables *radioObservables, Utilies *radioUtilies);
87
88/* Deactivate/Activate/Disconnect a component by id.
89 *
90 * TODO This seems silly?  If id's are independent of component type, why not
91 * just have one deactivate function that takes an id and operates on it? Why do
92 * we need 3 separate functions? They are all components...
93 */
94bool DeactivateCE(uint32_t id);
95bool DeactivatePE(uint32_t id);
96bool DeactivateSML(uint32_t id);
97bool ActivateCE(uint32_t id);
98bool ActivatePE(uint32_t id);
99bool ActivateSML(uint32_t id);
100bool DisconnectCE(uint32_t id);
101bool DisconnectPE(uint32_t id);
102bool DisconnectSML(uint32_t id);
103
104/* Shut down the radio.
105 *
106 * This function will deactivate and disconnect all radio components before
107 * finally shutting down the shell and stopping radio operations.
108 */
109bool Shutdown();
110
111#endif
Note: See TracBrowser for help on using the browser.