[325] | 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" |
---|
[352] | 8 | #include "attribute_template.hpp" |
---|
| 9 | #include "object_template.hpp" |
---|
| 10 | #include "group_template.hpp" |
---|
[325] | 11 | #include "icutil.hpp" |
---|
[347] | 12 | #include "timer.hpp" |
---|
[352] | 13 | #include "axis.hpp" |
---|
[325] | 14 | |
---|
| 15 | extern "C" |
---|
| 16 | { |
---|
[345] | 17 | typedef xios::CAxis* axis_Ptr; |
---|
[325] | 18 | |
---|
| 19 | void cxios_set_axis_long_name(axis_Ptr axis_hdl, const char * long_name, int long_name_size) |
---|
| 20 | { |
---|
| 21 | std::string long_name_str; |
---|
| 22 | if(!cstr2string(long_name, long_name_size, long_name_str)) return; |
---|
[347] | 23 | CTimer::get("XIOS").resume(); |
---|
[325] | 24 | axis_hdl->long_name.setValue(long_name_str); |
---|
| 25 | axis_hdl->sendAttributToServer(axis_hdl->long_name); |
---|
[347] | 26 | CTimer::get("XIOS").suspend(); |
---|
[325] | 27 | } |
---|
| 28 | |
---|
| 29 | void cxios_get_axis_long_name(axis_Ptr axis_hdl, char * long_name, int long_name_size) |
---|
| 30 | { |
---|
[347] | 31 | CTimer::get("XIOS").resume(); |
---|
[325] | 32 | if(!string_copy(axis_hdl->long_name.getValue(),long_name , long_name_size)) |
---|
| 33 | ERROR("void cxios_get_axis_long_name(axis_Ptr axis_hdl, char * long_name, int long_name_size)", <<"Input string is to short"); |
---|
[347] | 34 | CTimer::get("XIOS").suspend(); |
---|
[325] | 35 | } |
---|
| 36 | |
---|
| 37 | |
---|
| 38 | void cxios_set_axis_name(axis_Ptr axis_hdl, const char * name, int name_size) |
---|
| 39 | { |
---|
| 40 | std::string name_str; |
---|
| 41 | if(!cstr2string(name, name_size, name_str)) return; |
---|
[347] | 42 | CTimer::get("XIOS").resume(); |
---|
[325] | 43 | axis_hdl->name.setValue(name_str); |
---|
| 44 | axis_hdl->sendAttributToServer(axis_hdl->name); |
---|
[347] | 45 | CTimer::get("XIOS").suspend(); |
---|
[325] | 46 | } |
---|
| 47 | |
---|
| 48 | void cxios_get_axis_name(axis_Ptr axis_hdl, char * name, int name_size) |
---|
| 49 | { |
---|
[347] | 50 | CTimer::get("XIOS").resume(); |
---|
[325] | 51 | if(!string_copy(axis_hdl->name.getValue(),name , name_size)) |
---|
| 52 | ERROR("void cxios_get_axis_name(axis_Ptr axis_hdl, char * name, int name_size)", <<"Input string is to short"); |
---|
[347] | 53 | CTimer::get("XIOS").suspend(); |
---|
[325] | 54 | } |
---|
| 55 | |
---|
| 56 | |
---|
| 57 | void cxios_set_axis_size(axis_Ptr axis_hdl, int size) |
---|
| 58 | { |
---|
[347] | 59 | CTimer::get("XIOS").resume(); |
---|
[325] | 60 | axis_hdl->size.setValue(size); |
---|
| 61 | axis_hdl->sendAttributToServer(axis_hdl->size); |
---|
[347] | 62 | CTimer::get("XIOS").suspend(); |
---|
[325] | 63 | } |
---|
| 64 | |
---|
| 65 | void cxios_get_axis_size(axis_Ptr axis_hdl, int* size) |
---|
| 66 | { |
---|
| 67 | *size = axis_hdl->size.getValue(); |
---|
| 68 | } |
---|
| 69 | |
---|
| 70 | |
---|
| 71 | void cxios_set_axis_standard_name(axis_Ptr axis_hdl, const char * standard_name, int standard_name_size) |
---|
| 72 | { |
---|
| 73 | std::string standard_name_str; |
---|
| 74 | if(!cstr2string(standard_name, standard_name_size, standard_name_str)) return; |
---|
[347] | 75 | CTimer::get("XIOS").resume(); |
---|
[325] | 76 | axis_hdl->standard_name.setValue(standard_name_str); |
---|
| 77 | axis_hdl->sendAttributToServer(axis_hdl->standard_name); |
---|
[347] | 78 | CTimer::get("XIOS").suspend(); |
---|
[325] | 79 | } |
---|
| 80 | |
---|
| 81 | void cxios_get_axis_standard_name(axis_Ptr axis_hdl, char * standard_name, int standard_name_size) |
---|
| 82 | { |
---|
[347] | 83 | CTimer::get("XIOS").resume(); |
---|
[325] | 84 | if(!string_copy(axis_hdl->standard_name.getValue(),standard_name , standard_name_size)) |
---|
| 85 | ERROR("void cxios_get_axis_standard_name(axis_Ptr axis_hdl, char * standard_name, int standard_name_size)", <<"Input string is to short"); |
---|
[347] | 86 | CTimer::get("XIOS").suspend(); |
---|
[325] | 87 | } |
---|
| 88 | |
---|
| 89 | |
---|
| 90 | void cxios_set_axis_unit(axis_Ptr axis_hdl, const char * unit, int unit_size) |
---|
| 91 | { |
---|
| 92 | std::string unit_str; |
---|
| 93 | if(!cstr2string(unit, unit_size, unit_str)) return; |
---|
[347] | 94 | CTimer::get("XIOS").resume(); |
---|
[325] | 95 | axis_hdl->unit.setValue(unit_str); |
---|
| 96 | axis_hdl->sendAttributToServer(axis_hdl->unit); |
---|
[347] | 97 | CTimer::get("XIOS").suspend(); |
---|
[325] | 98 | } |
---|
| 99 | |
---|
| 100 | void cxios_get_axis_unit(axis_Ptr axis_hdl, char * unit, int unit_size) |
---|
| 101 | { |
---|
[347] | 102 | CTimer::get("XIOS").resume(); |
---|
[325] | 103 | if(!string_copy(axis_hdl->unit.getValue(),unit , unit_size)) |
---|
| 104 | ERROR("void cxios_get_axis_unit(axis_Ptr axis_hdl, char * unit, int unit_size)", <<"Input string is to short"); |
---|
[347] | 105 | CTimer::get("XIOS").suspend(); |
---|
[325] | 106 | } |
---|
| 107 | |
---|
| 108 | |
---|
| 109 | void cxios_set_axis_value(axis_Ptr axis_hdl, double* value, int extent1) |
---|
| 110 | { |
---|
[347] | 111 | CTimer::get("XIOS").resume(); |
---|
[325] | 112 | ARRAY(double,1) array_tmp(new CArray<double,1>(boost::extents[extent1])); |
---|
| 113 | std::copy(value, &(value[array_tmp->num_elements()]), array_tmp->data()); |
---|
| 114 | axis_hdl->value.setValue(array_tmp); |
---|
| 115 | axis_hdl->sendAttributToServer(axis_hdl->value); |
---|
| 116 | } |
---|
| 117 | |
---|
| 118 | void cxios_get_axis_value(axis_Ptr axis_hdl, double* value, int extent1) |
---|
| 119 | { |
---|
| 120 | if (!array_copy(axis_hdl->value.getValue(), value, extent1)) |
---|
| 121 | ERROR("void cxios_set_axis_value(axis_Ptr axis_hdl, double* value, int extent1)",<<"Output array size is not conform to array size attribute") ; |
---|
[347] | 122 | CTimer::get("XIOS").suspend(); |
---|
[325] | 123 | } |
---|
| 124 | |
---|
| 125 | |
---|
| 126 | |
---|
| 127 | } |
---|