Changeset 347 for XIOS/trunk/src/interface/c_attr/icaxis_attr.cpp
- Timestamp:
- 05/21/12 17:57:22 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/interface/c_attr/icaxis_attr.cpp
r345 r347 10 10 #include "group_template_impl.hpp" 11 11 #include "icutil.hpp" 12 #include "timer.hpp" 12 13 13 14 extern "C" … … 19 20 std::string long_name_str; 20 21 if(!cstr2string(long_name, long_name_size, long_name_str)) return; 22 CTimer::get("XIOS").resume(); 21 23 axis_hdl->long_name.setValue(long_name_str); 22 24 axis_hdl->sendAttributToServer(axis_hdl->long_name); 25 CTimer::get("XIOS").suspend(); 23 26 } 24 27 25 28 void cxios_get_axis_long_name(axis_Ptr axis_hdl, char * long_name, int long_name_size) 26 29 { 30 CTimer::get("XIOS").resume(); 27 31 if(!string_copy(axis_hdl->long_name.getValue(),long_name , long_name_size)) 28 32 ERROR("void cxios_get_axis_long_name(axis_Ptr axis_hdl, char * long_name, int long_name_size)", <<"Input string is to short"); 33 CTimer::get("XIOS").suspend(); 29 34 } 30 35 … … 34 39 std::string name_str; 35 40 if(!cstr2string(name, name_size, name_str)) return; 41 CTimer::get("XIOS").resume(); 36 42 axis_hdl->name.setValue(name_str); 37 43 axis_hdl->sendAttributToServer(axis_hdl->name); 44 CTimer::get("XIOS").suspend(); 38 45 } 39 46 40 47 void cxios_get_axis_name(axis_Ptr axis_hdl, char * name, int name_size) 41 48 { 49 CTimer::get("XIOS").resume(); 42 50 if(!string_copy(axis_hdl->name.getValue(),name , name_size)) 43 51 ERROR("void cxios_get_axis_name(axis_Ptr axis_hdl, char * name, int name_size)", <<"Input string is to short"); 52 CTimer::get("XIOS").suspend(); 44 53 } 45 54 … … 47 56 void cxios_set_axis_size(axis_Ptr axis_hdl, int size) 48 57 { 58 CTimer::get("XIOS").resume(); 49 59 axis_hdl->size.setValue(size); 50 60 axis_hdl->sendAttributToServer(axis_hdl->size); 61 CTimer::get("XIOS").suspend(); 51 62 } 52 63 … … 61 72 std::string standard_name_str; 62 73 if(!cstr2string(standard_name, standard_name_size, standard_name_str)) return; 74 CTimer::get("XIOS").resume(); 63 75 axis_hdl->standard_name.setValue(standard_name_str); 64 76 axis_hdl->sendAttributToServer(axis_hdl->standard_name); 77 CTimer::get("XIOS").suspend(); 65 78 } 66 79 67 80 void cxios_get_axis_standard_name(axis_Ptr axis_hdl, char * standard_name, int standard_name_size) 68 81 { 82 CTimer::get("XIOS").resume(); 69 83 if(!string_copy(axis_hdl->standard_name.getValue(),standard_name , standard_name_size)) 70 84 ERROR("void cxios_get_axis_standard_name(axis_Ptr axis_hdl, char * standard_name, int standard_name_size)", <<"Input string is to short"); 85 CTimer::get("XIOS").suspend(); 71 86 } 72 87 … … 76 91 std::string unit_str; 77 92 if(!cstr2string(unit, unit_size, unit_str)) return; 93 CTimer::get("XIOS").resume(); 78 94 axis_hdl->unit.setValue(unit_str); 79 95 axis_hdl->sendAttributToServer(axis_hdl->unit); 96 CTimer::get("XIOS").suspend(); 80 97 } 81 98 82 99 void cxios_get_axis_unit(axis_Ptr axis_hdl, char * unit, int unit_size) 83 100 { 101 CTimer::get("XIOS").resume(); 84 102 if(!string_copy(axis_hdl->unit.getValue(),unit , unit_size)) 85 103 ERROR("void cxios_get_axis_unit(axis_Ptr axis_hdl, char * unit, int unit_size)", <<"Input string is to short"); 104 CTimer::get("XIOS").suspend(); 86 105 } 87 106 … … 89 108 void cxios_set_axis_value(axis_Ptr axis_hdl, double* value, int extent1) 90 109 { 110 CTimer::get("XIOS").resume(); 91 111 ARRAY(double,1) array_tmp(new CArray<double,1>(boost::extents[extent1])); 92 112 std::copy(value, &(value[array_tmp->num_elements()]), array_tmp->data()); … … 99 119 if (!array_copy(axis_hdl->value.getValue(), value, extent1)) 100 120 ERROR("void cxios_set_axis_value(axis_Ptr axis_hdl, double* value, int extent1)",<<"Output array size is not conform to array size attribute") ; 121 CTimer::get("XIOS").suspend(); 101 122 } 102 123
Note: See TracChangeset
for help on using the changeset viewer.