= Cognitive Radio API = == Cognitive Engine == The Cognitive Engine is the component that does the bulk of the work in the system. It provides the transmission parameter optimization capabilities. Typically this is done using some sort of Artificial Intelligence technique. The Cognitive Engine component connects directly to either the Cognitive Radio Shell or a Management Service Layer component. Depending on the connected component, the communication protocol for the Cognitive Engine changes slightly. === Public Member Functions === '''Constructors / Destructors''' {{{ #!cpp CognitiveEngine(); }}} {{{ #!cpp ~CognitiveEngine(); }}} '''Inherited from abstract base class Component''' {{{ #!cpp void SendComponentType(); }}} {{{ #!cpp void WaitForSignal(); }}} {{{ #!cpp void Shutdown(); }}} {{{ #!cpp void Reset(); }}} {{{ #!cpp void RegisterComponent(); }}} {{{ #!cpp void DeregisterComponent(); }}} '''Inherited from abstract base class Engine''' {{{ #!cpp void ConnectToRemoteComponent(const char* serverName, const char* serverPort, const bool SML); }}} {{{ #!cpp void RegisterServices(); }}} {{{ #!cpp void DeregisterServices(); }}} === Private Member Functions === {{{ #!cpp bool ReceiveRadioConfiguration(int socketFD) }}} Block until parameters are received Expects radio configuration data in ASCII character format in the following order: * Number of utilities * name * units * goal : min/max/meet * target * * weight * Number of parameters * name * units * min * max * step * Number of affects * name * relation * Number of observables * name * Number of affects * name * relation Once radio configuration is sucessfully received, the string "ack" is sent to acknowledge receipt. {{{ #!cpp bool ReceiveExperience(int socketFD) }}} Receive any available experience that the Cognitive Radio Shell has cached. Experience information is sent in ASCII character format in the following order: * experience size * experience * specific values of utils/observables/parameters {{{ #!cpp void GetSolution(Observable *observables); }}} {{{ #!cpp void GetSolution(Observable *observables, std::string service); }}} {{{ #!cpp void ReceiveFeedback(Observable *observables,Parameter *parameters, Utility *utilities); }}} {{{ #!cpp void ReceiveFeedback(Observable *observables, Parameter *parameters, std::string service); }}}