New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
icfieldgroup_attr.cpp in vendors/XIOS/current/src/interface/c_attr – NEMO

source: vendors/XIOS/current/src/interface/c_attr/icfieldgroup_attr.cpp @ 3408

Last change on this file since 3408 was 3408, checked in by rblod, 12 years ago

importing initial XIOS vendor drop

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 12.0 KB
Line 
1/* ************************************************************************** *
2 *               Interface auto generated - do not modify                   *
3 * ************************************************************************** */
4
5#include <boost/multi_array.hpp>
6#include <boost/shared_ptr.hpp>
7#include "xmlioserver.hpp"
8#include "attribute_template_impl.hpp"
9#include "object_template_impl.hpp"
10#include "group_template_impl.hpp"
11#include "icutil.hpp"
12#include "timer.hpp"
13
14extern "C"
15{
16  typedef xios::CFieldGroup*  fieldgroup_Ptr;
17 
18  void cxios_set_fieldgroup_axis_ref(fieldgroup_Ptr fieldgroup_hdl, const char * axis_ref, int axis_ref_size)
19  {
20    std::string axis_ref_str;
21    if(!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return;
22     CTimer::get("XIOS").resume();
23    fieldgroup_hdl->axis_ref.setValue(axis_ref_str);
24    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->axis_ref);
25     CTimer::get("XIOS").suspend();
26  }
27 
28  void cxios_get_fieldgroup_axis_ref(fieldgroup_Ptr fieldgroup_hdl, char * axis_ref, int axis_ref_size)
29  {
30     CTimer::get("XIOS").resume();
31    if(!string_copy(fieldgroup_hdl->axis_ref.getValue(),axis_ref , axis_ref_size))
32      ERROR("void cxios_get_fieldgroup_axis_ref(fieldgroup_Ptr fieldgroup_hdl, char * axis_ref, int axis_ref_size)", <<"Input string is to short");
33     CTimer::get("XIOS").suspend();
34  }
35 
36 
37  void cxios_set_fieldgroup_default_value(fieldgroup_Ptr fieldgroup_hdl, double default_value)
38  {
39     CTimer::get("XIOS").resume();
40    fieldgroup_hdl->default_value.setValue(default_value);
41    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->default_value);
42     CTimer::get("XIOS").suspend();
43  }
44 
45  void cxios_get_fieldgroup_default_value(fieldgroup_Ptr fieldgroup_hdl, double* default_value)
46  {
47    *default_value = fieldgroup_hdl->default_value.getValue();
48  }
49 
50 
51  void cxios_set_fieldgroup_domain_ref(fieldgroup_Ptr fieldgroup_hdl, const char * domain_ref, int domain_ref_size)
52  {
53    std::string domain_ref_str;
54    if(!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return;
55     CTimer::get("XIOS").resume();
56    fieldgroup_hdl->domain_ref.setValue(domain_ref_str);
57    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->domain_ref);
58     CTimer::get("XIOS").suspend();
59  }
60 
61  void cxios_get_fieldgroup_domain_ref(fieldgroup_Ptr fieldgroup_hdl, char * domain_ref, int domain_ref_size)
62  {
63     CTimer::get("XIOS").resume();
64    if(!string_copy(fieldgroup_hdl->domain_ref.getValue(),domain_ref , domain_ref_size))
65      ERROR("void cxios_get_fieldgroup_domain_ref(fieldgroup_Ptr fieldgroup_hdl, char * domain_ref, int domain_ref_size)", <<"Input string is to short");
66     CTimer::get("XIOS").suspend();
67  }
68 
69 
70  void cxios_set_fieldgroup_enabled(fieldgroup_Ptr fieldgroup_hdl, bool enabled)
71  {
72     CTimer::get("XIOS").resume();
73    fieldgroup_hdl->enabled.setValue(enabled);
74    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->enabled);
75     CTimer::get("XIOS").suspend();
76  }
77 
78  void cxios_get_fieldgroup_enabled(fieldgroup_Ptr fieldgroup_hdl, bool* enabled)
79  {
80    *enabled = fieldgroup_hdl->enabled.getValue();
81  }
82 
83 
84  void cxios_set_fieldgroup_field_ref(fieldgroup_Ptr fieldgroup_hdl, const char * field_ref, int field_ref_size)
85  {
86    std::string field_ref_str;
87    if(!cstr2string(field_ref, field_ref_size, field_ref_str)) return;
88     CTimer::get("XIOS").resume();
89    fieldgroup_hdl->field_ref.setValue(field_ref_str);
90    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->field_ref);
91     CTimer::get("XIOS").suspend();
92  }
93 
94  void cxios_get_fieldgroup_field_ref(fieldgroup_Ptr fieldgroup_hdl, char * field_ref, int field_ref_size)
95  {
96     CTimer::get("XIOS").resume();
97    if(!string_copy(fieldgroup_hdl->field_ref.getValue(),field_ref , field_ref_size))
98      ERROR("void cxios_get_fieldgroup_field_ref(fieldgroup_Ptr fieldgroup_hdl, char * field_ref, int field_ref_size)", <<"Input string is to short");
99     CTimer::get("XIOS").suspend();
100  }
101 
102 
103  void cxios_set_fieldgroup_freq_offset(fieldgroup_Ptr fieldgroup_hdl, const char * freq_offset, int freq_offset_size)
104  {
105    std::string freq_offset_str;
106    if(!cstr2string(freq_offset, freq_offset_size, freq_offset_str)) return;
107     CTimer::get("XIOS").resume();
108    fieldgroup_hdl->freq_offset.setValue(freq_offset_str);
109    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->freq_offset);
110     CTimer::get("XIOS").suspend();
111  }
112 
113  void cxios_get_fieldgroup_freq_offset(fieldgroup_Ptr fieldgroup_hdl, char * freq_offset, int freq_offset_size)
114  {
115     CTimer::get("XIOS").resume();
116    if(!string_copy(fieldgroup_hdl->freq_offset.getValue(),freq_offset , freq_offset_size))
117      ERROR("void cxios_get_fieldgroup_freq_offset(fieldgroup_Ptr fieldgroup_hdl, char * freq_offset, int freq_offset_size)", <<"Input string is to short");
118     CTimer::get("XIOS").suspend();
119  }
120 
121 
122  void cxios_set_fieldgroup_freq_op(fieldgroup_Ptr fieldgroup_hdl, const char * freq_op, int freq_op_size)
123  {
124    std::string freq_op_str;
125    if(!cstr2string(freq_op, freq_op_size, freq_op_str)) return;
126     CTimer::get("XIOS").resume();
127    fieldgroup_hdl->freq_op.setValue(freq_op_str);
128    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->freq_op);
129     CTimer::get("XIOS").suspend();
130  }
131 
132  void cxios_get_fieldgroup_freq_op(fieldgroup_Ptr fieldgroup_hdl, char * freq_op, int freq_op_size)
133  {
134     CTimer::get("XIOS").resume();
135    if(!string_copy(fieldgroup_hdl->freq_op.getValue(),freq_op , freq_op_size))
136      ERROR("void cxios_get_fieldgroup_freq_op(fieldgroup_Ptr fieldgroup_hdl, char * freq_op, int freq_op_size)", <<"Input string is to short");
137     CTimer::get("XIOS").suspend();
138  }
139 
140 
141  void cxios_set_fieldgroup_grid_ref(fieldgroup_Ptr fieldgroup_hdl, const char * grid_ref, int grid_ref_size)
142  {
143    std::string grid_ref_str;
144    if(!cstr2string(grid_ref, grid_ref_size, grid_ref_str)) return;
145     CTimer::get("XIOS").resume();
146    fieldgroup_hdl->grid_ref.setValue(grid_ref_str);
147    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->grid_ref);
148     CTimer::get("XIOS").suspend();
149  }
150 
151  void cxios_get_fieldgroup_grid_ref(fieldgroup_Ptr fieldgroup_hdl, char * grid_ref, int grid_ref_size)
152  {
153     CTimer::get("XIOS").resume();
154    if(!string_copy(fieldgroup_hdl->grid_ref.getValue(),grid_ref , grid_ref_size))
155      ERROR("void cxios_get_fieldgroup_grid_ref(fieldgroup_Ptr fieldgroup_hdl, char * grid_ref, int grid_ref_size)", <<"Input string is to short");
156     CTimer::get("XIOS").suspend();
157  }
158 
159 
160  void cxios_set_fieldgroup_group_ref(fieldgroup_Ptr fieldgroup_hdl, const char * group_ref, int group_ref_size)
161  {
162    std::string group_ref_str;
163    if(!cstr2string(group_ref, group_ref_size, group_ref_str)) return;
164     CTimer::get("XIOS").resume();
165    fieldgroup_hdl->group_ref.setValue(group_ref_str);
166    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->group_ref);
167     CTimer::get("XIOS").suspend();
168  }
169 
170  void cxios_get_fieldgroup_group_ref(fieldgroup_Ptr fieldgroup_hdl, char * group_ref, int group_ref_size)
171  {
172     CTimer::get("XIOS").resume();
173    if(!string_copy(fieldgroup_hdl->group_ref.getValue(),group_ref , group_ref_size))
174      ERROR("void cxios_get_fieldgroup_group_ref(fieldgroup_Ptr fieldgroup_hdl, char * group_ref, int group_ref_size)", <<"Input string is to short");
175     CTimer::get("XIOS").suspend();
176  }
177 
178 
179  void cxios_set_fieldgroup_level(fieldgroup_Ptr fieldgroup_hdl, int level)
180  {
181     CTimer::get("XIOS").resume();
182    fieldgroup_hdl->level.setValue(level);
183    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->level);
184     CTimer::get("XIOS").suspend();
185  }
186 
187  void cxios_get_fieldgroup_level(fieldgroup_Ptr fieldgroup_hdl, int* level)
188  {
189    *level = fieldgroup_hdl->level.getValue();
190  }
191 
192 
193  void cxios_set_fieldgroup_long_name(fieldgroup_Ptr fieldgroup_hdl, const char * long_name, int long_name_size)
194  {
195    std::string long_name_str;
196    if(!cstr2string(long_name, long_name_size, long_name_str)) return;
197     CTimer::get("XIOS").resume();
198    fieldgroup_hdl->long_name.setValue(long_name_str);
199    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->long_name);
200     CTimer::get("XIOS").suspend();
201  }
202 
203  void cxios_get_fieldgroup_long_name(fieldgroup_Ptr fieldgroup_hdl, char * long_name, int long_name_size)
204  {
205     CTimer::get("XIOS").resume();
206    if(!string_copy(fieldgroup_hdl->long_name.getValue(),long_name , long_name_size))
207      ERROR("void cxios_get_fieldgroup_long_name(fieldgroup_Ptr fieldgroup_hdl, char * long_name, int long_name_size)", <<"Input string is to short");
208     CTimer::get("XIOS").suspend();
209  }
210 
211 
212  void cxios_set_fieldgroup_name(fieldgroup_Ptr fieldgroup_hdl, const char * name, int name_size)
213  {
214    std::string name_str;
215    if(!cstr2string(name, name_size, name_str)) return;
216     CTimer::get("XIOS").resume();
217    fieldgroup_hdl->name.setValue(name_str);
218    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->name);
219     CTimer::get("XIOS").suspend();
220  }
221 
222  void cxios_get_fieldgroup_name(fieldgroup_Ptr fieldgroup_hdl, char * name, int name_size)
223  {
224     CTimer::get("XIOS").resume();
225    if(!string_copy(fieldgroup_hdl->name.getValue(),name , name_size))
226      ERROR("void cxios_get_fieldgroup_name(fieldgroup_Ptr fieldgroup_hdl, char * name, int name_size)", <<"Input string is to short");
227     CTimer::get("XIOS").suspend();
228  }
229 
230 
231  void cxios_set_fieldgroup_operation(fieldgroup_Ptr fieldgroup_hdl, const char * operation, int operation_size)
232  {
233    std::string operation_str;
234    if(!cstr2string(operation, operation_size, operation_str)) return;
235     CTimer::get("XIOS").resume();
236    fieldgroup_hdl->operation.setValue(operation_str);
237    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->operation);
238     CTimer::get("XIOS").suspend();
239  }
240 
241  void cxios_get_fieldgroup_operation(fieldgroup_Ptr fieldgroup_hdl, char * operation, int operation_size)
242  {
243     CTimer::get("XIOS").resume();
244    if(!string_copy(fieldgroup_hdl->operation.getValue(),operation , operation_size))
245      ERROR("void cxios_get_fieldgroup_operation(fieldgroup_Ptr fieldgroup_hdl, char * operation, int operation_size)", <<"Input string is to short");
246     CTimer::get("XIOS").suspend();
247  }
248 
249 
250  void cxios_set_fieldgroup_prec(fieldgroup_Ptr fieldgroup_hdl, int prec)
251  {
252     CTimer::get("XIOS").resume();
253    fieldgroup_hdl->prec.setValue(prec);
254    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->prec);
255     CTimer::get("XIOS").suspend();
256  }
257 
258  void cxios_get_fieldgroup_prec(fieldgroup_Ptr fieldgroup_hdl, int* prec)
259  {
260    *prec = fieldgroup_hdl->prec.getValue();
261  }
262 
263 
264  void cxios_set_fieldgroup_standard_name(fieldgroup_Ptr fieldgroup_hdl, const char * standard_name, int standard_name_size)
265  {
266    std::string standard_name_str;
267    if(!cstr2string(standard_name, standard_name_size, standard_name_str)) return;
268     CTimer::get("XIOS").resume();
269    fieldgroup_hdl->standard_name.setValue(standard_name_str);
270    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->standard_name);
271     CTimer::get("XIOS").suspend();
272  }
273 
274  void cxios_get_fieldgroup_standard_name(fieldgroup_Ptr fieldgroup_hdl, char * standard_name, int standard_name_size)
275  {
276     CTimer::get("XIOS").resume();
277    if(!string_copy(fieldgroup_hdl->standard_name.getValue(),standard_name , standard_name_size))
278      ERROR("void cxios_get_fieldgroup_standard_name(fieldgroup_Ptr fieldgroup_hdl, char * standard_name, int standard_name_size)", <<"Input string is to short");
279     CTimer::get("XIOS").suspend();
280  }
281 
282 
283  void cxios_set_fieldgroup_unit(fieldgroup_Ptr fieldgroup_hdl, const char * unit, int unit_size)
284  {
285    std::string unit_str;
286    if(!cstr2string(unit, unit_size, unit_str)) return;
287     CTimer::get("XIOS").resume();
288    fieldgroup_hdl->unit.setValue(unit_str);
289    fieldgroup_hdl->sendAttributToServer(fieldgroup_hdl->unit);
290     CTimer::get("XIOS").suspend();
291  }
292 
293  void cxios_get_fieldgroup_unit(fieldgroup_Ptr fieldgroup_hdl, char * unit, int unit_size)
294  {
295     CTimer::get("XIOS").resume();
296    if(!string_copy(fieldgroup_hdl->unit.getValue(),unit , unit_size))
297      ERROR("void cxios_get_fieldgroup_unit(fieldgroup_Ptr fieldgroup_hdl, char * unit, int unit_size)", <<"Input string is to short");
298     CTimer::get("XIOS").suspend();
299  }
300 
301 
302 
303}
Note: See TracBrowser for help on using the repository browser.