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

Revision 498, 4.0 KB (checked in by bhilburn, 15 years ago)

Numerous changes. A VTCROSS shell can now be remote relative to the radio host platform. The remote server/port is set through a new function in libvtcross, which has also been added as an option to the benchmark_dsa script. Other changes include bug fixes in the benchmark code and some SQL fixes.

Line 
1/*
2 Copyright 2009 Virginia Polytechnic Institute and State University 
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7 
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/* VTCROSS Cognitive Radio API
18 *
19 * This header exports all public functions that comprise the VTCROSS function
20 * library. 
21 *
22 * PUT MORE STUFF HERE
23 */
24
25#ifndef LIBVTCROSS_H
26#define LIBVTCROSS_H
27
28#include <stdint.h>
29#include <string>
30
31#include "components.h"
32#include "containers.h"
33
34
35/* Sets the location of the shell component that the client code will be
36 * communicating with. Note that this can be a local or remote destination.
37 */
38void SetCrossShellLocation(std::string hostname, std::string port);
39
40
41/* Parses VTCROSS XML configuration file and uses it to configure the radio.
42 *
43 * This function *must* be called when the radio first starts up, and may be
44 * called at any point after that to reconfigure the radio.
45 */
46bool ParseRadioConfiguration();
47
48
49/* Lists current radio configuration options loaded from the configuration XML
50 * file.
51 *
52 * TODO How are we listing these?  Are we simply returning them to stdout?
53 * Logging them? Returning strings?  Need to figure this out...
54 */
55void ListCurrentRadioConfiguration();
56
57
58/* View data from the current status of the radio.
59 *
60 * This function allows client code to capture radio properties at any certain
61 * instant.  Note, however, that these properties could be changing at very
62 * rapid rates. There is no guarantee that the return results from these
63 * functions will still be valid by the time the client code receives them.
64 */
65Observable* GetRadioObservables();
66Parameter* GetRadioParameters();
67Utility* GetRadioUtilities();
68
69
70/* View components currently connected to the radio by id.
71 *
72 * TODO Should there be another way to list components? If you have 10 cognitive
73 * engines, how are you going to know which is which just by id?
74 */
75uint32_t* GetConnectedCognitiveEngines();
76uint32_t* GetConnectedPolicyEngines();
77uint32_t* GetConnectedManagementServiceLayers();
78uint32_t* GetConnectedComponents();
79
80
81/* Look up component information by id.
82 *
83 * Note that the return type is of abstract base class component, which can then
84 * be used to reference whatever sub-component type was referenced by the id.
85 */
86Component* GetComponentInformation(uint32_t id);
87
88
89/* Given a certain set of observables, ask the radio to find the optimum radio
90 * parameters and return them.
91 *
92 * TODO I'm a little confused about this function... why would anyone need to
93 * use this?  Shouldn't this be internal to the radio operation?
94 */
95Parameter* GetOptimalParameters(Observable *radioObservables, uint32_t numObservables,
96                Parameter *currentParameters, uint32_t numCurrentParameters);
97
98
99/* Update the radio regarding its performance for a certain set of transmission
100 * parameters, observables, and utilities.
101 *
102 * TODO Where in the function parameters are we accurately representing the
103 * radio's performance?
104 */
105bool UpdateParameterPerformance(Parameter *p, uint32_t numParameters, Observable *o, \
106        uint32_t numObservables);
107
108/* Deactivate/Activate/Disconnect a component by id.
109 */
110bool ActivateComponent(uint32_t id);
111bool DeactivateComponent(uint32_t id);
112bool DisconnectComponent(uint32_t id);
113
114uint32_t SetActiveMission(char * activeMission);
115
116/* Shut down the radio.
117 *
118 * This function will deactivate and disconnect all radio components before
119 * finally shutting down the shell and stopping radio operations.
120 */
121bool Shutdown();
122
123/* Return total number of currently recognized transmission parameters.
124 */
125uint32_t GetNumParameters();
126uint32_t GetNumObservables();
127uint32_t GetNumUtilities();
128
129
130#endif
Note: See TracBrowser for help on using the browser.