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