summaryrefslogtreecommitdiff
path: root/TAO/CIAO/tools/static_configurator/Static_Assembly.h
blob: 3b4c4e7d4f60ae409f7e461210aa335a1038b3fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
// -*- C++ -*-

//=============================================================================
/**
 *  @file    Static_Assembly.h
 *
 *  $Id$
 *
 *  This file contains structure definitions for static configuration
 *
 *  @author Venkita Subramonian <venkita@cs.wustl.edu>
 */
//=============================================================================

#ifndef CIAO_STATIC_ASSEMBLY_H
#define CIAO_STATIC_ASSEMBLY_H
#include /**/ "ace/pre.h"

#include "ace/config-all.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "../XML_Helpers/Assembly_Spec.h"
//#include "Deployment_Configuration.h"
#include "Container_Base.h"
#include "../XML_Helpers/RTConfigurationC.h"

namespace CIAO
{

namespace Static_Config
{

struct ContainerAttributes
{
  // idref to the name of RTPolicySet
  ACE_CString rtpolicyset_ref_;

  Components::Deployment::Container_var container_;

};

struct HomeAttributes
{
  ACE_CString id_;

  /// Specify the pathname to component executor DLL.
  ACE_TString executor_UUID_;

  /// Specify the entrypoint to component executor DLL.
  ACE_TString executor_entrypt_;

  ::CIAO::HomeFactory executor_fptr_;

  /// Specify the pathname to component servant DLL.
  ACE_TString servant_UUID_;

  /// Specify the entrypoint to component servant DLL.
  ACE_TString servant_entrypt_;

  ::CIAO::ServantFactory servant_fptr_;

  int containers_table_index_;

  Components::KeylessCCMHome_var home_;
};

struct ComponentAttributes
{
  ACE_CString id_;

  int component_registration_begin_index_;
  int component_registration_end_index_;
  int homes_table_index_;
};

struct ConnectionAttributes
{
  CIAO::Assembly_Connection::Connection_Type type_;
  ACE_CString id_;
  ACE_CString name_;
  int component_index_;
  int interface_index_;
  CIAO::Assembly_Connection::IF_Resolver_Info *component__;
  CIAO::Assembly_Connection::IF_Resolver_Info *interface_;
};

struct ResolveInfoAttributes
{
  CIAO::Assembly_Connection::IF_Resolution_Method resolver_type_;
  ACE_CString resolver_info_;
  int nested_resolver_index_;
  CIAO::Assembly_Connection::IF_Resolver_Info *nested_resolver_;
};

struct ThreadPoolAttributes
{
 ACE_CString       name_;
 unsigned long     stacksize_;
 unsigned long     static_threads_;
 unsigned long     dynamic_threads_;
 short             default_priority_;
 int               allow_request_buffering_;
 unsigned long     max_buffered_requests_;
 unsigned long     max_request_buffer_size_;
};

struct LaneAttributes
{
 short             lane_priority_;
 unsigned long     static_threads_;
 unsigned long     dynamic_threads_;
};

struct ThreadPoolLanesAttributes
{
 ACE_CString       name_;
 unsigned long     stacksize_;
 unsigned int      lane_begin_index_;
 unsigned int      lane_end_index_;
 int               allow_borrowing_;
 int               allow_request_buffering_;
 unsigned long     max_buffered_requests_;
 unsigned long     max_request_buffer_size_;
};

struct BandAttributes
{
 short low_;
 short high_;
};

struct PriorityBandsAttributes
{
 ACE_CString       name_;
 unsigned int      band_begin_index_;
 unsigned int      band_end_index_;
};

struct PolicyConfigAttributes
{
 CORBA::PolicyType      type_;
 ACE_CString            name_;
 RTCORBA::PriorityModel model_;
 RTCORBA::Priority      default_priority_;
};

struct PolicySetAttributes
{
 ACE_CString      name_;
 unsigned int     config_begin_index_;
 unsigned int     config_end_index_;
};

static const int MAX_CONTAINERS = 100;
static const int MAX_HOMES = 1000;
static const int MAX_COMPONENTS = 10000;
static const int MAX_COMPONENT_REGISTRATIONS = 30000;
static const int MAX_CONNECTIONS = 30000;
static const int MAX_THREADPOOLS = 1000;
static const int MAX_LANES = 1000;
static const int MAX_THREAD_POOL_LANES = 1000;
static const int MAX_BANDS = 1000;
static const int MAX_PRIORITY_BANDS = 1000;
static const int MAX_POLICY_CONFIGS = 1000;
static const int MAX_POLICY_SETS = 1000;

struct Static_Config_Info
{
  ContainerAttributes containers_table_[MAX_CONTAINERS];
  HomeAttributes homes_table_[MAX_HOMES];
  ComponentAttributes components_table_[MAX_COMPONENTS];
  CIAO::Assembly_Placement::componentinstantiation::Register_Info component_registrations_table_[MAX_COMPONENT_REGISTRATIONS];
  ConnectionAttributes connections_table_[MAX_CONNECTIONS];
  ResolveInfoAttributes resolvers_table_[MAX_CONNECTIONS];
  ThreadPoolAttributes      thread_pool_table_[MAX_THREADPOOLS];
  LaneAttributes            lane_table_[MAX_LANES];
  ThreadPoolLanesAttributes thread_pool_lanes_table_[MAX_THREAD_POOL_LANES];
  BandAttributes            band_table_[MAX_BANDS];
  PriorityBandsAttributes   priority_band_table_[MAX_PRIORITY_BANDS];
  PolicyConfigAttributes    policy_config_table_[MAX_POLICY_CONFIGS];
  PolicySetAttributes       policy_set_table_[MAX_POLICY_SETS];

  int containers_table_last_index_;
  int homes_table_last_index_;
  int components_table_last_index_;
  int component_registrations_table_last_index_;
  int connections_table_last_index_;
  int resolvers_table_last_index_;
  int thread_pool_table_last_index_;
  int lane_table_last_index_;
  int thread_pool_lanes_table_last_index_;
  int band_table_last_index_;
  int priority_band_table_last_index_;
  int policy_config_table_last_index_;
  int policy_set_table_last_index_;

  Static_Config_Info ()
    :containers_table_last_index_ (-1),
     homes_table_last_index_ (-1),
     components_table_last_index_ (-1),
     component_registrations_table_last_index_ (-1),
     connections_table_last_index_ (-1),
     resolvers_table_last_index_ (-1),
     thread_pool_table_last_index_ (-1),
     lane_table_last_index_ (-1),
     thread_pool_lanes_table_last_index_ (-1),
     band_table_last_index_ (-1),
     priority_band_table_last_index_ (-1),
     policy_config_table_last_index_ (-1),
     policy_set_table_last_index_ (-1)
  {
  }
};

}

}

#include /**/ "ace/post.h"
#endif /* CIAO_STATIC_ASSEMBLY_H */