Changeset 518 for vtcross/trunk/src/include/vtcross/components.h
- Timestamp:
- 11/13/09 15:37:02 (14 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
vtcross/trunk/src/include/vtcross/components.h
r465 r518 15 15 */ 16 16 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. 25 26 * 26 27 * Note that any new component type declaration MUST include this header and … … 40 41 41 42 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, 43 46 * including cognitive and policy engines, and the service management layer. 44 47 * Defines only functions required by all component types. … … 47 50 { 48 51 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 50 55 * string. Note that this implementation is global for all component 51 56 * types, so is implemented here. Should a component need to override … … 63 68 } 64 69 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 66 73 * response to a GetRemoteComponentType query. 67 74 */ 68 75 virtual void SendComponentType() = 0; 69 76 70 /* Completely shutdown the radio and all operations. 71 */ 77 /*! \brief Shutdown the component. */ 72 78 virtual void Shutdown() = 0; 73 79 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. */ 78 81 virtual void Reset() = 0; 79 82 80 /* Register or deregister a component with the primary radio shell. 81 */ 83 /*! \brief Compenent registration procedures. */ 82 84 virtual void RegisterComponent() = 0; 83 85 virtual void DeregisterComponent() = 0; … … 85 87 86 88 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 88 92 * inherit (e.g. cognitive and policy engines). Inherits all functions from the 89 93 * ABC Component publically. … … 92 96 { 93 97 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 96 102 * bool, this function will also register the component or services. 97 103 * 98 104 * TODO I feel like the name of this function could be changed to be a 99 * little more descriptive? 100 */ 105 * little more descriptive? */ 101 106 virtual void ConnectToRemoteComponent(const char* serverName, \ 102 107 const char* serverPort, const bool SML) = 0; 103 108 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. */ 106 115 virtual void WaitForSignal() = 0; 107 116 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. */ 111 121 virtual void RegisterServices() = 0; 112 122 virtual void DeregisterServices() = 0;