Changeset 268

Show
Ignore:
Timestamp:
05/29/09 17:15:15 (15 years ago)
Author:
wrodgers
Message:

Minor changes to support SML.

Location:
vtcross/trunk/src
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • vtcross/trunk/src/cognitive_engines/CognitiveEngine.cpp

    r255 r268  
    2525#include "cbr.c" 
    2626 
    27 #include <sqlite3.h> 
    28 #include <sqlite3ext.h> 
     27#include "sqlite3.h" 
     28#include "sqlite3ext.h" 
    2929 
    3030 
  • vtcross/trunk/src/include/vtcross/components.h

    r255 r268  
    5757        /* Wait for a command signal containing task instructions. 
    5858         */ 
    59         virtual void WaitForSignal() = 0; 
     59        //virtual void WaitForSignal() = 0; 
    6060 
    6161        /* Completely shutdown the radio and all operations. 
     
    9797         */ 
    9898        virtual void RegisterServices() = 0; 
    99         virtual void DeregisterServices() = 0; 
     99        //virtual void DeregisterServices() = 0; 
    100100}; 
    101101 
     
    114114         * shell with the passed hostname and port. 
    115115         */ 
    116         ServiceManagementLayer(const char* serverName, const char* serverPort); 
     116        ServiceManagementLayer(const char* SML_Config, const char* serverName, const char* serverPort); 
    117117 
    118118        /* Connect and register with the shell component at the passed hostname 
     
    122122                const char* serverPort); 
    123123        void SendComponentType(); 
    124         void ShellSignalHandler(); 
    125         void CESignalHandler(int32_t ID); 
     124        void MessageHandler(int32_t ID); 
    126125        void Shutdown(); 
    127126        void Reset(); 
     
    129128        void DeregisterComponent(); 
    130129 
     130        /* Starts the SML Server and watches it for incoming messages 
     131         */ 
     132        void StartSMLServer(); 
     133 
    131134    private:  
    132135        /* Receive the radio configuration settings from the shell and pass them 
     
    161164         */ 
    162165        void ReloadConfiguration(); 
    163         void LoadConfiguration(); 
     166        void LoadConfiguration(const char *SML_Config, Mission* &mList); 
    164167 
    165168        /* Create and initialize the DB to hold the services 
     
    167170        void CreateServicesDB(); 
    168171 
    169         /* Starts the SML Server and watches it for incoming messages 
    170          */ 
    171         void StartSMLServer(); 
     172        void PerformActiveMission(); 
     173        void TransactData(int32_t sourceID, int32_t destID); 
     174 
    172175 
    173176        /* The socket file descriptor information for the shell which this SML 
     
    180183        uint16_t numberOfCognitiveEngines; 
    181184        uint32_t Current_ID;  
     185        Mission *miss; 
    182186        bool CE_Present; 
     187        int32_t activeMission; 
    183188}; 
    184189 
     
    262267 
    263268        void RegisterServices(); 
    264         void DeregisterServices(); 
     269        //void DeregisterServices(); 
    265270 
    266271    private: 
     
    343348         
    344349        /* Start all the socket servers */ 
    345         void StartShellServer(); 
     350        void StartShellServer();  
    346351 
    347352        int32_t LoadRadioConfiguration(const char* radioConfig, Parameter* &pList, \ 
  • vtcross/trunk/src/include/vtcross/containers.h

    r255 r268  
    8383struct Service { 
    8484    std::string name; 
    85     uint16_t socketFD; 
     85    int32_t socketFD; 
     86    int32_t componentID; 
     87    uint16_t num_conds; 
     88    bool cond_flag; 
     89    std::string input[3]; 
     90    std::string output[3]; 
    8691};  
    8792 
     
    95100    uint32_t numServices; 
    96101    Service *services; 
     102    std::string input[3]; 
     103    std::string output[3]; 
    97104}; 
    98105 
     
    101108struct CE_Reg { 
    102109    int32_t ID_num; 
    103     sockaddr_in *sock_ptr; 
    104     socklen_t sock_len; 
     110    //sockaddr_in *sock_ptr; 
     111    //socklen_t sock_len; 
     112    int32_t FD; 
    105113}; 
    106114