Changeset 518

Show
Ignore:
Timestamp:
11/13/09 15:37:02 (14 years ago)
Author:
bhilburn
Message:

Added Doxygen documentation to headers in the include/vtcross directory.

Location:
vtcross/trunk/src/include/vtcross
Files:
12 modified

Legend:

Unmodified
Added
Removed
  • vtcross/trunk/src/include/vtcross/cbr.h

    r509 r518  
    1515*/ 
    1616 
    17 /* This file contains the full implementation of the CBR class - the default 
    18  * VTCROSS case-based reasoner. 
     17/*! This header contains the declaration and a full implementation of  
     18 * the CBR class - the default CROSS case-based reasoner, which can be used as a 
     19 * backend for cognitive engines. 
    1920 */ 
    2021 
     
    3940 
    4041 
    41 #define DATABASENAME "vtcross_cbr" 
     42#define DATABASENAME "cross_cbr" 
    4243 
    4344 
    4445/* This is an internal debugging function used by some sqlite3 function calls. 
    45  * It is not used otherwise in the VTCROSS codebase. */ 
    46 int32_t  
    47 callback(void *notUsed, int argc, char **argv, char **azColName) 
     46 *  It is not used otherwise in the CROSS codebase. */ 
     47int32_t  
     48callback(void *notUsed, int32_t argc, char **argv, char **azColName) 
    4849{ 
    4950    for(size_t i = 0; i < argc; i++) { 
     
    5657 
    5758 
    58 /* The CBR class is designed to used as either as-is, or as a parent class.  All 
     59/*! \brief Case-Based Reasoner class declaration. 
     60 * 
     61 * The CBR class is designed to used as either as-is, or as a parent class.  All 
    5962 * functions are declared virtual, and internal members are 'protected' rather 
    6063 * than private. If you require functionality in a CBR not specifically provided 
     
    6669{ 
    6770    public: 
    68         /* Constructors for the CBR class. Note that the default constructor 
     71        /*! \brief Constructors for the CBR class.  
     72         * 
     73         * Note that the default constructor 
    6974         * must be defined inline here so that super-calls from child classes 
    7075         * don't fail (i.e. we cannot rely on the compiler-provided constructor. */ 
     
    7479                string _primcols[], uint32_t _len, uint32_t _primlen); 
    7580 
    76         /* Destructor for the CBR class. Note that this destructor will be 
     81        /*! \brief Destructors for the CBR class. 
     82         * 
     83         * Destructor for the CBR class. Note that this destructor will be 
    7784         * called automatically by any derived classes, and so child classes 
    7885         * should not repeat the freeing actions performed in this function. */ 
    7986        virtual ~CBR(); 
    8087 
    81         /* This function opens the VTCROSS database, or if it has not been 
     88        /*! \brief Open/Create a sqlite database for the CBR. 
     89         * 
     90         * This function opens the CROSS database, or if it has not been 
    8291         * created yet, creates it. */ 
    8392        virtual int32_t OpenDatabase(); 
    8493 
    85         /* Execute a sqlite3 command and return the sqlite3 return code. */ 
     94        /*! \brief  Execute a sqlite command. 
     95         * 
     96         * Construct and execute a sqlite3 command and pass the return code back. */ 
    8697        virtual int32_t ExecuteCommand(); 
    8798 
    88         /* Execute a sqlite3 search command and store the results in the passed 
     99        /*! \brief Search the sqlite3 database.  
     100         * 
     101         * Execute a sqlite3 search command and store the results in the passed 
    89102         * retvals argument. */ 
    90103        virtual int32_t ExecuteSearchCommand(float *_retvals); 
    91104 
    92         /* Print the VTCROSS sqlite3 database. */ 
     105        /*! \brief Print the CROSS sqlite database. */ 
    93106        virtual void Print(); 
    94107 
    95         /* Search the VTCROSS database for specific fields and store the results 
     108        /*! \brief Search the CBR database.  
     109         * 
     110         * Search the CROSS database for specific fields and store the results 
    96111         * in the passed retvals argument. */ 
    97112        virtual int32_t Search(string _names[], int32_t *_ops, float *_vals, \ 
     
    101116            float *_retvals); 
    102117 
    103         /* Update a row in the VTCROSS sqlite3 database. */ 
     118        /*! \brief Update an entry in the CBR database. */ 
    104119        virtual int32_t Update(string _where[], string _set[], float *_wherevals, \ 
    105120                float *_setvals, uint32_t _wherelen, uint32_t _setlen); 
    106121 
    107         /* Add a row to the VTCROSS sqlite3 database. */ 
     122        /*! \brief Add a row to the CROSS sqlite3 database. */ 
    108123        virtual int32_t AddRow(string _cols[], float *_vals, uint32_t _len); 
    109124 
     
    129144 
    130145    /* Generate the command that will create the initial table within the 
    131      * VTCROSS database. */ 
     146     * CROSS database. */ 
    132147    command = "CREATE TABLE " + tablename + "("; 
    133148    for(size_t i = 0; i < numColumns; i++) { 
     
    159174 
    160175    /* Generate the command that will create the initial table within the 
    161      * VTCROSS database with primary keys. */ 
     176     * CROSS database with primary keys. */ 
    162177    command = "CREATE TABLE " + tablename + "("; 
    163178    for(size_t i = 0; i < numColumns; i++) { 
  • vtcross/trunk/src/include/vtcross/cognitive_engine.h

    r465 r518  
    1515*/ 
    1616 
    17 /* This header exports the declaration for the Cognitive Engine component type. 
     17/*! This header exports the declaration for the Cognitive Engine component type. 
    1818 */ 
    1919 
     
    2525 
    2626 
    27 /* Cognitive Engine class declaration.  All public functions are inherited from 
    28  * parent classes. 
     27/*! \brief Cognitive Engine class declaration. 
     28 * 
     29 * All public functions are inherited from parent classes.  Please see parent 
     30 * class definitions for function documentation. 
    2931 */ 
    3032class CognitiveEngine : public Engine 
    3133{ 
    3234    public: 
     35        /*! Default constructor. */ 
    3336        CognitiveEngine(); 
     37 
     38        /*! Default destructor. */ 
    3439        ~CognitiveEngine(); 
    3540 
    36         /* Overloaded constructor that creates a cognitive engine object and 
     41        /*! \brief Preferred constructor. 
     42         * 
     43         * Overloaded constructor that creates a cognitive engine object and 
    3744         * connects it to either the shell or an SML, depening on the SML bool. 
    3845         */ 
     
    5360 
    5461    private: 
    55         /* Receive the transmitted radio configuration from the radio itself 
    56          * (the CE will not always be local to the radio). 
    57          */ 
     62        /*! \brief Receive radio XML configuration. 
     63         *  
     64         * Receive the transmitted radio configuration from the radio itself 
     65         * (the CE will not always be local to the radio). This gets passed 
     66         * through either the Shell or the SML. */ 
    5867        void ReceiveRadioConfiguration(); 
    5968 
    60         /* Receive an 'experience' report from the radio. 
    61          */ 
     69        /*! \brief Receive an 'experience' report from the radio. 
     70         * 
     71         * An experience report can be used to build the transmission history 
     72         * for a CE just starting up so that it has a moving start regarding 
     73         * parameter optimization. */ 
    6274        void ReceiveExperience(); 
    6375 
    64         /* Find the most optimal set of transmission parameters given certain 
     76        /*! \brief Request that the CE optimize a set of parameters.  
     77         * 
     78         * Find the most optimal set of transmission parameters given certain 
    6579         * observables and possibly a service if the SML component is present 
    66          * and active. 
    67          */ 
    68         Parameter *GetSolution(Observable *observables, Parameter *currentParameters); 
    69         Parameter *GetSolution(Observable *observables, Parameter *currentParameters, \ 
    70                 std::string service); 
     80         * and active. */ 
     81        Parameter *GetSolution(Observable *observables, \ 
     82                Parameter *currentParameters); 
     83        Parameter *GetSolution(Observable *observables, \ 
     84                Parameter *currentParameters, std::string service); 
    7185 
    72         /* Receive a feedback from the radio regarding the performance of a 
     86        /*! \brief Receive feedback from the radio  
     87         * 
     88         * Receive a feedback from the radio regarding the performance of a 
    7389         * certain set of parameters, possibly associated with a service. 
    7490         * 
     
    7894         * more accurate performance statistics.  
    7995         */ 
    80         void ReceiveFeedback(Observable *observables,\ 
    81                 Parameter *parameters); 
    82         void ReceiveFeedback(Observable *observables, \ 
    83                 Parameter *parameters, std::string service); 
     96        void ReceiveFeedback(Observable *observables,Parameter *parameters); 
     97        void ReceiveFeedback(Observable *observables, Parameter *parameters, \ 
     98                std::string service); 
    8499 
    85100 
    86         /* BuildCognitiveEngine performs the CE implementation specific work 
     101        /*! \brief Initialize the CE and prepare it for operation.  
     102         * 
     103         * BuildCognitiveEngine performs the CE implementation specific work 
    87104         * that defines the internals of a CE.  For example, a CBR CE engine 
    88105         * would build the case-base reasoner or create the database, a neural 
     
    92109        void BuildCognitiveEngine(); 
    93110 
    94         /* The SML_present bool reflects whether or not the remote component 
     111        /*! \brief Keept track of what this CE is connected to.  
     112         * 
     113         * The SML_present bool reflects whether or not the remote component 
    95114         * this object is connected to is an SML.  If it isn't, then it must be 
    96115         * a shell.  The socketFD stores the socket file descriptor for this 
  • vtcross/trunk/src/include/vtcross/common.h

    r411 r518  
    1515*/ 
    1616 
    17 /* This file is included in every source file of the VTCROSS system.  It 
    18  * declares global flags and includes. 
    19  */ 
     17/*! This file is included in every source file of the CROSS system.  It  
     18 * declares global flags and includes. */ 
    2019 
    2120#ifndef COMMON_H 
  • vtcross/trunk/src/include/vtcross/components.h

    r465 r518  
    1515*/ 
    1616 
    17 /* This header exports the base declarations for all VT-CROSS radio components. 
    18  * It contains two pure abstract base classes, Component and Engine; Engine derives 
    19  * from Component.  All functions contained within the abstract base classes are 
    20  * dynamically linked and pure, and all child non-abstract classes derive using  
    21  * private inheritence.  Class functions of the abstract base classes are public 
    22  * for two reasons: (1) To allow for public/protected inheritence in other  
    23  * implementations, (2) So that symbolic debuggers can navigate the call tree  
    24  * for typecasted objects of derivative classes. 
     17/*! This header exports the base declarations for all CROSS radio components. 
     18 *  
     19 * It contains two pure abstract base classes, Component and Engine; Engine  
     20 * derives from Component.  All functions contained within the abstract base  
     21 * classes are dynamically linked and pure, and all child non-abstract classes 
     22 * derive using private inheritence.  Class functions of the abstract base  
     23 * classes are public for two reasons: (1) To allow for public/protected  
     24 * inheritence in other implementations, (2) So that symbolic debuggers can  
     25 * navigate the call tree for typecasted objects of derivative classes. 
    2526 * 
    2627 * Note that any new component type declaration MUST include this header and 
     
    4041 
    4142 
    42 /* Component abstract base class that all component classes should inherit from, 
     43/*! \brief The Component class is the top-level abstract base class in CROSS. 
     44 * 
     45 * Component abstract base class that all component classes should inherit from, 
    4346 * including cognitive and policy engines, and the service management layer. 
    4447 * Defines only functions required by all component types. 
     
    4750{ 
    4851    public: 
    49         /* Asks the component at the passed socket FD for its component type 
     52        /*! \brief Asks a component to identify itself.  
     53         * 
     54         * Asks the component at the passed socket FD for its component type 
    5055         * string.  Note that this implementation is global for all component 
    5156         * types, so is implemented here.  Should a component need to override 
     
    6368        } 
    6469 
    65         /* Send an indentfying string for this object's component type in 
     70        /*! \brief Responds to a request for identification. 
     71         * 
     72         * Send an indentfying string for this object's component type in 
    6673         * response to a GetRemoteComponentType query. 
    6774         */ 
    6875        virtual void SendComponentType() = 0; 
    6976 
    70         /* Completely shutdown the radio and all operations. 
    71          */ 
     77        /*! \brief Shutdown the component. */ 
    7278        virtual void Shutdown() = 0; 
    7379 
    74         /* Reset the radio and reload all configuration files. 
    75          * 
    76          * TODO are we remembering experiences in CEs? 
    77          */ 
     80        /*! \brief Reset the component and reload configurations. */ 
    7881        virtual void Reset() = 0; 
    7982 
    80         /* Register or deregister a component with the primary radio shell. 
    81          */ 
     83        /*! \brief Compenent registration procedures. */ 
    8284        virtual void RegisterComponent() = 0; 
    8385        virtual void DeregisterComponent() = 0; 
     
    8587 
    8688 
    87 /* Engine abstract base class from which all engine component types should 
     89/*! \brief Engine abstract base class declaration. 
     90 * 
     91 * Engine abstract base class from which all engine component types should 
    8892 * inherit (e.g. cognitive and policy engines). Inherits all functions from the 
    8993 * ABC Component publically. 
     
    9296{ 
    9397    public: 
    94         /* Connect to the remote control component, which will always be either 
    95          * the VTCROSS shell or SML.  Based on the status of the SML_present 
     98        /*! \brief Connect to a remote controlling component.  
     99         * 
     100         * Connect to the remote control component, which will always be either 
     101         * the CROSS shell or SML.  Based on the status of the SML_present 
    96102         * bool, this function will also register the component or services. 
    97103         * 
    98104         * TODO I feel like the name of this function could be changed to be a 
    99          * little more descriptive? 
    100          */ 
     105         * little more descriptive? */ 
    101106        virtual void ConnectToRemoteComponent(const char* serverName, \ 
    102107                const char* serverPort, const bool SML) = 0; 
    103108         
    104         /* Wait for a command signal containing task instructions. 
    105          */ 
     109        /*! \brief Wait for a command signal containing task instructions. 
     110         * 
     111         * This is the general run-time loop from which all radio operation 
     112         * occurs.  Once the Engine has started up and initialized, it will 
     113         * remain in this function until it receives a command to perform some 
     114         * action. */ 
    106115        virtual void WaitForSignal() = 0; 
    107116 
    108         /* Register or deregister services that this engine provides with the 
    109          * service management layer. 
    110          */ 
     117        /*! \brief Functions for interacting with the service management layer.  
     118         * 
     119         * Register or deregister services that this engine provides with the 
     120         * service management layer. */ 
    111121        virtual void RegisterServices() = 0; 
    112122        virtual void DeregisterServices() = 0; 
  • vtcross/trunk/src/include/vtcross/containers.h

    r411 r518  
    1515*/ 
    1616 
    17 /* This header contains commonly used data container structs in VT-CROSS 
     17/*! This header contains commonly used data container structs in CROSS 
    1818 * systems. 
    1919 */ 
     
    2828 
    2929 
    30 /* TODO 
     30/*! TODO 
    3131 * 
    3232 */ 
     
    4141 
    4242 
    43 /* TODO 
     43/*! TODO 
    4444 * 
    4545 */ 
     
    5353 
    5454 
    55 /* TODO 
     55/*! TODO 
    5656 * 
    5757 */ 
     
    6262 
    6363 
    64 /* TODO 
     64/*! TODO 
    6565 * 
    6666 */ 
     
    7777 
    7878 
    79 /* TODO 
     79/*! TODO 
    8080 * 
    8181 */ 
     
    8888 
    8989 
    90 /* TODO 
     90/*! TODO 
    9191 * 
    9292 */ 
     
    102102 
    103103 
    104 /* TODO 
     104/*! TODO 
    105105 * 
    106106 */ 
     
    114114}; 
    115115 
    116 /* Registration data for Cognitive Engines for use in communication  
     116/*! Registration data for Cognitive Engines for use in communication. 
    117117 */ 
    118118struct CE_Reg { 
  • vtcross/trunk/src/include/vtcross/cross_shell.h

    r465 r518  
    1515*/ 
    1616 
    17 /* This header exports the declaration for the VTCROSS Shell component, which is 
    18  * a critical part of every VTCROSS system.  
     17/*! This header exports the declaration for the CROSS Shell component, which is 
     18 * a critical part of every CROSS system.  
    1919 */ 
    2020 
     
    2626 
    2727 
    28 /* Cognitive Radio Shell class declaration.  
     28/*! \brief Cognitive Radio Shell class declaration.  
     29 * 
     30 * The CROSS Cognitive Radio Shell (CRS) is the central control component of 
     31 * most CROSS radios.  It is a requirement for any CROSS radio, regardless of 
     32 * the presence or lack thereof of the SML. 
    2933 */ 
    3034class CognitiveRadioShell  
    3135{ 
    3236    public: 
     37        /*! \brief Default CRS costructor. */ 
    3338        CognitiveRadioShell(); 
     39 
     40        /*! \brief Default CRS destructor. */ 
    3441        ~CognitiveRadioShell(); 
    3542 
    36         /* Overloaded constructor that creates a CR Shell object and loads the 
     43        /*! \brief Preferred CRS constructor. 
     44         * 
     45         * Overloaded constructor that creates a CR Shell object and loads the 
    3746         * passed radio configuration XML file. 
    3847         */ 
     
    4049            int16_t policyPort, int16_t commandPort); 
    4150 
    42         /* Ask for the component type of a remote component via sockets, or 
    43          * respond to such a query sent to the shell itself. 
    44          */ 
     51        /*! \brief Request the component type of a remote component. */ 
    4552        std::string GetRemoteComponentType(int32_t socketFD); 
     53 
     54        /*! \brief Respond to a request to identify component type. */ 
    4655        void SendComponentType(int32_t socketFD); 
    4756 
     57        /*! \brief Shutdown the CRS. 
     58         * 
     59         * Since the CRS is the central control component of the CROSS radio, 
     60         * shutting down the CRS will shutdown the entire radio. 
     61         */ 
    4862        void Shutdown(); 
     63 
     64        /*! \brief Restart the CRS. 
     65         * 
     66         * Restart the CRS component - reloads configuration files, and 
     67         * re-initializes the CRS component. 
     68         */ 
    4969        void Reset(); 
    5070         
    51         /* Start all the socket servers */ 
     71        /*! \brief Start the CRS's socket server.  
     72         * 
     73         * This function will make the CRS create a socket server and begin 
     74         * listening for incoming connections from other components. 
     75         */ 
    5276        void StartShellServer();  
    5377 
     78        /*! \brief Load the radio configuration. 
     79         * 
     80         * This function reads in the radio's XML configuration file, which is 
     81         * typically located on the same system as the CRS, although it can also 
     82         * be passed to the CRS from the radio host platform if necessary. 
     83         */ 
    5484        int32_t LoadRadioConfiguration(const char* radioConfig, Parameter* &pList, \ 
    5585            Utility* &uList, Observable* &oList, Radio_Info* radioInfo); 
    5686    private: 
    57         /* Parse and load/reload policies into the policy engine. 
    58          */ 
    59         void LoadPolicies(); 
    60         void ReloadPolicies(); 
    61  
    62         /* Register and Deregister the different components. 
     87        /*! \brief Handle component registration activities. 
     88         * 
     89         * Register and Deregister the different components. 
     90         * TODO Are multiple functions really necessary?  They are all basically 
     91         * doing the same thing... 
    6392         */ 
    6493        void RegisterCognitiveEngine(int32_t socketFD); 
     
    6998        void DeregisterSML(int32_t socketFD); 
    7099         
     100        /*! \brief Set the active mission. 
     101         * 
     102         * This function handles a request by the radio host platform to set or 
     103         * change the current active mission in the service management layer. 
     104         * This command is basically passed through the CRS to the SML. 
     105         */ 
    71106        void SetActiveMission(int32_t socketFD); 
    72107 
     
    75110        int32_t HandleMessage(int32_t socketFD); 
    76111        
    77         /* Send optimization request to primary port FD. 
     112        /*! \brief Send optimization request to CE. 
     113         * 
     114         * The host application requested that parameters be optimized - pass 
     115         * the parameters and command to the CE. 
     116         * 
     117         * TODO How is the CE being selected if multiple CEs are available? 
    78118         */ 
    79119        void GetOptimalParameters(int32_t socketFD); 
    80120 
    81         /* TODO 
     121        /*! TODO 
    82122         */ 
    83123        bool SendRadioConfiguration(int32_t socketFD); 
    84124        bool SendRadioExperience(int32_t socketFD); 
    85125 
    86         /* TODO 
     126        /*! TODO 
    87127         */ 
    88128        bool UpdateParameterPerformance(int32_t socketFD); 
    89129 
    90         /* TODO 
     130        /*! TODO 
    91131         */ 
    92132        bool SML_present; 
     
    94134        bool CE_present; 
    95135        
    96         /* TODO 
     136        /*! TODO 
    97137         */ 
    98138        int32_t numberOfCognitiveEngines;  
    99139 
    100         /* TODO 
     140        /*! TODO 
    101141         */        
    102142        int16_t primaryPort; 
     
    104144        int16_t commandPort; 
    105145 
    106         /* TODO 
     146        /*! TODO 
     147         * 
     148         * I'm confused as to what exactly these are for... there can be 
     149         * multiple CEs and PEs, and the CRS _IS_ the command component. 
     150         * --BCH 
    107151         */ 
    108152        int32_t ceSocketFD; 
     
    110154        int32_t policySocketFD; 
    111155 
    112         /* TODO 
     156        /*! TODO 
    113157         */ 
    114158        Utility *utils; 
     
    116160        Observable *observables; 
    117161 
    118         /* TODO 
     162        /*! TODO 
    119163         */ 
    120164        struct Radio_Info *radio_info; 
  • vtcross/trunk/src/include/vtcross/debug.h

    r436 r518  
    1515*/ 
    1616 
    17 /* DESCRIPTION OF FILE. 
     17/*! This header defines macros for log functions and debug statements. 
     18 * Generally, it is recommended that this header be included in every source 
     19 * file.  The functions included in this file should be used rather than 
     20 * hard-coding 'printf's or 'cout's in your code. 
    1821 */ 
    1922 
  • vtcross/trunk/src/include/vtcross/error.h

    r411 r518  
    1515*/ 
    1616 
    17 /* DESCRIPTION OF FILE. 
     17/*! This header defines macros for printing to standard error out.  The macros 
     18 * in this file should be used rather than printing to stderr with fprintf or 
     19 * exiting with a hard-coded 'exit' call. 
    1820 */ 
    1921 
  • vtcross/trunk/src/include/vtcross/libvtcross.h

    r498 r518  
    1515*/ 
    1616 
    17 /* VTCROSS Cognitive Radio API 
     17/*! CROSS Cognitive Radio API 
    1818 * 
    19  * This header exports all public functions that comprise the VTCROSS function 
    20  * library.   
     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.   
    2122 * 
    2223 * PUT MORE STUFF HERE 
    2324 */ 
    2425 
    25 #ifndef LIBVTCROSS_H 
    26 #define LIBVTCROSS_H 
     26#ifndef LIBCROSS_H 
     27#define LIBCROSS_H 
    2728 
    2829#include <stdint.h> 
     
    3334 
    3435 
    35 /* Sets the location of the shell component that the client code will be 
     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 
    3639 * communicating with. Note that this can be a local or remote destination. 
    3740 */ 
     
    3942 
    4043 
    41 /* Parses VTCROSS XML configuration file and uses it to configure the radio.  
     44/*! \brief  Parses XML configuration file and uses it to configure the radio.  
    4245 * 
    4346 * This function *must* be called when the radio first starts up, and may be 
     
    4750 
    4851 
    49 /* Lists current radio configuration options loaded from the configuration XML 
    50  * file.  
     52/*! \brief Lists current radio configuration options loaded from the XML. 
    5153 * 
    5254 * TODO How are we listing these?  Are we simply returning them to stdout? 
     
    5658 
    5759 
    58 /* View data from the current status of the radio.  
     60/*! \brief View data from the current status of the radio.  
    5961 * 
    6062 * This function allows client code to capture radio properties at any certain 
     
    6870 
    6971 
    70 /* View components currently connected to the radio by id.  
     72/*! \brief View components currently connected to the radio by id.  
    7173 * 
    7274 * TODO Should there be another way to list components? If you have 10 cognitive 
     
    7981 
    8082 
    81 /* Look up component information by id.  
     83/*! \brief Look up component information by id.  
    8284 * 
    8385 * Note that the return type is of abstract base class component, which can then 
     
    8789 
    8890 
    89 /* Given a certain set of observables, ask the radio to find the optimum radio 
    90  * parameters and return them.  
     91/*! \brief  Given a certain set of observables, ask the radio to find the  
     92 * optimum radio parameters and return them.  
    9193 * 
    9294 * TODO I'm a little confused about this function... why would anyone need to 
     
    9799 
    98100 
    99 /* Update the radio regarding its performance for a certain set of transmission 
    100  * parameters, observables, and utilities. 
     101/*! \brief  Update the radio regarding its performance. 
    101102 * 
    102  * TODO Where in the function parameters are we accurately representing the 
    103  * radio's performance? 
     103 * TODO 
    104104 */ 
    105105bool UpdateParameterPerformance(Parameter *p, uint32_t numParameters, Observable *o, \ 
    106106        uint32_t numObservables); 
    107107 
    108 /* Deactivate/Activate/Disconnect a component by id. 
     108/*! \brief Deactivate/Activate/Disconnect a component by id. 
    109109 */ 
    110110bool ActivateComponent(uint32_t id); 
     
    112112bool DisconnectComponent(uint32_t id); 
    113113 
     114/*! \brief Set the active mission of the CROSS radio. 
     115 */ 
    114116uint32_t SetActiveMission(char * activeMission); 
    115117 
    116 /* Shut down the radio. 
     118/*! \brief Shut down the radio. 
    117119 * 
    118120 * This function will deactivate and disconnect all radio components before 
     
    121123bool Shutdown(); 
    122124 
    123 /* Return total number of currently recognized transmission parameters. 
     125/*! \brief Return total number of currently recognized transmission parameters. 
    124126 */ 
    125127uint32_t GetNumParameters(); 
  • vtcross/trunk/src/include/vtcross/policy_engine.h

    r465 r518  
    1515*/ 
    1616 
    17 /* This header exports the declaration for the Policy Engine component type. 
     17/*! This header exports the declaration for the Policy Engine component type. 
    1818 */ 
    1919 
     
    2525 
    2626 
    27 /* Policy Engine class declaration.  All public functions are inherited from 
    28  * parent classes. 
     27/*! \brief Policy Engine class declaration.   
     28 * 
     29 * All public functions are inherited from parent classes Engine and Component. 
     30 * Please see those class documentation files for further information regarding 
     31 * public functions. 
    2932 */ 
    3033class PolicyEngine : public Engine 
    3134{ 
    3235    public: 
     36        /*! \brief Default Policy Engine Constructor */ 
    3337        PolicyEngine(); 
     38 
     39        /*! \brief Default Policy Engine Destructor */ 
    3440        ~PolicyEngine(); 
    3541 
    36         /* Overloaded constructor that creates a policy engine object and 
     42        /*! \brief Preferred Policy Engine Constructor.  
     43         * 
     44         * Overloaded constructor that creates a policy engine object and 
    3745         * connects it to either the shell or an SML, depening on the SML bool. 
    3846         */ 
     
    5361 
    5462    private: 
    55         /* Parse and load/reload policies into the policy engine. 
    56          */ 
     63        /*! \brief Parse and load/reload policies into the policy engine. */ 
    5764        void LoadPolicies(); 
    5865        void ReloadPolicies(); 
    5966 
    60         /* Return a decision made by the policy engine regarding a certain set 
     67        /*! \brief Return a validation decision. 
     68         * 
     69         * Return a decision made by the policy engine regarding a certain set 
    6170         * of transmission parameters. 
    6271         */ 
     
    6473                int32_t decision_array[]); 
    6574 
    66         /* Validate a set of transmission parameters received from the radio. 
     75        /*! \brief Perform parameter validation. 
     76         * 
     77         * Validate a set of transmission parameters received from the radio. 
    6778         */ 
    6879        void ValidateParameters(); 
    6980 
    70         /* The SML_present bool reflects whether or not the remote component 
     81        /*! \brief Keep track of what control component this PE is connected to. 
     82         * 
     83         * The SML_present bool reflects whether or not the remote component 
    7184         * this object is connected to is an SML.  If it isn't, then it must be 
    7285         * a shell.  The socketFD stores the socket file descriptor for this 
  • vtcross/trunk/src/include/vtcross/service_management_layer.h

    r465 r518  
    1515*/ 
    1616 
    17 /* This header exports the declaration for the Service Management Layer 
     17/*! This header exports the declaration for the Service Management Layer 
    1818 * component. 
    1919 */ 
     
    2626 
    2727 
    28 /* Service Management Layer (SML) class declaration.  The functions listed here 
    29  * are required by the VTCROSS API for service-oriented VTCROSS radio 
    30  * architectures. 
     28/*! \brief Service Management Layer (SML) class declaration.   
     29 * 
     30 * The functions listed here are required by the CROSS API for  
     31 * service-oriented CROSS radio architectures.  Note that most public functions 
     32 * are documented in the parent class, Component. 
    3133 */ 
    3234class ServiceManagementLayer : public Component 
    3335{ 
    3436    public: 
     37        /*! \brief Default SML Constructor. */ 
    3538        ServiceManagementLayer(); 
     39 
     40        /*! \brief Default SML Destructor. */ 
    3641        ~ServiceManagementLayer(); 
    3742 
    38         /* Overloaded constructor that creates an SML and connects it to the 
     43        /*! \brief Preferred SML Constructor. 
     44         * 
     45         * Overloaded constructor that creates an SML and connects it to the 
    3946         * shell with the passed hostname and port. 
    4047         */ 
     
    4249                const char* serverPort, int16_t clientPort); 
    4350 
    44         /* Connect and register with the shell component at the passed hostname 
     51        /*! \brief Connect the SML to a remote Shell control component.  
     52         * 
     53         * Connect and register with the shell component at the passed hostname 
    4554         * and port. 
    4655         */ 
    4756        void ConnectToShell(const char* serverName, const char* serverPort); 
     57 
    4858        void SendComponentType(); 
    4959        void MessageHandler(int32_t ID); 
     
    5363        void DeregisterComponent(); 
    5464 
    55         /* Starts the SML Server and watches it for incoming messages 
     65        /*! \brief Starts the SML Server and watches it for incoming messages 
     66         * 
     67         * TODO 
    5668         */ 
    5769        void StartSMLServer(); 
    5870 
    5971    private:  
    60         /* Receive the radio configuration settings from the shell and pass them 
     72        /*! \brief Pass the radio configuration onto another component.  
     73         * 
     74         * Receive the radio configuration settings from the shell and pass them 
    6175         * on to another component. 
    6276         */ 
    6377        void TransferRadioConfiguration(int32_t ID); 
    6478 
    65         /* Receive information regarding a completed 'experience' and pass it on 
     79        /*! \brief Pass a radio experience onto another component.  
     80         * 
     81         * Receive information regarding a completed 'experience' and pass it on 
    6682         * to the appropriate cognitive engine. 
    6783         */ 
    6884        void TransferExperience(int32_t ID); 
    6985         
    70         /* Listen for other components registering their available services with 
     86        /*! Listen for other components registering their available services with 
    7187         * the SML.  
    7288         */ 
     
    7490        void DeregisterServices(int32_t ID); 
    7591 
    76         /* Change the active mission of the radio to a new one and adjust radio 
     92        /*! Change the active mission of the radio to a new one and adjust radio 
    7793         * behavoir appropriately. 
    7894         */ 
    7995        void SetActiveMission(); 
    8096 
    81         /* TODO 
     97        /*! TODO 
    8298         */ 
    8399        void RegisterCognitiveEngine(int32_t ID); 
    84100        void DeregisterCognitiveEngine(int32_t ID); 
    85101 
    86         /* List all services provided to the radio by registered components. 
     102        /*! List all services provided to the radio by registered components. 
    87103         */ 
    88104        void ListServices(); 
    89105 
    90         /* Load/Relead the XML configuration file.  
     106        /*! Load/Relead the XML configuration file.  
    91107         */ 
    92108        void ReloadConfiguration(); 
    93109        void LoadConfiguration(const char *SML_Config, Mission* &mList); 
    94110 
    95         /* Create and initialize the DB to hold the services 
     111        /*! Create and initialize the DB to hold the services 
    96112        */ 
    97113        void CreateServicesDB(); 
    98114        void CreateDataDB(); 
    99115 
    100         /* TODO 
     116        /*! TODO 
    101117         */ 
    102118        void PerformActiveMission(); 
    103119        void TransactData(int32_t sourceID); 
    104120 
    105         /* The socket file descriptor information for the shell which this SML 
     121        /*! The socket file descriptor information for the shell which this SML 
    106122         * is connected to. 
    107123         */ 
    108124        int32_t shellSocketFD; 
    109125 
    110         /* TODO 
     126        /*! TODO 
    111127         */ 
    112128        int16_t CEPort; 
  • vtcross/trunk/src/include/vtcross/socketcomm.h

    r411 r518  
    1515*/ 
    1616 
    17 /* TODO DESCRIPTION OF FILE. 
     17/*! This file describes the interface to libsocketcomm, which is the internal 
     18 * socket communication library that CROSS radios use to communicate between 
     19 * components. 
    1820 */ 
    1921 
     
    2628 
    2729 
    28 /* TODO 
     30/*! TODO 
    2931 */ 
    3032int32_t ReadMessage(int32_t socketFD, char *msgBuffer); 
    3133 
    32 /* TODO 
     34/*! TODO 
    3335 */ 
    3436int32_t SendMessage(int32_t socketFD, const char *message) ; 
    3537 
    36 /* TODO 
     38/*! TODO 
    3739 */ 
    3840int32_t GetParameter(int32_t socketFD, struct Parameter pList[], \ 
    3941        struct Radio_Info *radio_info); 
    4042 
    41 /* TODO 
     43/*! TODO 
    4244 */ 
    4345int32_t GetRequest(int32_t socketFD, struct Parameter pList[], \ 
    4446        struct Radio_Info *radio_info); 
    4547 
    46 /* This is the original function that does what the above function is supposed 
     48/*! This is the original function that does what the above function is supposed 
    4749 * to do. 
    4850 */ 
    4951int32_t ClientSocket(const char  *serverName, const char *portNumber); 
    5052 
    51 /* TODO 
     53/*! TODO 
    5254 */ 
    5355int32_t  AcceptTCPConnection(int32_t servSock); 
    5456 
    55 /* TODO 
     57/*! TODO 
    5658 */ 
    5759int32_t CreateTCPServerSocket(uint16_t port); 
    5860 
    59 /* TODO 
     61/*! TODO 
    6062 */ 
    6163int32_t InitializeTCPServerPort(int32_t servSock);