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 | #ifndef CONTAINERS_H |
---|
18 | #define CONTAINERS_H |
---|
19 | |
---|
20 | |
---|
21 | #include <stdint.h> |
---|
22 | |
---|
23 | #include "containers.h" |
---|
24 | |
---|
25 | |
---|
26 | class Component |
---|
27 | { |
---|
28 | public: |
---|
29 | virtual void GetRemoteComponentType(int32_t socketFD) = 0; |
---|
30 | virtual void WaitForSignal(int32_t socketFD) = 0; |
---|
31 | virtual void Shutdown() = 0; |
---|
32 | virtual void Reset() = 0; |
---|
33 | virtual void RegisterComponent(int32_t socketFD, char* compType) = 0; |
---|
34 | virtual void DeregisterComponent(int32_t socketFD) = 0; |
---|
35 | }; |
---|
36 | |
---|
37 | |
---|
38 | class Engine : public Component |
---|
39 | { |
---|
40 | public: |
---|
41 | virtual void RegisterServices(int32_t socketFD) = 0; |
---|
42 | virtual void DeregisterServices(int32_t socketFD) = 0; |
---|
43 | }; |
---|
44 | |
---|
45 | |
---|
46 | class ServiceManagementLayer : private Component |
---|
47 | { |
---|
48 | private: |
---|
49 | void TransferRadioConfiguration(); |
---|
50 | void TransferExperience(); |
---|
51 | void ReceiveServices(); |
---|
52 | void SetActiveMission(); |
---|
53 | void ListServices(); |
---|
54 | void ReloadConfiguration(); |
---|
55 | void LoadConfiguration(); |
---|
56 | }; |
---|
57 | |
---|
58 | |
---|
59 | class PolicyEngine : private Engine |
---|
60 | { |
---|
61 | private: |
---|
62 | void ReloadPolicies(); |
---|
63 | void LoadPolicies(); |
---|
64 | void ValidateParameters(); |
---|
65 | }; |
---|
66 | |
---|
67 | |
---|
68 | class CognitiveEngine : private Engine |
---|
69 | { |
---|
70 | private: |
---|
71 | void ReceiveRadioConfiguration(int32_t socketFD); |
---|
72 | void ReceiveExperience(int32_t socketFD); |
---|
73 | void GetSolution(Observable *observables); |
---|
74 | void GetSolution(Observable *observables, string service); |
---|
75 | void ReceiveFeedback(Observable *observables, Parameter *parameters, Utility *utilities); |
---|
76 | void ReceiveFeedback(Observable *observables, Parameter *parameters, string service); |
---|
77 | }; |
---|
78 | |
---|
79 | #endif |
---|