Show
Ignore:
Timestamp:
03/22/09 00:38:35 (15 years ago)
Author:
bhilburn
Message:

Implemented a more standard way of registering/deregistering components and
engines.

Files:
1 modified

Legend:

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

    r173 r181  
    6565 * inherit (e.g. cognitive and policy engines). Inherits all functions from the 
    6666 * ABC Component publically. 
     67 * 
     68 * TODO perhaps this shouldn't be an abstract base class? Some functions, like 
     69 * GetRemoteComponentType, are going to be the same for all child classes 
     70 * anyways... 
    6771 */ 
    6872class Engine : public Component 
     
    130134 
    131135 
     136/* Contains information regarding the SML in a VTCROSS system.  Note that if 
     137 * there is no SML present, the engine should have no instantiation of this 
     138 * struct. 
     139 */ 
     140struct SML_Info { 
     141    std::string hostname; 
     142    std::string port; 
     143    int32_t socketFD; 
     144}; 
     145 
     146 
    132147/* Policy Engine class declaration.  All public functions are inherited from 
    133148 * parent classes. 
     
    138153        PolicyEngine(); 
    139154        ~PolicyEngine(); 
     155 
     156 
     157        /* Overloaded constructor that creates a policy engine object with SML 
     158         * information pre-defined. 
     159         */ 
     160        PolicyEngine(const char* serverName, const char* portNumber); 
    140161 
    141162        void GetRemoteComponentType(int32_t socketFD); 
     
    167188        void ValidateParameters(struct Parameter pList[], \ 
    168189                struct CE_Info *ce_info, int decision_array[]); 
     190 
     191 
     192        /* Contains information regarding the presence of a service management 
     193         * layer.  If this pointer is NULL, then there is no SML present in the 
     194         * radio system. 
     195         */ 
     196        struct SML_Info *SML; 
    169197}; 
    170198 
     
    219247        void ReceiveFeedback(Observable *observables, \ 
    220248                Parameter *parameters, std::string service); 
     249 
     250 
     251        /* Contains information regarding the presence of a service management 
     252         * layer.  If this pointer is NULL, then there is no SML present in the 
     253         * radio system. 
     254         */ 
     255        struct SML_Info *SML; 
     256 
    221257}; 
    222258