[101] | 1 | /* Virginia Tech Cognitive Radio Open Source Systems |
---|
| 2 | * Virginia Tech, 2009 |
---|
| 3 | * |
---|
| 4 | * LICENSE INFORMATION GOES HERE |
---|
[102] | 5 | */ |
---|
| 6 | |
---|
| 7 | /* |
---|
[101] | 8 | * This header exports the declarations for all VT-CROSS radio components. It |
---|
| 9 | * contains two pure abstract base classes, Component and Engine; Engine derives |
---|
| 10 | * from Component. All functions contained within the abstract base classes are |
---|
| 11 | * dynamically linked via the 'virtual' keyword, and all child non-abstract |
---|
| 12 | * classes derive using private inheritence. Class functions of the abstract |
---|
| 13 | * base classes are public for two reasons: (1) To allow for public/protected |
---|
| 14 | * inheritence in other implementations, (2) So that symbolic debuggers can |
---|
| 15 | * navigate the call tree for typecasted objects of derivative classes. |
---|
| 16 | */ |
---|
| 17 | |
---|
[102] | 18 | #include "containers.h" |
---|
| 19 | |
---|
[101] | 20 | class Component |
---|
| 21 | { |
---|
| 22 | public: |
---|
| 23 | virtual void GetRemoteComponentType() = 0; |
---|
| 24 | virtual void WaitForSignal() = 0; |
---|
| 25 | virtual void Shutdown() = 0; |
---|
| 26 | virtual void Reset() = 0; |
---|
| 27 | virtual void RegisterComponent(socketFD, compType) = 0; |
---|
| 28 | virtual void DeregisterComponent() = 0; |
---|
| 29 | }; |
---|
| 30 | |
---|
| 31 | |
---|
| 32 | class Engine : public Component |
---|
| 33 | { |
---|
| 34 | public: |
---|
| 35 | virtual void RegisterServices() = 0; |
---|
| 36 | virtual void DeregisterServices() = 0; |
---|
| 37 | }; |
---|
| 38 | |
---|
| 39 | |
---|
| 40 | class ServiceManagementLayer : private Component |
---|
| 41 | { |
---|
| 42 | private: |
---|
| 43 | void TransferRadioConfiguration(); |
---|
| 44 | void TransferExperience(); |
---|
| 45 | void ReceiveServices(); |
---|
| 46 | void SetActiveMission(); |
---|
| 47 | void ListServices(); |
---|
| 48 | void ReloadConfiguration(); |
---|
| 49 | void LoadConfiguration(); |
---|
| 50 | }; |
---|
| 51 | |
---|
| 52 | |
---|
| 53 | class PolicyEngine : private Engine |
---|
| 54 | { |
---|
| 55 | private: |
---|
| 56 | void ReloadPolicies(); |
---|
| 57 | void LoadPolicies(); |
---|
| 58 | void ValidateParameters(); |
---|
| 59 | }; |
---|
| 60 | |
---|
| 61 | |
---|
| 62 | class CognitiveEngine : private Engine |
---|
| 63 | { |
---|
| 64 | private: |
---|
| 65 | void ReceiveRadioConfiguration(); |
---|
| 66 | void ReceiveExperience(); |
---|
| 67 | void GetSolution(observables); |
---|
| 68 | void GetSolution(observables, service); |
---|
| 69 | void ReceiveFeedback(observables, parameters, utilities); |
---|
| 70 | void ReceiveFeedback(observables, parameters, service); |
---|
| 71 | }; |
---|
| 72 | |
---|