Show
Ignore:
Timestamp:
06/16/09 16:12:04 (15 years ago)
Author:
wrodgers
Message:

updating SML demo

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

Legend:

Unmodified
Added
Removed
  • vtcross/trunk/src/service_management_layer/ServiceManagementLayer.cpp

    r282 r285  
    133133//Also, their sizes are hardcoded into the code in various places; a fix for a future version. 
    134134ServiceManagementLayer::ServiceManagementLayer(const char* SML_Config, \ 
    135         const char* serverName, const char* serverPort) 
     135        const char* serverName, const char* serverPort, int16_t clientPort) 
    136136{ 
    137137    LOG("Creating Service Management Layer.\n"); 
    138138    _SML_Config = SML_Config; 
     139    SMLport = clientPort; 
    139140 
    140141    ConnectToShell(serverName, serverPort); 
     
    588589            break; 
    589590    } 
     591 
     592    LOG("ServiceManagementLayer:: Received Set Active Mission command: %i\n",missID); 
    590593    //For each service in the mission 
    591594    for(int i = 0; i < miss[activeMission].numServices; i++) 
     
    620623        //Nothing to be done for conditionals at this stage 
    621624    } 
    622  
     625  
     626    SendMessage(shellSocketFD, "ack"); 
    623627 
    624628    //printf("\nhere ---%d, %d---\n", miss[activeMission].services[0].componentID, miss[activeMission].services[1].componentID); 
     
    12781282    fd_set sockSet, shellSet; 
    12791283 
    1280     cogEngSrv = CreateTCPServerSocket(2044); 
     1284    cogEngSrv = CreateTCPServerSocket(SMLport); 
    12811285    int32_t maxDescriptor = cogEngSrv; 
    12821286 
  • vtcross/trunk/src/service_management_layer/sml_demo.cpp

    r279 r285  
    5050 
    5151 
    52     if(argc < 3) 
    53        ERROR(1, "Usage: %s config hostname port\n", argv[0]); 
     52    if(argc < 5) 
     53       ERROR(1, "Usage: %s config hostname shell_port client_port\n", argv[0]); 
    5454  
    55     ServiceManagementLayer SML(argv[1], argv[2], argv[3]); 
     55    ServiceManagementLayer SML(argv[1], argv[2], argv[3], atoi(argv[4])); 
    5656    SML.StartSMLServer();      
    5757}