[314] | 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 | |
---|
| 13 | extern "C" |
---|
| 14 | { |
---|
| 15 | typedef xmlioserver::tree::CAxisGroup* axisgroup_Ptr; |
---|
| 16 | |
---|
| 17 | void cxios_set_axisgroup_group_ref(axisgroup_Ptr axisgroup_hdl, const char * group_ref, int group_ref_size) |
---|
| 18 | { |
---|
| 19 | std::string group_ref_str; |
---|
| 20 | if(!cstr2string(group_ref, group_ref_size, group_ref_str)) return; |
---|
| 21 | axisgroup_hdl->group_ref.setValue(group_ref_str); |
---|
| 22 | axisgroup_hdl->sendAttributToServer(axisgroup_hdl->group_ref); |
---|
| 23 | } |
---|
| 24 | |
---|
| 25 | void cxios_get_axisgroup_group_ref(axisgroup_Ptr axisgroup_hdl, char * group_ref, int group_ref_size) |
---|
| 26 | { |
---|
| 27 | if(!string_copy(axisgroup_hdl->group_ref.getValue(),group_ref , group_ref_size)) |
---|
| 28 | ERROR("void cxios_get_axisgroup_group_ref(axisgroup_Ptr axisgroup_hdl, char * group_ref, int group_ref_size)", <<"Input string is to short"); |
---|
| 29 | } |
---|
| 30 | |
---|
| 31 | |
---|
| 32 | void cxios_set_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl, const char * long_name, int long_name_size) |
---|
| 33 | { |
---|
| 34 | std::string long_name_str; |
---|
| 35 | if(!cstr2string(long_name, long_name_size, long_name_str)) return; |
---|
| 36 | axisgroup_hdl->long_name.setValue(long_name_str); |
---|
| 37 | axisgroup_hdl->sendAttributToServer(axisgroup_hdl->long_name); |
---|
| 38 | } |
---|
| 39 | |
---|
| 40 | void cxios_get_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl, char * long_name, int long_name_size) |
---|
| 41 | { |
---|
| 42 | if(!string_copy(axisgroup_hdl->long_name.getValue(),long_name , long_name_size)) |
---|
| 43 | ERROR("void cxios_get_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl, char * long_name, int long_name_size)", <<"Input string is to short"); |
---|
| 44 | } |
---|
| 45 | |
---|
| 46 | |
---|
| 47 | void cxios_set_axisgroup_name(axisgroup_Ptr axisgroup_hdl, const char * name, int name_size) |
---|
| 48 | { |
---|
| 49 | std::string name_str; |
---|
| 50 | if(!cstr2string(name, name_size, name_str)) return; |
---|
| 51 | axisgroup_hdl->name.setValue(name_str); |
---|
| 52 | axisgroup_hdl->sendAttributToServer(axisgroup_hdl->name); |
---|
| 53 | } |
---|
| 54 | |
---|
| 55 | void cxios_get_axisgroup_name(axisgroup_Ptr axisgroup_hdl, char * name, int name_size) |
---|
| 56 | { |
---|
| 57 | if(!string_copy(axisgroup_hdl->name.getValue(),name , name_size)) |
---|
| 58 | ERROR("void cxios_get_axisgroup_name(axisgroup_Ptr axisgroup_hdl, char * name, int name_size)", <<"Input string is to short"); |
---|
| 59 | } |
---|
| 60 | |
---|
| 61 | |
---|
| 62 | void cxios_set_axisgroup_size(axisgroup_Ptr axisgroup_hdl, int size) |
---|
| 63 | { |
---|
| 64 | axisgroup_hdl->size.setValue(size); |
---|
| 65 | axisgroup_hdl->sendAttributToServer(axisgroup_hdl->size); |
---|
| 66 | } |
---|
| 67 | |
---|
| 68 | void cxios_get_axisgroup_size(axisgroup_Ptr axisgroup_hdl, int* size) |
---|
| 69 | { |
---|
| 70 | *size = axisgroup_hdl->size.getValue(); |
---|
| 71 | } |
---|
| 72 | |
---|
| 73 | |
---|
| 74 | void cxios_set_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl, const char * standard_name, int standard_name_size) |
---|
| 75 | { |
---|
| 76 | std::string standard_name_str; |
---|
| 77 | if(!cstr2string(standard_name, standard_name_size, standard_name_str)) return; |
---|
| 78 | axisgroup_hdl->standard_name.setValue(standard_name_str); |
---|
| 79 | axisgroup_hdl->sendAttributToServer(axisgroup_hdl->standard_name); |
---|
| 80 | } |
---|
| 81 | |
---|
| 82 | void cxios_get_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl, char * standard_name, int standard_name_size) |
---|
| 83 | { |
---|
| 84 | if(!string_copy(axisgroup_hdl->standard_name.getValue(),standard_name , standard_name_size)) |
---|
| 85 | ERROR("void cxios_get_axisgroup_standard_name(axisgroup_Ptr axisgroup_hdl, char * standard_name, int standard_name_size)", <<"Input string is to short"); |
---|
| 86 | } |
---|
| 87 | |
---|
| 88 | |
---|
| 89 | void cxios_set_axisgroup_unit(axisgroup_Ptr axisgroup_hdl, const char * unit, int unit_size) |
---|
| 90 | { |
---|
| 91 | std::string unit_str; |
---|
| 92 | if(!cstr2string(unit, unit_size, unit_str)) return; |
---|
| 93 | axisgroup_hdl->unit.setValue(unit_str); |
---|
| 94 | axisgroup_hdl->sendAttributToServer(axisgroup_hdl->unit); |
---|
| 95 | } |
---|
| 96 | |
---|
| 97 | void cxios_get_axisgroup_unit(axisgroup_Ptr axisgroup_hdl, char * unit, int unit_size) |
---|
| 98 | { |
---|
| 99 | if(!string_copy(axisgroup_hdl->unit.getValue(),unit , unit_size)) |
---|
| 100 | ERROR("void cxios_get_axisgroup_unit(axisgroup_Ptr axisgroup_hdl, char * unit, int unit_size)", <<"Input string is to short"); |
---|
| 101 | } |
---|
| 102 | |
---|
| 103 | |
---|
| 104 | void cxios_set_axisgroup_value(axisgroup_Ptr axisgroup_hdl, double* value, int extent1) |
---|
| 105 | { |
---|
| 106 | ARRAY(double,1) array_tmp(new CArray<double,1>(boost::extents[extent1])); |
---|
| 107 | std::copy(value, &(value[array_tmp->num_elements()]), array_tmp->data()); |
---|
| 108 | axisgroup_hdl->value.setValue(array_tmp); |
---|
| 109 | axisgroup_hdl->sendAttributToServer(axisgroup_hdl->value); |
---|
| 110 | } |
---|
| 111 | |
---|
| 112 | void cxios_get_axisgroup_value(axisgroup_Ptr axisgroup_hdl, double* value, int extent1) |
---|
| 113 | { |
---|
| 114 | if (!array_copy(axisgroup_hdl->value.getValue(), value, extent1)) |
---|
| 115 | ERROR("void cxios_set_axisgroup_value(axisgroup_Ptr axisgroup_hdl, double* value, int extent1)",<<"Output array size is not conform to array size attribute") ; |
---|
| 116 | } |
---|
| 117 | |
---|
| 118 | |
---|
| 119 | |
---|
| 120 | } |
---|