Changeset 183

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

Implemented a remote component information struct in containers that can be used
to represent either the shell or the SML.

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

Legend:

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

    r182 r183  
    134134 
    135135 
    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  * 
    140  * TODO pretty sure this guy is wholly unnecessary... should be using standard 
    141  * TCP/IP structs like hostent.... 
    142  */ 
    143 struct SML_Info { 
    144     std::string hostname; 
    145     std::string port; 
    146     int32_t socketFD; 
    147 }; 
    148  
    149  
    150136/* Policy Engine class declaration.  All public functions are inherited from 
    151137 * parent classes. 
     
    193179 
    194180 
    195         /* Contains information regarding the presence of a service management 
    196          * layer.  If this pointer is NULL, then there is no SML present in the 
    197          * radio system. 
    198          */ 
    199         struct SML_Info *SML; 
     181        /* The RemoteComponent struct represents either the VTCROSS shell or the 
     182         * VTCROSS SML.  If 'SML_present' is false, it is the former. Otherwise, 
     183         * it is the latter. 
     184         */ 
     185        bool SML_present; 
     186        struct RemoteComponent *control; 
    200187}; 
    201188 
  • vtcross/trunk/src/include/vtcross/containers.h

    r173 r183  
    1313 
    1414 
     15#include <netdb.h> 
    1516#include <stdint.h> 
    1617#include <string> 
     
    7677}; 
    7778 
     79 
     80/* Contains information regarding a remote component in a VTCROSS system.  Note 
     81 * that this information is independent of component type, but technically will 
     82 * only ever be the SML or shell. 
     83 */ 
     84struct RemoteComponent { 
     85    struct hostent *server; 
     86    std::string serverName; 
     87    std::string serverPort; 
     88    int32_t socketFD; 
     89}; 
     90 
    7891#endif