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

Revision 536, 3.9 KB (checked in by bhilburn, 14 years ago)

Removing the 'GetComponentInformation?' function.

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/*! CROSS Cognitive Radio API
18 *
19 * This header exports all public functions that comprise the CROSS function
20 * library.  These are the functions that are used by the host application to
21 * control the CROSS radio. 
22 *
23 * PUT MORE STUFF HERE
24 */
25
26#ifndef LIBCROSS_H
27#define LIBCROSS_H
28
29#include <stdint.h>
30#include <string>
31
32#include "components.h"
33#include "containers.h"
34
35
36/*! \brief Tell the system where the Shell component is located.
37 *
38 * Sets the location of the shell component that the client code will be
39 * communicating with. Note that this can be a local or remote destination.
40 */
41void SetCrossShellLocation(std::string hostname, std::string port);
42
43
44/*! \brief  Parses XML configuration file and uses it to configure the radio.
45 *
46 * This function *must* be called when the radio first starts up, and may be
47 * called at any point after that to reconfigure the radio.
48 */
49bool ParseRadioConfiguration();
50
51
52/*! \brief Lists current radio configuration options loaded from the XML.
53 *
54 * TODO How are we listing these?  Are we simply returning them to stdout?
55 * Logging them? Returning strings?  Need to figure this out...
56 */
57void ListCurrentRadioConfiguration();
58
59
60/*! \brief View data from the current status of the radio.
61 *
62 * This function allows client code to capture radio properties at any certain
63 * instant.  Note, however, that these properties could be changing at very
64 * rapid rates. There is no guarantee that the return results from these
65 * functions will still be valid by the time the client code receives them.
66 */
67Observable* GetRadioObservables();
68Parameter* GetRadioParameters();
69Utility* GetRadioUtilities();
70
71
72/*! \brief View components currently connected to the radio by id.
73 *
74 * TODO Should there be another way to list components? If you have 10 cognitive
75 * engines, how are you going to know which is which just by id?
76 */
77uint32_t* GetConnectedCognitiveEngines();
78uint32_t* GetConnectedPolicyEngines();
79uint32_t* GetConnectedManagementServiceLayers();
80uint32_t* GetConnectedComponents();
81
82
83/*! \brief  Given a certain set of observables, ask the radio to find the
84 * optimum radio parameters and return them.
85 *
86 * TODO I'm a little confused about this function... why would anyone need to
87 * use this?  Shouldn't this be internal to the radio operation?
88 */
89Parameter* GetOptimalParameters(Observable *radioObservables, uint32_t numObservables,
90                Parameter *currentParameters, uint32_t numCurrentParameters);
91
92
93/*! \brief  Update the radio regarding its performance.
94 *
95 * TODO
96 */
97bool UpdateParameterPerformance(Parameter *p, uint32_t numParameters, Observable *o, \
98        uint32_t numObservables);
99
100/*! \brief Deactivate/Activate/Disconnect a component by id.
101 */
102bool ActivateComponent(uint32_t id);
103bool DeactivateComponent(uint32_t id);
104bool DisconnectComponent(uint32_t id);
105
106/*! \brief Set the active mission of the CROSS radio.
107 */
108uint32_t SetActiveMission(char * activeMission);
109
110/*! \brief Shut down the radio.
111 *
112 * This function will deactivate and disconnect all radio components before
113 * finally shutting down the shell and stopping radio operations.
114 */
115bool Shutdown();
116
117/*! \brief Return total number of currently recognized transmission parameters.
118 */
119uint32_t GetNumParameters();
120uint32_t GetNumObservables();
121uint32_t GetNumUtilities();
122
123
124#endif
Note: See TracBrowser for help on using the browser.