root/vtcross/trunk/src/include/vtcross/libvtcross.h @ 170

Revision 170, 3.5 KB (checked in by bhilburn, 15 years ago)

Added at _ton_ of TODOs where documentation needs to be written.

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
36/* Lists current radio configuration options loaded from the configuration XML
37 * file.
38 *
39 * TODO How are we listing these?  Are we simply returning them to stdout?
40 * Logging them? Returning strings?  Need to figure this out...
41 */
42void ListCurrentRadioConfiguration();
43
44
45/* View data from the current status of the radio.
46 *
47 * This function allows client code to capture radio properties at any certain
48 * instant.  Note, however, that these properties could be changing at very
49 * rapid rates. There is no guarantee that the return results from these
50 * functions will still be valid by the time the client code receives them.
51 */
52Observables* GetRadioObservables();
53Parameters* GetRadioParameters();
54Utilities* GetRadioUtilities();
55
56
57/* View components currently connected to the radio by id.
58 *
59 * TODO Should there be another way to list components? If you have 10 cognitive
60 * engines, how are you going to know which is which just by id?
61 */
62uint32_t* GetConnectedCognitiveEngines();
63uint32_t* GetConnectedPolicyEngines();
64uint32_t* GetConnectedManagementServiceLayers();
65uint32_t* GetConnectedComponents();
66
67
68/* Look up component information by id.
69 *
70 * Note that the return type is of abstract base class component, which can then
71 * be used to reference whatever sub-component type was referenced by the id.
72 */
73Component* GetComponentInformation(uint32_t id);
74
75
76/* Given a certain set of observables, ask the radio to find the optimum radio
77 * parameters and return them.
78 *
79 * TODO I'm a little confused about this function... why would anyone need to
80 * use this?  Shouldn't this be internal to the radio operation?
81 */
82Parameters* GetOptimalParameters(Observables *radioObservables);
83
84
85/* Update the radio regarding its performance for a certain set of transmission
86 * parameters, observables, and utilities.
87 *
88 * TODO Where in the function parameters are we accurately representing the
89 * radio's performance?
90 */
91bool UpdateParameterPerformance(Parameters *radioParameters, \
92        Observables *radioObservables, Utilies *radioUtilies);
93
94
95/* Deactivate/Activate/Disconnect a component by id.
96 *
97 * TODO This seems silly?  If id's are independent of component type, why not
98 * just have one deactivate function that takes an id and operates on it? Why do
99 * we need 3 separate functions? They are all components...
100 */
101bool DeactivateCE(uint32_t id);
102bool DeactivatePE(uint32_t id);
103bool DeactivateSML(uint32_t id);
104bool ActivateCE(uint32_t id);
105bool ActivatePE(uint32_t id);
106bool ActivateSML(uint32_t id);
107bool DisconnectCE(uint32_t id);
108bool DisconnectPE(uint32_t id);
109bool DisconnectSML(uint32_t id);
110
111
112/* Shut down the radio.
113 *
114 * This function will deactivate and disconnect all radio components before
115 * finally shutting down the shell and stopping radio operations.
116 */
117bool Shutdown();
118
119#endif
Note: See TracBrowser for help on using the browser.