Cross/CognitiveEngineAPI

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

CognitiveEngine();
~CognitiveEngine();

Inherited from abstract base class Component

void SendComponentType();
void WaitForSignal();
void Shutdown();
void Reset();
void RegisterComponent();
void DeregisterComponent();

Inherited from abstract base class Engine

void ConnectToRemoteComponent(const char* serverName, const char* serverPort, const bool SML);
void RegisterServices();
void DeregisterServices();

Private Member Functions

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.

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
void GetSolution(Observable *observables);
void GetSolution(Observable *observables, std::string service);

void ReceiveFeedback(Observable *observables,Parameter *parameters, Utility *utilities);
void ReceiveFeedback(Observable *observables, Parameter *parameters, std::string service);