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.
icfilegroup_attr.cpp in vendors/XIOS/current/src/interface/c_attr – NEMO

source: vendors/XIOS/current/src/interface/c_attr/icfilegroup_attr.cpp @ 3428

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

importing initial XIOS vendor drop

File size: 8.7 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.hpp"
9#include "object_template.hpp"
10#include "group_template.hpp"
11#include "icutil.hpp"
12#include "timer.hpp"
13#include "file.hpp"
14
15extern "C"
16{
17  typedef xios::CFileGroup*  filegroup_Ptr;
18 
19  void cxios_set_filegroup_description(filegroup_Ptr filegroup_hdl, const char * description, int description_size)
20  {
21    std::string description_str;
22    if(!cstr2string(description, description_size, description_str)) return;
23     CTimer::get("XIOS").resume();
24    filegroup_hdl->description.setValue(description_str);
25    filegroup_hdl->sendAttributToServer(filegroup_hdl->description);
26     CTimer::get("XIOS").suspend();
27  }
28 
29  void cxios_get_filegroup_description(filegroup_Ptr filegroup_hdl, char * description, int description_size)
30  {
31     CTimer::get("XIOS").resume();
32    if(!string_copy(filegroup_hdl->description.getValue(),description , description_size))
33      ERROR("void cxios_get_filegroup_description(filegroup_Ptr filegroup_hdl, char * description, int description_size)", <<"Input string is to short");
34     CTimer::get("XIOS").suspend();
35  }
36 
37 
38  void cxios_set_filegroup_enabled(filegroup_Ptr filegroup_hdl, bool enabled)
39  {
40     CTimer::get("XIOS").resume();
41    filegroup_hdl->enabled.setValue(enabled);
42    filegroup_hdl->sendAttributToServer(filegroup_hdl->enabled);
43     CTimer::get("XIOS").suspend();
44  }
45 
46  void cxios_get_filegroup_enabled(filegroup_Ptr filegroup_hdl, bool* enabled)
47  {
48    *enabled = filegroup_hdl->enabled.getValue();
49  }
50 
51 
52  void cxios_set_filegroup_group_ref(filegroup_Ptr filegroup_hdl, const char * group_ref, int group_ref_size)
53  {
54    std::string group_ref_str;
55    if(!cstr2string(group_ref, group_ref_size, group_ref_str)) return;
56     CTimer::get("XIOS").resume();
57    filegroup_hdl->group_ref.setValue(group_ref_str);
58    filegroup_hdl->sendAttributToServer(filegroup_hdl->group_ref);
59     CTimer::get("XIOS").suspend();
60  }
61 
62  void cxios_get_filegroup_group_ref(filegroup_Ptr filegroup_hdl, char * group_ref, int group_ref_size)
63  {
64     CTimer::get("XIOS").resume();
65    if(!string_copy(filegroup_hdl->group_ref.getValue(),group_ref , group_ref_size))
66      ERROR("void cxios_get_filegroup_group_ref(filegroup_Ptr filegroup_hdl, char * group_ref, int group_ref_size)", <<"Input string is to short");
67     CTimer::get("XIOS").suspend();
68  }
69 
70 
71  void cxios_set_filegroup_name(filegroup_Ptr filegroup_hdl, const char * name, int name_size)
72  {
73    std::string name_str;
74    if(!cstr2string(name, name_size, name_str)) return;
75     CTimer::get("XIOS").resume();
76    filegroup_hdl->name.setValue(name_str);
77    filegroup_hdl->sendAttributToServer(filegroup_hdl->name);
78     CTimer::get("XIOS").suspend();
79  }
80 
81  void cxios_get_filegroup_name(filegroup_Ptr filegroup_hdl, char * name, int name_size)
82  {
83     CTimer::get("XIOS").resume();
84    if(!string_copy(filegroup_hdl->name.getValue(),name , name_size))
85      ERROR("void cxios_get_filegroup_name(filegroup_Ptr filegroup_hdl, char * name, int name_size)", <<"Input string is to short");
86     CTimer::get("XIOS").suspend();
87  }
88 
89 
90  void cxios_set_filegroup_name_suffix(filegroup_Ptr filegroup_hdl, const char * name_suffix, int name_suffix_size)
91  {
92    std::string name_suffix_str;
93    if(!cstr2string(name_suffix, name_suffix_size, name_suffix_str)) return;
94     CTimer::get("XIOS").resume();
95    filegroup_hdl->name_suffix.setValue(name_suffix_str);
96    filegroup_hdl->sendAttributToServer(filegroup_hdl->name_suffix);
97     CTimer::get("XIOS").suspend();
98  }
99 
100  void cxios_get_filegroup_name_suffix(filegroup_Ptr filegroup_hdl, char * name_suffix, int name_suffix_size)
101  {
102     CTimer::get("XIOS").resume();
103    if(!string_copy(filegroup_hdl->name_suffix.getValue(),name_suffix , name_suffix_size))
104      ERROR("void cxios_get_filegroup_name_suffix(filegroup_Ptr filegroup_hdl, char * name_suffix, int name_suffix_size)", <<"Input string is to short");
105     CTimer::get("XIOS").suspend();
106  }
107 
108 
109  void cxios_set_filegroup_output_freq(filegroup_Ptr filegroup_hdl, const char * output_freq, int output_freq_size)
110  {
111    std::string output_freq_str;
112    if(!cstr2string(output_freq, output_freq_size, output_freq_str)) return;
113     CTimer::get("XIOS").resume();
114    filegroup_hdl->output_freq.setValue(output_freq_str);
115    filegroup_hdl->sendAttributToServer(filegroup_hdl->output_freq);
116     CTimer::get("XIOS").suspend();
117  }
118 
119  void cxios_get_filegroup_output_freq(filegroup_Ptr filegroup_hdl, char * output_freq, int output_freq_size)
120  {
121     CTimer::get("XIOS").resume();
122    if(!string_copy(filegroup_hdl->output_freq.getValue(),output_freq , output_freq_size))
123      ERROR("void cxios_get_filegroup_output_freq(filegroup_Ptr filegroup_hdl, char * output_freq, int output_freq_size)", <<"Input string is to short");
124     CTimer::get("XIOS").suspend();
125  }
126 
127 
128  void cxios_set_filegroup_output_level(filegroup_Ptr filegroup_hdl, int output_level)
129  {
130     CTimer::get("XIOS").resume();
131    filegroup_hdl->output_level.setValue(output_level);
132    filegroup_hdl->sendAttributToServer(filegroup_hdl->output_level);
133     CTimer::get("XIOS").suspend();
134  }
135 
136  void cxios_get_filegroup_output_level(filegroup_Ptr filegroup_hdl, int* output_level)
137  {
138    *output_level = filegroup_hdl->output_level.getValue();
139  }
140 
141 
142  void cxios_set_filegroup_par_access(filegroup_Ptr filegroup_hdl, const char * par_access, int par_access_size)
143  {
144    std::string par_access_str;
145    if(!cstr2string(par_access, par_access_size, par_access_str)) return;
146     CTimer::get("XIOS").resume();
147    filegroup_hdl->par_access.setValue(par_access_str);
148    filegroup_hdl->sendAttributToServer(filegroup_hdl->par_access);
149     CTimer::get("XIOS").suspend();
150  }
151 
152  void cxios_get_filegroup_par_access(filegroup_Ptr filegroup_hdl, char * par_access, int par_access_size)
153  {
154     CTimer::get("XIOS").resume();
155    if(!string_copy(filegroup_hdl->par_access.getValue(),par_access , par_access_size))
156      ERROR("void cxios_get_filegroup_par_access(filegroup_Ptr filegroup_hdl, char * par_access, int par_access_size)", <<"Input string is to short");
157     CTimer::get("XIOS").suspend();
158  }
159 
160 
161  void cxios_set_filegroup_split_freq(filegroup_Ptr filegroup_hdl, const char * split_freq, int split_freq_size)
162  {
163    std::string split_freq_str;
164    if(!cstr2string(split_freq, split_freq_size, split_freq_str)) return;
165     CTimer::get("XIOS").resume();
166    filegroup_hdl->split_freq.setValue(split_freq_str);
167    filegroup_hdl->sendAttributToServer(filegroup_hdl->split_freq);
168     CTimer::get("XIOS").suspend();
169  }
170 
171  void cxios_get_filegroup_split_freq(filegroup_Ptr filegroup_hdl, char * split_freq, int split_freq_size)
172  {
173     CTimer::get("XIOS").resume();
174    if(!string_copy(filegroup_hdl->split_freq.getValue(),split_freq , split_freq_size))
175      ERROR("void cxios_get_filegroup_split_freq(filegroup_Ptr filegroup_hdl, char * split_freq, int split_freq_size)", <<"Input string is to short");
176     CTimer::get("XIOS").suspend();
177  }
178 
179 
180  void cxios_set_filegroup_sync_freq(filegroup_Ptr filegroup_hdl, const char * sync_freq, int sync_freq_size)
181  {
182    std::string sync_freq_str;
183    if(!cstr2string(sync_freq, sync_freq_size, sync_freq_str)) return;
184     CTimer::get("XIOS").resume();
185    filegroup_hdl->sync_freq.setValue(sync_freq_str);
186    filegroup_hdl->sendAttributToServer(filegroup_hdl->sync_freq);
187     CTimer::get("XIOS").suspend();
188  }
189 
190  void cxios_get_filegroup_sync_freq(filegroup_Ptr filegroup_hdl, char * sync_freq, int sync_freq_size)
191  {
192     CTimer::get("XIOS").resume();
193    if(!string_copy(filegroup_hdl->sync_freq.getValue(),sync_freq , sync_freq_size))
194      ERROR("void cxios_get_filegroup_sync_freq(filegroup_Ptr filegroup_hdl, char * sync_freq, int sync_freq_size)", <<"Input string is to short");
195     CTimer::get("XIOS").suspend();
196  }
197 
198 
199  void cxios_set_filegroup_type(filegroup_Ptr filegroup_hdl, const char * type, int type_size)
200  {
201    std::string type_str;
202    if(!cstr2string(type, type_size, type_str)) return;
203     CTimer::get("XIOS").resume();
204    filegroup_hdl->type.setValue(type_str);
205    filegroup_hdl->sendAttributToServer(filegroup_hdl->type);
206     CTimer::get("XIOS").suspend();
207  }
208 
209  void cxios_get_filegroup_type(filegroup_Ptr filegroup_hdl, char * type, int type_size)
210  {
211     CTimer::get("XIOS").resume();
212    if(!string_copy(filegroup_hdl->type.getValue(),type , type_size))
213      ERROR("void cxios_get_filegroup_type(filegroup_Ptr filegroup_hdl, char * type, int type_size)", <<"Input string is to short");
214     CTimer::get("XIOS").suspend();
215  }
216 
217 
218 
219}
Note: See TracBrowser for help on using the repository browser.