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

Revision 228, 3.2 KB (checked in by trnewman, 15 years ago)

Added sending current parameters in the libvt request optimization function.

Added guts to the CBR so it actually creates an sql db and searches it.

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#include <stdint.h>
19
20#include "components.h"
21#include "containers.h"
22
23
24/* Parses VTCROSS XML configuration file and uses it to configure the radio.
25 *
26 * This function *must* be called when the radio first starts up, and may be
27 * called at any point after that to reconfigure the radio.
28 */
29bool ParseRadioConfiguration();
30
31
32/* Lists current radio configuration options loaded from the configuration XML
33 * file.
34 *
35 * TODO How are we listing these?  Are we simply returning them to stdout?
36 * Logging them? Returning strings?  Need to figure this out...
37 */
38void ListCurrentRadioConfiguration();
39
40
41/* View data from the current status of the radio.
42 *
43 * This function allows client code to capture radio properties at any certain
44 * instant.  Note, however, that these properties could be changing at very
45 * rapid rates. There is no guarantee that the return results from these
46 * functions will still be valid by the time the client code receives them.
47 */
48Observable* GetRadioObservables();
49Parameter* GetRadioParameters();
50Utility* GetRadioUtilities();
51
52
53/* View components currently connected to the radio by id.
54 *
55 * TODO Should there be another way to list components? If you have 10 cognitive
56 * engines, how are you going to know which is which just by id?
57 */
58uint32_t* GetConnectedCognitiveEngines();
59uint32_t* GetConnectedPolicyEngines();
60uint32_t* GetConnectedManagementServiceLayers();
61uint32_t* GetConnectedComponents();
62
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
72/* Given a certain set of observables, ask the radio to find the optimum radio
73 * parameters and return them.
74 *
75 * TODO I'm a little confused about this function... why would anyone need to
76 * use this?  Shouldn't this be internal to the radio operation?
77 */
78Parameter* GetOptimalParameters(Observable *radioObservables, uint32_t numObservables,
79                Parameter *currentParameters, uint32_t numCurrentParameters);
80
81
82/* Update the radio regarding its performance for a certain set of transmission
83 * parameters, observables, and utilities.
84 *
85 * TODO Where in the function parameters are we accurately representing the
86 * radio's performance?
87 */
88bool UpdateParameterPerformance(Parameter *radioParameters, \
89        Observable *radioObservables, Utility *radioUtilies);
90
91
92/* Deactivate/Activate/Disconnect a component by id.
93 */
94bool ActivateComponent(uint32_t id);
95bool DeactivateComponent(uint32_t id);
96bool DisconnectComponent(uint32_t id);
97
98
99/* Shut down the radio.
100 *
101 * This function will deactivate and disconnect all radio components before
102 * finally shutting down the shell and stopping radio operations.
103 */
104bool Shutdown();
105
106/* Return total number of currently recognized transmission parameters.
107 */
108uint32_t GetNumParameters();
109
110
111#endif
Note: See TracBrowser for help on using the browser.