Changeset 170

Show
Ignore:
Timestamp:
03/21/09 17:06:43 (15 years ago)
Author:
bhilburn
Message:

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

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

Legend:

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

    r161 r170  
    22// Case-based reasoner 
    33// 
     4// 
     5// TODO REDO THIS FILE 
    46 
    57#ifndef CBR_H 
  • vtcross/trunk/src/include/vtcross/components.h

    r161 r170  
    2424 
    2525 
     26/* Component abstract base class that all component classes should inherit from, 
     27 * including cognitive and policy engines, and the service management layer. 
     28 * Defines only functions required by all component types. 
     29 */ 
    2630class Component 
    2731{ 
    2832    public: 
     33        /* Asks the component at the passed socket FD for its component type 
     34         * string. 
     35         */ 
    2936        virtual void GetRemoteComponentType(int32_t socketFD) = 0; 
     37 
     38 
     39        /* Wait for a command signal containing task instructions. 
     40         */ 
    3041        virtual void WaitForSignal(int32_t socketFD) = 0; 
     42 
     43 
     44        /* Completely shutdown the radio and all operations. 
     45         */ 
    3146        virtual void Shutdown() = 0; 
     47 
     48 
     49        /* Reset the radio and reload all configuration files. 
     50         * 
     51         * TODO are we remembering experiences in CEs? 
     52         */ 
    3253        virtual void Reset() = 0; 
     54 
     55 
     56        /* Register or deregister a component with the primary radio shell. 
     57         */ 
    3358        virtual void RegisterComponent(int32_t socketFD) = 0; 
    3459        virtual void DeregisterComponent(int32_t socketFD) = 0; 
     
    3661 
    3762 
     63/* Engine abstract base class from which all engine component types should 
     64 * inherit (e.g. cognitive and policy engines). Inherits all functions from the 
     65 * ABC Component publically. 
     66 */ 
    3867class Engine : public Component 
    3968{ 
    4069    public: 
     70        /* Register or deregister services that this engine provides with the 
     71         * service management layer. 
     72         */ 
    4173        virtual void RegisterServices(int32_t socketFD) = 0; 
    4274        virtual void DeregisterServices(int32_t socketFD) = 0; 
     
    4476 
    4577 
     78/* Service Management Layer (SML) class declaration.  The functions listed here 
     79 * are required by the VTCROSS API for service-oriented VTCROSS radio 
     80 * architectures. 
     81 */ 
    4682class ServiceManagementLayer : public Component 
    4783{ 
     
    5894 
    5995    private:  
     96        /* Receive the radio configuration settings from the shell and pass them 
     97         * on to another component. 
     98         */ 
    6099        void TransferRadioConfiguration(); 
     100 
     101         
     102        /* Receive information regarding a completed 'experience' and pass it on 
     103         * to the appropriate cognitive engine. 
     104         */ 
    61105        void TransferExperience(); 
     106 
     107         
     108        /* Listen for other components registering their available services with 
     109         * the SML. */ 
    62110        void ReceiveServices(); 
     111 
     112 
     113        /* Change the active mission of the radio to a new one and adjust radio 
     114         * behavoir appropriately. 
     115         */ 
    63116        void SetActiveMission(); 
     117 
     118 
     119        /* List all services provided to the radio by registered components. 
     120         */ 
    64121        void ListServices(); 
     122 
     123 
     124        /* Load/Relead the XML configuration file.  
     125         */ 
    65126        void ReloadConfiguration(); 
    66127        void LoadConfiguration(); 
     
    68129 
    69130 
     131/* Policy Engine class declaration.  All public functions are inherited from 
     132 * parent classes. 
     133 */ 
    70134class PolicyEngine : public Engine 
    71135{ 
     
    85149 
    86150    private: 
     151        /* Parse and load/reload policies into the policy engine. 
     152         */ 
    87153        void LoadPolicies(); 
    88154        void ReloadPolicies(); 
     155 
     156         
     157        /* Return a decision made by the policy engine regarding a certain set 
     158         * of transmission parameters. 
     159         */ 
    89160        void SendPEDecision(int32_t socketFD, struct Parameter pList[], \ 
    90161                struct CE_Info *ce_info, int32_t decision_array[]); 
     162 
     163 
     164        /* Validate a set of transmission parameters received from the radio. 
     165         */ 
    91166        void ValidateParameters(struct Parameter pList[], \ 
    92167                struct CE_Info *ce_info, int decision_array[]); 
     
    94169 
    95170 
     171/* Cognitive Engine class declaration.  All public functions are inherited from 
     172 * parent classes. 
     173 */ 
    96174class CognitiveEngine : public Engine 
    97175{ 
     
    111189 
    112190    private: 
     191        /* Receive the transmitted radio configuration from the radio itself 
     192         * (the CE will not always be local to the radio). 
     193         */ 
    113194        void ReceiveRadioConfiguration(int32_t socketFD); 
     195 
     196 
     197        /* Receive an 'experience' report from the radio. 
     198         */ 
    114199        void ReceiveExperience(int32_t socketFD); 
     200 
     201 
     202        /* Find the most optimal set of transmission parameters given certain 
     203         * observables and possibly a service if the SML component is present 
     204         * and active. 
     205         */ 
    115206        void GetSolution(Observable *observables); 
    116207        void GetSolution(Observable *observables, std::string service); 
     208 
     209 
     210        /* Receive a feedback from the radio regarding the performance of a 
     211         * certain set of parameters, possibly associated with a service. 
     212         * 
     213         * TODO what is the difference between experiences and feedback, 
     214         * exactly? we should explain that explicitly here. 
     215         */ 
    117216        void ReceiveFeedback(Observable *observables,\ 
    118217                Parameter *parameters, Utility *utilities); 
  • vtcross/trunk/src/include/vtcross/containers.h

    r165 r170  
    1717 
    1818 
     19/* TODO initially made all of the string fields std::strings, but this might not 
     20 * be the best end-decision. Need to evaluate our needs and figure out if 
     21 * cstrings would do better for us. */ 
     22 
     23 
     24/* TODO 
     25 * 
     26 */ 
    1927struct CE_Info { 
    2028    uint32_t numUtilities; 
     
    2634}; 
    2735 
     36 
     37/* TODO 
     38 * 
     39 */ 
    2840struct Utility { 
    2941    std::string name; 
     
    3446}; 
    3547 
     48 
     49/* TODO 
     50 * 
     51 */ 
    3652struct Affect { 
    3753    Utility *u; 
     
    3955}; 
    4056 
     57 
     58/* TODO 
     59 * 
     60 */ 
    4161struct Parameter { 
    4262    std::string name; 
     
    5070}; 
    5171 
     72 
     73/* TODO 
     74 * 
     75 */ 
    5276struct Observable { 
    5377    std::string name; 
  • vtcross/trunk/src/include/vtcross/libvtcross.h

    r161 r170  
    3333bool ParseRadioConfiguration(); 
    3434 
     35 
    3536/* Lists current radio configuration options loaded from the configuration XML 
    3637 * file.  
     
    4041 */ 
    4142void ListCurrentRadioConfiguration(); 
     43 
    4244 
    4345/* View data from the current status of the radio.  
     
    5254Utilities* GetRadioUtilities(); 
    5355 
     56 
    5457/* View components currently connected to the radio by id.  
    5558 * 
     
    6265uint32_t* GetConnectedComponents(); 
    6366 
     67 
    6468/* Look up component information by id.  
    6569 * 
     
    6872 */ 
    6973Component* GetComponentInformation(uint32_t id); 
     74 
    7075 
    7176/* Given a certain set of observables, ask the radio to find the optimum radio 
     
    7782Parameters* GetOptimalParameters(Observables *radioObservables); 
    7883 
     84 
    7985/* Update the radio regarding its performance for a certain set of transmission 
    8086 * parameters, observables, and utilities. 
     
    8591bool UpdateParameterPerformance(Parameters *radioParameters, \ 
    8692        Observables *radioObservables, Utilies *radioUtilies); 
     93 
    8794 
    8895/* Deactivate/Activate/Disconnect a component by id. 
     
    102109bool DisconnectSML(uint32_t id); 
    103110 
     111 
    104112/* Shut down the radio. 
    105113 * 
  • vtcross/trunk/src/include/vtcross/socketcomm.h

    r161 r170  
    1414 
    1515 
     16/* TODO 
     17 */ 
    1618void ReadMessage(int32_t socketFD, char* msgBuffer); 
     19 
     20 
     21/* TODO 
     22 */ 
    1723int32_t ClientSocket(char* serverName, char* portNumber); 
     24 
     25 
     26/* TODO 
     27 */ 
    1828int32_t SendMessage(int32_t socketFD, char* message); 
     29 
     30 
     31/* TODO 
     32 */ 
    1933int32_t GetParameter(int32_t socketFD, struct Parameter pList[], \ 
    2034        struct CE_Info *ce_info); 
     35 
     36 
     37/* TODO 
     38 */ 
    2139int32_t GetRequest(int32_t socketFD, struct Parameter pList[], \ 
    2240        struct CE_Info *ce_info);