Changes between Initial Version and Version 1 of Cross/ServiceManagementLayerAPI

Show
Ignore:
Timestamp:
04/10/09 16:39:44 (15 years ago)
Author:
trnewman
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Cross/ServiceManagementLayerAPI

    v1 v1  
     1= Service Management Layer = 
     2[[Image(cross_msl.png)]] 
     3 
     4== Communication Protocol == 
     5As with each of the VT-CROSS components, the communication protocol between components must adhere to a specific standard.  The following sections detail the major SML functions and the communication protocol needed to work with it. 
     6 
     7=== Registration with Cognitive Radio Shell === 
     8In order for the system to know that an SML is available, the SML must register itself with the Cognitive Radio Shell.  This process is usually performed immediately after the SML successfully connects to the Cognitive Radio Shell.  The process is as follows: 
     9 
     10 1. SML connects to the Cognitive Radio Shell's dedicated primary port. 
     11 2. SML sends ''"register_sml"'' command to the Cognitive Radio Shell. 
     12 3. SML waits for ''"register_ack"'' response from the Cognitive Radio Shell to acknowledge receipt of registration request. 
     13 
     14[[Image(sml_registration.png)]] 
     15 
     16 
     17=== Cognitive Engine Registration === 
     18If a Service Management Layer component is active, Cognitive Engine will connect directly to the SML.  In these cases, the Cognitive Engine registration process informs the SML of the available Cognitive Engine services in addition to performing the standard Cognitive Engine registration process with the Cognitive Radio shell.  The SML must pass the standard Cognitive Engine registration information between the CE component and the Shell component.  The process is as follows: 
     19 
     20 1. Cognitive Engine connects to the SML dedicated Cognitive Engine port. 
     21 2. Cognitive Engine sends ''"register_engine_cognitive"'' command to the SML. 
     22 3. SML sends ''"register_engine_cognitive"'' command to the Cognitive Radio Shell. 
     23 4. Cognitive Radio Shell sends a ''"receive_register_ack"'' response to the SML. 
     24 5. SML sends a ''"receive_register_ack"'' response to the Cognitive Engine. 
     25 6. Cognitive Radio Shell sends the [wiki:Cross/RadioConfigurationData Radio Configuration data] to the SML. 
     26 7. SML sends the [wiki:Cross/RadioConfigurationData Radio Configuration data] to the Cognitive Engine. 
     27 8. Cognitive Engine sends ''"receive_config_ack"'' response to the SML. 
     28 9. SML sends ''"receive_config_ack"'' response to the Cognitive Radio Shell. 
     29 10. Cognitive Radio Shell sends the local cache of [wiki:Cross/RadioExperienceData Radio Experience data] to the SML. 
     30 11. SML sends the local cache of [wiki:Cross/RadioExperienceData Radio Experience data] to the Cognitive Engine. 
     31 12. Cognitive Engine sends ''"receive_exp_ack"'' response to the SML. 
     32 13. SML sends ''"receive_exp_ack"'' response to the Cognitive Radio Shell. 
     33 14. Cognitive Engine sends ''"register_service"'' to the SML. 
     34 15. Cognitive Engine sends ''"service_name"'' to the SML, where service_name depends on the service that the CE is offering. 
     35 16. SML sends ''"receive_service_ack"'' to the Cognitive Engine. 
     36 17. Process loops back to 14. and continues to loop until CE has no more services to register. 
     37 
     38[[Image(ce_sml_registration.png)]] 
     39 
     40 
     41At this point the Cognitive Engine is now completely registered and may begin to accept optimization requests from the host application. 
     42 
     43=== Policy Engine Registration === 
     44If a Service Management Layer component is active, Cognitive Engine will connect directly to the SML.  In these cases, the Cognitive Engine registration process informs the SML of the available Cognitive Engine services in addition to performing the standard Cognitive Engine registration process with the Cognitive Radio shell.  The SML must pass the standard Cognitive Engine registration information between the CE component and the Shell component.  The process is as follows: 
     45 
     46 1. Policy Engine connects to the SML dedicated Policy Engine port. 
     47 2. Policy Engine sends ''"register_engine_policy"'' command to the SML. 
     48 3. SML sends ''"register_engine_policy"'' command to the Cognitive Radio Shell. 
     49 4. Cognitive Radio Shell sends a ''"receive_register_ack"'' response to the SML. 
     50 5. SML sends a ''"receive_register_ack"'' response to the Policy Engine. 
     51 6. Policy Engine sends ''"register_service"'' to the SML. 
     52 7. Policy Engine sends ''"service_name"'' to the SML, where service_name depends on the service that the PE is offering. 
     53 8. SML sends ''"receive_service_ack"'' to the Policy Engine. 
     54 9. Process loops back to 14. and continues to loop until PE has no more services to register. 
     55 
     56[[Image(pe_sml_registration.png)]] 
     57 
     58At this point the Policy Engine is now completely registered and may begin to validation transmission parameters against policies. 
     59 
     60=== Setting Active Mission === 
     61The services executed through requests to the Cognitive Engines are determined by the current Active Mission.  The Active Mission is set by the host application through the Cognitive Radio API.  The protocol is as follows:   
     62 
     63 1. The Host Application sends a request to set the active mission to a specific mission is sent to the Cognitive Radio Shell. 
     64 2. Cognitive Radio Shell sends ''"set_active"'' followed by ''"missionID"'', where missionID is the specific mission identification number as defined in the SML configuration file. 
     65 3. SML sends ''"receive_mission_ack"'' to Cognitive Radio Shell. 
     66 4. Cognitive Radio Shell sends ''"receive_mission_ack"'' to the Host Application. 
     67 5. SML sets active mission which in turn sets the active set of services to execute when an optimization request comes in. 
     68 
     69[[Image(set_mission_sml.png)]] 
     70 
     71=== Cognitive Engine Parameter Optimization with Services === 
     72If the VT-CROSS system has an active SML present, the optimization done by the Cognitive Engines will be performed according to the ordered services that correspond to the current Active Mission as defined in the SML configuration.  The process begins with an optimization request from the Host Application through the Cognitive Radio API.  The request triggers the SML to make requests to the cognitive engines to perform specific services until all the services for the corresponding active mission are completed.  The process is as follows: 
     73 
     74 1. The Host Application sends a request for optimization along with the current observable parameters to the Cognitive Radio Shell through the Cognitive Radio API. 
     75 2. The Cognitive Radio Shell sends ''"request_optimization"'' to the SML. 
     76 3. The Cognitive Radio Shell sends each observable parameter to the SML, in the following format: 
     77    a. ''"observable_name"'' 
     78    b. ''"observable_value"'' 
     79 4. For each service in the Active Missions list, the SML determines the corresponding Cognitive Engine and sends the following: 
     80    a. ''"request_optimization_service"'' 
     81    b. ''"service_name"'' where service_name is the actual name of the service to be used. 
     82    c. ''"observable_name"'' 
     83    d. ''"observable_value"'' 
     84    e. Loop back to c. until all observables have been passed. 
     85 5. The Cognitive Engine responds with a set of transmission parameters and their values in the following format: 
     86    a. ''"parameter_name"'' 
     87    b. ''"parameter_value"'' 
     88 6. These parameters and their values are passed onto the Cognitive Radio Shell and back to the Host Application. 
     89 7. This process loops back to 4. until all the services have been completed. 
     90 
     91[[Image(optimize.png)]] 
     92 
     93This figure shows and example process of a mission oriented service-based optimization process.  The example shows two services being executed using two cognitive engines.  They are executed sequentially, with the first service being executed and transmission parameters sent to the host application, followed by the second service being executed and sending the transmission parameters to the host application. 
     94 
     95== Public Member Functions == 
     96'''Constructors / Destructors'''        
     97{{{ 
     98#!cpp 
     99ServiceManagementLayer(); 
     100}}} 
     101 
     102{{{ 
     103#!cpp 
     104~ServiceManagementLayer(); 
     105}}} 
     106 
     107{{{ 
     108#!cpp 
     109void ConnectToShell(const char* serverName, const char* serverPort); 
     110}}} 
     111 
     112'''Inherited from abstract base class Component''' 
     113{{{ 
     114#!cpp 
     115void SendComponentType(); 
     116}}} 
     117 
     118{{{ 
     119#!cpp 
     120void WaitForSignal(); 
     121}}} 
     122 
     123 
     124{{{ 
     125#!cpp 
     126void Shutdown(); 
     127}}} 
     128 
     129{{{ 
     130#!cpp 
     131void Reset(); 
     132}}} 
     133 
     134{{{ 
     135#!cpp 
     136void RegisterComponent(); 
     137}}} 
     138 
     139{{{ 
     140#!cpp 
     141void DeregisterComponent(); 
     142}}} 
     143 
     144 
     145=== Private Member Functions === 
     146 
     147{{{ 
     148#!cpp 
     149void TransferRadioConfiguration(); 
     150}}} 
     151  Forwards the current Radio Configuration information to the component that requested it. 
     152 
     153{{{ 
     154#!cpp 
     155void TransferExperience(); 
     156}}} 
     157  Transfers the local experience cache from the Cognitive Radio Shell to the component that requested it. 
     158 
     159{{{ 
     160#!cpp 
     161void ReceiveServices(); 
     162}}}     
     163  Queries all connected components for their available services. 
     164 
     165{{{ 
     166#!cpp 
     167void SetActiveMission(); 
     168}}} 
     169  Sets the current operating mission of the Service Management Layer.  This will dictate the services from the connected components that are invoked when the Cognitive Radio is triggered for a request for optimal parameters. 
     170 
     171{{{ 
     172#!cpp 
     173void ListServices(); 
     174}}}       
     175  Prints the current available services and the associated components. 
     176 
     177{{{ 
     178#!cpp 
     179void ReloadConfiguration(); 
     180}}} 
     181  Reloads the SML configuration file into the system. 
     182 
     183{{{ 
     184#!cpp 
     185void LoadConfiguration(); 
     186}}} 
     187  Loads the SML configutation file into the system.