ChimeraTK-DeviceAccess-TangoBackend 00.01.02
Loading...
Searching...
No Matches
TangoTestServer.cpp
Go to the documentation of this file.
1/*----- PROTECTED REGION ID(TangoTestServer.cpp) ENABLED START -----*/
2/* clang-format on */
3//=============================================================================
4//
5// file : TangoTestServer.cpp
6//
7// description : C++ source for the TangoTestServer class and its commands.
8// The class is derived from Device. It represents the
9// CORBA servant object which will be accessed from the
10// network. All commands which can be executed on the
11// TangoTestServer are implemented in this file.
12//
13// project : TangoTestServer
14//
15// This file is part of Tango device class.
16//
17// Tango is free software: you can redistribute it and/or modify
18// it under the terms of the GNU Lesser General Public License as published by
19// the Free Software Foundation, either version 3 of the License, or
20// (at your option) any later version.
21//
22// Tango is distributed in the hope that it will be useful,
23// but WITHOUT ANY WARRANTY; without even the implied warranty of
24// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25// GNU Lesser General Public License for more details.
26//
27// You should have received a copy of the GNU Lesser General Public License
28// along with Tango. If not, see <http://www.gnu.org/licenses/>.
29//
30//
31//
32//=============================================================================
33// This file is generated by POGO
34// (Program Obviously used to Generate tango Object)
35//=============================================================================
36
37#include "TangoTestServer.h"
38
40
41#include <tango/idl/tango.h>
42/* clang-format off */
43/*----- PROTECTED REGION END -----*/ // TangoTestServer.cpp
44
50//================================================================
51// The following table gives the correspondence
52// between command and method names.
53//
54// Command name | Method name
55//================================================================
56// State | Inherited (no method)
57// Status | Inherited (no method)
58//================================================================
59
60//================================================================
61// Attributes managed are:
62//================================================================
63// DoubleScalar | Tango::DevDouble Scalar
64// DoubleRoScalar | Tango::DevDouble Scalar
65// DoubleWoScalar | Tango::DevDouble Scalar
66// FloatScalar | Tango::DevFloat Scalar
67// FloatRoScalar | Tango::DevFloat Scalar
68// FloatWoScalar | Tango::DevFloat Scalar
69// IntScalar | Tango::DevLong Scalar
70// IntRoScalar | Tango::DevLong Scalar
71// IntWoScalar | Tango::DevLong Scalar
72// StringScalar | Tango::DevString Scalar
73// StringRoScalar | Tango::DevString Scalar
74// StringWoScalar | Tango::DevString Scalar
75// BooleanScalar | Tango::DevBoolean Scalar
76// BooleanRoScalar | Tango::DevBoolean Scalar
77// BooleanWoScalar | Tango::DevBoolean Scalar
78// DoubleSpectrum | Tango::DevDouble Spectrum ( max = 10)
79// DoubleRoSpectrum | Tango::DevDouble Spectrum ( max = 10)
80// DoubleWoSpectrum | Tango::DevDouble Spectrum ( max = 10)
81// FloatSpectrum | Tango::DevFloat Spectrum ( max = 10)
82// FloatRoSpectrum | Tango::DevFloat Spectrum ( max = 10)
83// FloatWoSpectrum | Tango::DevFloat Spectrum ( max = 10)
84// IntSpectrum | Tango::DevLong Spectrum ( max = 10)
85// IntRoSpectrum | Tango::DevLong Spectrum ( max = 10)
86// IntWoSpectrum | Tango::DevLong Spectrum ( max = 10)
87// StringSpectrum | Tango::DevString Spectrum ( max = 10)
88// StringRoSpectrum | Tango::DevString Spectrum ( max = 10)
89// StringWoSpectrum | Tango::DevString Spectrum ( max = 10)
90//================================================================
91
93{
94/*----- PROTECTED REGION ID(TangoTestServer::namespace_starting) ENABLED START -----*/
95 /* clang-format on */
96 // static initializations
97 /* clang-format off */
98/*----- PROTECTED REGION END -----*/ // TangoTestServer::namespace_starting
99
100/*--------------------------------------------------------------------------------------------------------------------*/
106/*--------------------------------------------------------------------------------------------------------------------*/
107TangoTestServer::TangoTestServer(Tango::DeviceClass *cl, std::string &s)
108 : TANGO_BASE_CLASS(cl, s.c_str())
109{
110 /*----- PROTECTED REGION ID(TangoTestServer::constructor_1) ENABLED START -----*/
111 /* clang-format on */
112 init_device();
113 /* clang-format off */
114 /*----- PROTECTED REGION END -----*/ // TangoTestServer::constructor_1
115}
116/*--------------------------------------------------------------------------------------------------------------------*/
117TangoTestServer::TangoTestServer(Tango::DeviceClass *cl, const char *s)
118 : TANGO_BASE_CLASS(cl, s)
119{
120 /*----- PROTECTED REGION ID(TangoTestServer::constructor_2) ENABLED START -----*/
121 /* clang-format on */
122 init_device();
123 /* clang-format off */
124 /*----- PROTECTED REGION END -----*/ // TangoTestServer::constructor_2
125}
126/*--------------------------------------------------------------------------------------------------------------------*/
127TangoTestServer::TangoTestServer(Tango::DeviceClass *cl, const char *s, const char *d)
128 : TANGO_BASE_CLASS(cl, s, d)
129{
130 /*----- PROTECTED REGION ID(TangoTestServer::constructor_3) ENABLED START -----*/
131 /* clang-format on */
132 init_device();
133 /* clang-format off */
134 /*----- PROTECTED REGION END -----*/ // TangoTestServer::constructor_3
135}
136/*--------------------------------------------------------------------------------------------------------------------*/
141
142/*--------------------------------------------------------------------------------------------------------------------*/
147/*--------------------------------------------------------------------------------------------------------------------*/
149{
150 DEBUG_STREAM << "TangoTestServer::delete_device() " << device_name << std::endl;
151 /*----- PROTECTED REGION ID(TangoTestServer::delete_device) ENABLED START -----*/
152 /* clang-format on */
153 for(int i = 0; i < StringSpectrumAttrib::X_DATA_SIZE; i++) {
154 Tango::string_free(attr_StringSpectrum_read[i]);
155 }
156 /* clang-format off */
157 /*----- PROTECTED REGION END -----*/ // TangoTestServer::delete_device
158 delete[] attr_DoubleScalar_read;
159 delete[] attr_FloatScalar_read;
160 delete[] attr_IntScalar_read;
161 delete[] attr_StringScalar_read;
165 delete[] attr_IntSpectrum_read;
168}
169
170/*--------------------------------------------------------------------------------------------------------------------*/
175/*--------------------------------------------------------------------------------------------------------------------*/
177{
178 DEBUG_STREAM << "TangoTestServer::init_device() create device " << device_name << std::endl;
179 /*----- PROTECTED REGION ID(TangoTestServer::init_device_before) ENABLED START -----*/
180 /* clang-format on */
181 // Initialization before get_device_property() call
182 /* clang-format off */
183 /*----- PROTECTED REGION END -----*/ // TangoTestServer::init_device_before
184
185 // No device property to be read from database
186
187 attr_DoubleScalar_read = new Tango::DevDouble[1];
188 attr_FloatScalar_read = new Tango::DevFloat[1];
189 attr_IntScalar_read = new Tango::DevLong[1];
190 attr_StringScalar_read = new Tango::DevString[1];
191 attr_BooleanScalar_read = new Tango::DevBoolean[1];
192 attr_DoubleSpectrum_read = new Tango::DevDouble[10];
193 attr_FloatSpectrum_read = new Tango::DevFloat[10];
194 attr_IntSpectrum_read = new Tango::DevLong[10];
195 attr_StringSpectrum_read = new Tango::DevString[10];
196 attr_BooleanSpectrum_read = new Tango::DevBoolean[10];
197 /*----- PROTECTED REGION ID(TangoTestServer::init_device) ENABLED START -----*/
198 /* clang-format on */
200 *attr_FloatScalar_read = 0.0F;
203 *attr_StringScalar_read = Tango::string_dup("");
205
208 for(int i = 0; i < StringSpectrumAttrib::X_DATA_SIZE; i++) {
209 attr_StringSpectrum_read[i] = Tango::string_dup("");
210 }
212 /* clang-format off */
213 /*----- PROTECTED REGION END -----*/ // TangoTestServer::init_device
214 set_state(Tango::DevState::RUNNING);
215}
216
217
218/*--------------------------------------------------------------------------------------------------------------------*/
223/*--------------------------------------------------------------------------------------------------------------------*/
225{
226 DEBUG_STREAM << "TangoTestServer::always_executed_hook() " << device_name << std::endl;
227 /*----- PROTECTED REGION ID(TangoTestServer::always_executed_hook) ENABLED START -----*/
228 /* clang-format on */
229 // code always executed before all requests
230 /* clang-format off */
231 /*----- PROTECTED REGION END -----*/ // TangoTestServer::always_executed_hook
232}
233
234/*--------------------------------------------------------------------------------------------------------------------*/
239/*--------------------------------------------------------------------------------------------------------------------*/
240void TangoTestServer::read_attr_hardware(TANGO_UNUSED(std::vector<long> &attr_list))
241{
242 DEBUG_STREAM << "TangoTestServer::read_attr_hardware(std::vector<long> &attr_list) entering... " << std::endl;
243 /*----- PROTECTED REGION ID(TangoTestServer::read_attr_hardware) ENABLED START -----*/
244 /* clang-format on */
245 // Add your own code
246 /* clang-format off */
247 /*----- PROTECTED REGION END -----*/ // TangoTestServer::read_attr_hardware
248}
249/*--------------------------------------------------------------------------------------------------------------------*/
254/*--------------------------------------------------------------------------------------------------------------------*/
255void TangoTestServer::write_attr_hardware(TANGO_UNUSED(std::vector<long> &attr_list))
256{
257 DEBUG_STREAM << "TangoTestServer::write_attr_hardware(std::vector<long> &attr_list) entering... " << std::endl;
258 /*----- PROTECTED REGION ID(TangoTestServer::write_attr_hardware) ENABLED START -----*/
259 /* clang-format on */
260 // Add your own code
261 /* clang-format off */
262 /*----- PROTECTED REGION END -----*/ // TangoTestServer::write_attr_hardware
263}
264
265/*--------------------------------------------------------------------------------------------------------------------*/
273/*--------------------------------------------------------------------------------------------------------------------*/
274void TangoTestServer::read_DoubleScalar(Tango::Attribute &attr)
275{
276 DEBUG_STREAM << "TangoTestServer::read_DoubleScalar(Tango::Attribute &attr) entering... " << std::endl;
277 /*----- PROTECTED REGION ID(TangoTestServer::read_DoubleScalar) ENABLED START -----*/
278 /* clang-format on */
279 // Set the attribute value
280 attr.set_value(attr_DoubleScalar_read);
281 /* clang-format off */
282 /*----- PROTECTED REGION END -----*/ // TangoTestServer::read_DoubleScalar
283}
284/*--------------------------------------------------------------------------------------------------------------------*/
292/*--------------------------------------------------------------------------------------------------------------------*/
293void TangoTestServer::write_DoubleScalar(Tango::WAttribute &attr)
294{
295 DEBUG_STREAM << "TangoTestServer::write_DoubleScalar(Tango::WAttribute &attr) entering... " << std::endl;
296 // Retrieve write value
297 Tango::DevDouble w_val;
298 attr.get_write_value(w_val);
299 /*----- PROTECTED REGION ID(TangoTestServer::write_DoubleScalar) ENABLED START -----*/
300 /* clang-format on */
301 // Add your own code
302 /* clang-format off */
303 /*----- PROTECTED REGION END -----*/ // TangoTestServer::write_DoubleScalar
304}
305/*--------------------------------------------------------------------------------------------------------------------*/
313/*--------------------------------------------------------------------------------------------------------------------*/
314void TangoTestServer::read_DoubleRoScalar(Tango::Attribute &attr)
315{
316 DEBUG_STREAM << "TangoTestServer::read_DoubleRoScalar(Tango::Attribute &attr) entering... " << std::endl;
317 /*----- PROTECTED REGION ID(TangoTestServer::read_DoubleRoScalar) ENABLED START -----*/
318 /* clang-format on */
319 // Set the attribute value
320 attr.set_value(attr_DoubleScalar_read);
321 /* clang-format off */
322 /*----- PROTECTED REGION END -----*/ // TangoTestServer::read_DoubleRoScalar
323}
324/*--------------------------------------------------------------------------------------------------------------------*/
332/*--------------------------------------------------------------------------------------------------------------------*/
333void TangoTestServer::write_DoubleWoScalar(Tango::WAttribute &attr)
334{
335 DEBUG_STREAM << "TangoTestServer::write_DoubleWoScalar(Tango::WAttribute &attr) entering... " << std::endl;
336 // Retrieve write value
337 Tango::DevDouble w_val;
338 attr.get_write_value(w_val);
339 /*----- PROTECTED REGION ID(TangoTestServer::write_DoubleWoScalar) ENABLED START -----*/
340 /* clang-format on */
341 // Add your own code
342 /* clang-format off */
343 /*----- PROTECTED REGION END -----*/ // TangoTestServer::write_DoubleWoScalar
344}
345/*--------------------------------------------------------------------------------------------------------------------*/
353/*--------------------------------------------------------------------------------------------------------------------*/
354void TangoTestServer::read_FloatScalar(Tango::Attribute &attr)
355{
356 DEBUG_STREAM << "TangoTestServer::read_FloatScalar(Tango::Attribute &attr) entering... " << std::endl;
357 /*----- PROTECTED REGION ID(TangoTestServer::read_FloatScalar) ENABLED START -----*/
358 /* clang-format on */
359 // Set the attribute value
360 attr.set_value(attr_FloatScalar_read);
361 /* clang-format off */
362 /*----- PROTECTED REGION END -----*/ // TangoTestServer::read_FloatScalar
363}
364/*--------------------------------------------------------------------------------------------------------------------*/
372/*--------------------------------------------------------------------------------------------------------------------*/
373void TangoTestServer::write_FloatScalar(Tango::WAttribute &attr)
374{
375 DEBUG_STREAM << "TangoTestServer::write_FloatScalar(Tango::WAttribute &attr) entering... " << std::endl;
376 // Retrieve write value
377 Tango::DevFloat w_val;
378 attr.get_write_value(w_val);
379 /*----- PROTECTED REGION ID(TangoTestServer::write_FloatScalar) ENABLED START -----*/
380 /* clang-format on */
381 // Add your own code
382 /* clang-format off */
383 /*----- PROTECTED REGION END -----*/ // TangoTestServer::write_FloatScalar
384}
385/*--------------------------------------------------------------------------------------------------------------------*/
393/*--------------------------------------------------------------------------------------------------------------------*/
394void TangoTestServer::read_FloatRoScalar(Tango::Attribute &attr)
395{
396 DEBUG_STREAM << "TangoTestServer::read_FloatRoScalar(Tango::Attribute &attr) entering... " << std::endl;
397 /*----- PROTECTED REGION ID(TangoTestServer::read_FloatRoScalar) ENABLED START -----*/
398 /* clang-format on */
399 // Set the attribute value
400 attr.set_value(attr_FloatScalar_read);
401 /* clang-format off */
402 /*----- PROTECTED REGION END -----*/ // TangoTestServer::read_FloatRoScalar
403}
404/*--------------------------------------------------------------------------------------------------------------------*/
412/*--------------------------------------------------------------------------------------------------------------------*/
413void TangoTestServer::read_FloatWoScalar(Tango::Attribute &attr)
414{
415 DEBUG_STREAM << "TangoTestServer::read_FloatWoScalar(Tango::Attribute &attr) entering... " << std::endl;
416 /*----- PROTECTED REGION ID(TangoTestServer::read_FloatWoScalar) ENABLED START -----*/
417 /* clang-format on */
418 // Set the attribute value
419 attr.set_value(attr_FloatScalar_read);
420 /* clang-format off */
421 /*----- PROTECTED REGION END -----*/ // TangoTestServer::read_FloatWoScalar
422}
423/*--------------------------------------------------------------------------------------------------------------------*/
431/*--------------------------------------------------------------------------------------------------------------------*/
432void TangoTestServer::write_FloatWoScalar(Tango::WAttribute &attr)
433{
434 DEBUG_STREAM << "TangoTestServer::write_FloatWoScalar(Tango::WAttribute &attr) entering... " << std::endl;
435 // Retrieve write value
436 Tango::DevFloat w_val;
437 attr.get_write_value(w_val);
438 /*----- PROTECTED REGION ID(TangoTestServer::write_FloatWoScalar) ENABLED START -----*/
439 /* clang-format on */
440 // Add your own code
441 /* clang-format off */
442 /*----- PROTECTED REGION END -----*/ // TangoTestServer::write_FloatWoScalar
443}
444/*--------------------------------------------------------------------------------------------------------------------*/
452/*--------------------------------------------------------------------------------------------------------------------*/
453void TangoTestServer::read_IntScalar(Tango::Attribute &attr)
454{
455 DEBUG_STREAM << "TangoTestServer::read_IntScalar(Tango::Attribute &attr) entering... " << std::endl;
456 /*----- PROTECTED REGION ID(TangoTestServer::read_IntScalar) ENABLED START -----*/
457 /* clang-format on */
458 // Set the attribute value
459 attr.set_value(attr_IntScalar_read);
460
461 /* clang-format off */
462 /*----- PROTECTED REGION END -----*/ // TangoTestServer::read_IntScalar
463}
464/*--------------------------------------------------------------------------------------------------------------------*/
472/*--------------------------------------------------------------------------------------------------------------------*/
473void TangoTestServer::write_IntScalar(Tango::WAttribute &attr)
474{
475 DEBUG_STREAM << "TangoTestServer::write_IntScalar(Tango::WAttribute &attr) entering... " << std::endl;
476 // Retrieve write value
477 Tango::DevLong w_val;
478 attr.get_write_value(w_val);
479 /*----- PROTECTED REGION ID(TangoTestServer::write_IntScalar) ENABLED START -----*/
480 /* clang-format on */
481 attr_IntScalar_read[0] = w_val;
482 /* clang-format off */
483 /*----- PROTECTED REGION END -----*/ // TangoTestServer::write_IntScalar
484}
485/*--------------------------------------------------------------------------------------------------------------------*/
493/*--------------------------------------------------------------------------------------------------------------------*/
494void TangoTestServer::read_IntRoScalar(Tango::Attribute &attr)
495{
496 DEBUG_STREAM << "TangoTestServer::read_IntRoScalar(Tango::Attribute &attr) entering... " << std::endl;
497 /*----- PROTECTED REGION ID(TangoTestServer::read_IntRoScalar) ENABLED START -----*/
498 /* clang-format on */
499 // Set the attribute value
500 attr.set_value(attr_IntScalar_read);
501 /* clang-format off */
502 /*----- PROTECTED REGION END -----*/ // TangoTestServer::read_IntRoScalar
503}
504/*--------------------------------------------------------------------------------------------------------------------*/
512/*--------------------------------------------------------------------------------------------------------------------*/
513void TangoTestServer::write_IntWoScalar(Tango::WAttribute &attr)
514{
515 DEBUG_STREAM << "TangoTestServer::write_IntWoScalar(Tango::WAttribute &attr) entering... " << std::endl;
516 // Retrieve write value
517 Tango::DevLong w_val;
518 attr.get_write_value(w_val);
519 /*----- PROTECTED REGION ID(TangoTestServer::write_IntWoScalar) ENABLED START -----*/
520 /* clang-format on */
521 attr_IntScalar_read[0] = w_val;
522 /* clang-format off */
523 /*----- PROTECTED REGION END -----*/ // TangoTestServer::write_IntWoScalar
524}
525/*--------------------------------------------------------------------------------------------------------------------*/
533/*--------------------------------------------------------------------------------------------------------------------*/
534void TangoTestServer::read_StringScalar(Tango::Attribute &attr)
535{
536 DEBUG_STREAM << "TangoTestServer::read_StringScalar(Tango::Attribute &attr) entering... " << std::endl;
537 /*----- PROTECTED REGION ID(TangoTestServer::read_StringScalar) ENABLED START -----*/
538 /* clang-format on */
539 // Set the attribute value
540 attr.set_value(attr_StringScalar_read);
541 /* clang-format off */
542 /*----- PROTECTED REGION END -----*/ // TangoTestServer::read_StringScalar
543}
544/*--------------------------------------------------------------------------------------------------------------------*/
552/*--------------------------------------------------------------------------------------------------------------------*/
553void TangoTestServer::write_StringScalar(Tango::WAttribute &attr)
554{
555 DEBUG_STREAM << "TangoTestServer::write_StringScalar(Tango::WAttribute &attr) entering... " << std::endl;
556 // Retrieve write value
557 Tango::DevString w_val;
558 attr.get_write_value(w_val);
559 /*----- PROTECTED REGION ID(TangoTestServer::write_StringScalar) ENABLED START -----*/
560 /* clang-format on */
561 // delete *attr_StringScalar_read;
562 *attr_StringScalar_read = w_val;
563 /* clang-format off */
564 /*----- PROTECTED REGION END -----*/ // TangoTestServer::write_StringScalar
565}
566/*--------------------------------------------------------------------------------------------------------------------*/
574/*--------------------------------------------------------------------------------------------------------------------*/
575void TangoTestServer::read_StringRoScalar(Tango::Attribute &attr)
576{
577 DEBUG_STREAM << "TangoTestServer::read_StringRoScalar(Tango::Attribute &attr) entering... " << std::endl;
578 /*----- PROTECTED REGION ID(TangoTestServer::read_StringRoScalar) ENABLED START -----*/
579 /* clang-format on */
580 // Set the attribute value
581 attr.set_value(attr_StringScalar_read);
582 /* clang-format off */
583 /*----- PROTECTED REGION END -----*/ // TangoTestServer::read_StringRoScalar
584}
585
586/*--------------------------------------------------------------------------------------------------------------------*/
594/*--------------------------------------------------------------------------------------------------------------------*/
595void TangoTestServer::write_StringWoScalar(Tango::WAttribute &attr)
596{
597 DEBUG_STREAM << "TangoTestServer::write_StringWoScalar(Tango::WAttribute &attr) entering... " << std::endl;
598 // Retrieve write value
599 Tango::DevString w_val;
600 attr.get_write_value(w_val);
601 /*----- PROTECTED REGION ID(TangoTestServer::write_StringWoScalar) ENABLED START -----*/
602 /* clang-format on */
603 *attr_StringScalar_read = w_val;
604 /* clang-format off */
605 /*----- PROTECTED REGION END -----*/ // TangoTestServer::write_StringWoScalar
606}
607/*--------------------------------------------------------------------------------------------------------------------*/
615/*--------------------------------------------------------------------------------------------------------------------*/
616void TangoTestServer::read_BooleanScalar(Tango::Attribute &attr)
617{
618 DEBUG_STREAM << "TangoTestServer::read_BooleanScalar(Tango::Attribute &attr) entering... " << std::endl;
619 /*----- PROTECTED REGION ID(TangoTestServer::read_BooleanScalar) ENABLED START -----*/
620 /* clang-format on */
621 // Set the attribute value
622 attr.set_value(attr_BooleanScalar_read);
623 /* clang-format off */
624 /*----- PROTECTED REGION END -----*/ // TangoTestServer::read_BooleanScalar
625}
626/*--------------------------------------------------------------------------------------------------------------------*/
634/*--------------------------------------------------------------------------------------------------------------------*/
635void TangoTestServer::write_BooleanScalar(Tango::WAttribute &attr)
636{
637 DEBUG_STREAM << "TangoTestServer::write_BooleanScalar(Tango::WAttribute &attr) entering... " << std::endl;
638 // Retrieve write value
639 Tango::DevBoolean w_val;
640 attr.get_write_value(w_val);
641 /*----- PROTECTED REGION ID(TangoTestServer::write_BooleanScalar) ENABLED START -----*/
642 /* clang-format on */
644 /* clang-format off */
645 /*----- PROTECTED REGION END -----*/ // TangoTestServer::write_BooleanScalar
646}
647/*--------------------------------------------------------------------------------------------------------------------*/
655/*--------------------------------------------------------------------------------------------------------------------*/
656void TangoTestServer::read_BooleanRoScalar(Tango::Attribute &attr)
657{
658 DEBUG_STREAM << "TangoTestServer::read_BooleanRoScalar(Tango::Attribute &attr) entering... " << std::endl;
659 /*----- PROTECTED REGION ID(TangoTestServer::read_BooleanRoScalar) ENABLED START -----*/
660 /* clang-format on */
661 // Set the attribute value
662 attr.set_value(attr_BooleanScalar_read);
663 /* clang-format off */
664 /*----- PROTECTED REGION END -----*/ // TangoTestServer::read_BooleanRoScalar
665}
666/*--------------------------------------------------------------------------------------------------------------------*/
674/*--------------------------------------------------------------------------------------------------------------------*/
675void TangoTestServer::write_BooleanWoScalar(Tango::WAttribute &attr)
676{
677 DEBUG_STREAM << "TangoTestServer::write_BooleanWoScalar(Tango::WAttribute &attr) entering... " << std::endl;
678 // Retrieve write value
679 Tango::DevBoolean w_val;
680 attr.get_write_value(w_val);
681 /*----- PROTECTED REGION ID(TangoTestServer::write_BooleanWoScalar) ENABLED START -----*/
682 /* clang-format on */
684 /* clang-format off */
685 /*----- PROTECTED REGION END -----*/ // TangoTestServer::write_BooleanWoScalar
686}
687/*--------------------------------------------------------------------------------------------------------------------*/
695/*--------------------------------------------------------------------------------------------------------------------*/
696void TangoTestServer::read_DoubleSpectrum(Tango::Attribute &attr)
697{
698 DEBUG_STREAM << "TangoTestServer::read_DoubleSpectrum(Tango::Attribute &attr) entering... " << std::endl;
699 /*----- PROTECTED REGION ID(TangoTestServer::read_DoubleSpectrum) ENABLED START -----*/
700 /* clang-format on */
701 // Set the attribute value
703 /* clang-format off */
704 /*----- PROTECTED REGION END -----*/ // TangoTestServer::read_DoubleSpectrum
705}
706/*--------------------------------------------------------------------------------------------------------------------*/
714/*--------------------------------------------------------------------------------------------------------------------*/
715void TangoTestServer::write_DoubleSpectrum(Tango::WAttribute &attr)
716{
717 DEBUG_STREAM << "TangoTestServer::write_DoubleSpectrum(Tango::WAttribute &attr) entering... " << std::endl;
718 // Retrieve number of write values
719 //int w_length = attr.get_write_value_length();
720
721 // Retrieve pointer on write values (Do not delete !)
722 const Tango::DevDouble *w_val;
723 attr.get_write_value(w_val);
724 /*----- PROTECTED REGION ID(TangoTestServer::write_DoubleSpectrum) ENABLED START -----*/
725 /* clang-format on */
726 // Add your own code
727 /* clang-format off */
728 /*----- PROTECTED REGION END -----*/ // TangoTestServer::write_DoubleSpectrum
729}
730/*--------------------------------------------------------------------------------------------------------------------*/
738/*--------------------------------------------------------------------------------------------------------------------*/
739void TangoTestServer::read_DoubleRoSpectrum(Tango::Attribute &attr)
740{
741 DEBUG_STREAM << "TangoTestServer::read_DoubleRoSpectrum(Tango::Attribute &attr) entering... " << std::endl;
742 /*----- PROTECTED REGION ID(TangoTestServer::read_DoubleRoSpectrum) ENABLED START -----*/
743 /* clang-format on */
744 // Set the attribute value
746 /* clang-format off */
747 /*----- PROTECTED REGION END -----*/ // TangoTestServer::read_DoubleRoSpectrum
748}
749/*--------------------------------------------------------------------------------------------------------------------*/
757/*--------------------------------------------------------------------------------------------------------------------*/
758void TangoTestServer::write_DoubleWoSpectrum(Tango::WAttribute &attr)
759{
760 DEBUG_STREAM << "TangoTestServer::write_DoubleWoSpectrum(Tango::WAttribute &attr) entering... " << std::endl;
761 // Retrieve number of write values
762 //int w_length = attr.get_write_value_length();
763
764 // Retrieve pointer on write values (Do not delete !)
765 const Tango::DevDouble *w_val;
766 attr.get_write_value(w_val);
767 /*----- PROTECTED REGION ID(TangoTestServer::write_DoubleWoSpectrum) ENABLED START -----*/
768 /* clang-format on */
769 // Add your own code
770 /* clang-format off */
771 /*----- PROTECTED REGION END -----*/ // TangoTestServer::write_DoubleWoSpectrum
772}
773/*--------------------------------------------------------------------------------------------------------------------*/
781/*--------------------------------------------------------------------------------------------------------------------*/
782void TangoTestServer::read_FloatSpectrum(Tango::Attribute &attr)
783{
784 DEBUG_STREAM << "TangoTestServer::read_FloatSpectrum(Tango::Attribute &attr) entering... " << std::endl;
785 /*----- PROTECTED REGION ID(TangoTestServer::read_FloatSpectrum) ENABLED START -----*/
786 /* clang-format on */
787 // Set the attribute value
789 /* clang-format off */
790 /*----- PROTECTED REGION END -----*/ // TangoTestServer::read_FloatSpectrum
791}
792/*--------------------------------------------------------------------------------------------------------------------*/
800/*--------------------------------------------------------------------------------------------------------------------*/
801void TangoTestServer::write_FloatSpectrum(Tango::WAttribute &attr)
802{
803 DEBUG_STREAM << "TangoTestServer::write_FloatSpectrum(Tango::WAttribute &attr) entering... " << std::endl;
804 // Retrieve number of write values
805 //int w_length = attr.get_write_value_length();
806
807 // Retrieve pointer on write values (Do not delete !)
808 const Tango::DevFloat *w_val;
809 attr.get_write_value(w_val);
810 /*----- PROTECTED REGION ID(TangoTestServer::write_FloatSpectrum) ENABLED START -----*/
811 /* clang-format on */
812 // Add your own code
813 /* clang-format off */
814 /*----- PROTECTED REGION END -----*/ // TangoTestServer::write_FloatSpectrum
815}
816/*--------------------------------------------------------------------------------------------------------------------*/
824/*--------------------------------------------------------------------------------------------------------------------*/
825void TangoTestServer::read_FloatRoSpectrum(Tango::Attribute &attr)
826{
827 DEBUG_STREAM << "TangoTestServer::read_FloatRoSpectrum(Tango::Attribute &attr) entering... " << std::endl;
828 /*----- PROTECTED REGION ID(TangoTestServer::read_FloatRoSpectrum) ENABLED START -----*/
829 /* clang-format on */
830 // Set the attribute value
832 /* clang-format off */
833 /*----- PROTECTED REGION END -----*/ // TangoTestServer::read_FloatRoSpectrum
834}
835/*--------------------------------------------------------------------------------------------------------------------*/
843/*--------------------------------------------------------------------------------------------------------------------*/
844void TangoTestServer::read_FloatWoSpectrum(Tango::Attribute &attr)
845{
846 DEBUG_STREAM << "TangoTestServer::read_FloatWoSpectrum(Tango::Attribute &attr) entering... " << std::endl;
847 /*----- PROTECTED REGION ID(TangoTestServer::read_FloatWoSpectrum) ENABLED START -----*/
848 /* clang-format on */
849 // Set the attribute value
851 /* clang-format off */
852 /*----- PROTECTED REGION END -----*/ // TangoTestServer::read_FloatWoSpectrum
853}
854/*--------------------------------------------------------------------------------------------------------------------*/
862/*--------------------------------------------------------------------------------------------------------------------*/
863void TangoTestServer::write_FloatWoSpectrum(Tango::WAttribute &attr)
864{
865 DEBUG_STREAM << "TangoTestServer::write_FloatWoSpectrum(Tango::WAttribute &attr) entering... " << std::endl;
866 // Retrieve number of write values
867 //int w_length = attr.get_write_value_length();
868
869 // Retrieve pointer on write values (Do not delete !)
870 const Tango::DevFloat *w_val;
871 attr.get_write_value(w_val);
872 /*----- PROTECTED REGION ID(TangoTestServer::write_FloatWoSpectrum) ENABLED START -----*/
873 /* clang-format on */
874 // Add your own code
875 /* clang-format off */
876 /*----- PROTECTED REGION END -----*/ // TangoTestServer::write_FloatWoSpectrum
877}
878/*--------------------------------------------------------------------------------------------------------------------*/
886/*--------------------------------------------------------------------------------------------------------------------*/
887void TangoTestServer::read_IntSpectrum(Tango::Attribute &attr)
888{
889 DEBUG_STREAM << "TangoTestServer::read_IntSpectrum(Tango::Attribute &attr) entering... " << std::endl;
890 /*----- PROTECTED REGION ID(TangoTestServer::read_IntSpectrum) ENABLED START -----*/
891 /* clang-format on */
892 // Set the attribute value
894 /* clang-format off */
895 /*----- PROTECTED REGION END -----*/ // TangoTestServer::read_IntSpectrum
896}
897/*--------------------------------------------------------------------------------------------------------------------*/
905/*--------------------------------------------------------------------------------------------------------------------*/
906void TangoTestServer::write_IntSpectrum(Tango::WAttribute &attr)
907{
908 DEBUG_STREAM << "TangoTestServer::write_IntSpectrum(Tango::WAttribute &attr) entering... " << std::endl;
909 // Retrieve number of write values
910 int w_length = attr.get_write_value_length();
911
912 // Retrieve pointer on write values (Do not delete !)
913 const Tango::DevLong *w_val;
914 attr.get_write_value(w_val);
915 /*----- PROTECTED REGION ID(TangoTestServer::write_IntSpectrum) ENABLED START -----*/
916 /* clang-format on */
917 for(int i = 0; i < w_length; i++) {
918 attr_IntSpectrum_read[i] = w_val[i];
919 }
920 /* clang-format off */
921 /*----- PROTECTED REGION END -----*/ // TangoTestServer::write_IntSpectrum
922}
923/*--------------------------------------------------------------------------------------------------------------------*/
931/*--------------------------------------------------------------------------------------------------------------------*/
932void TangoTestServer::read_IntRoSpectrum(Tango::Attribute &attr)
933{
934 DEBUG_STREAM << "TangoTestServer::read_IntRoSpectrum(Tango::Attribute &attr) entering... " << std::endl;
935 /*----- PROTECTED REGION ID(TangoTestServer::read_IntRoSpectrum) ENABLED START -----*/
936 /* clang-format on */
937 // Set the attribute value
939 /* clang-format off */
940 /*----- PROTECTED REGION END -----*/ // TangoTestServer::read_IntRoSpectrum
941}
942/*--------------------------------------------------------------------------------------------------------------------*/
950/*--------------------------------------------------------------------------------------------------------------------*/
951void TangoTestServer::write_IntWoSpectrum(Tango::WAttribute &attr)
952{
953 DEBUG_STREAM << "TangoTestServer::write_IntWoSpectrum(Tango::WAttribute &attr) entering... " << std::endl;
954 // Retrieve number of write values
955 //int w_length = attr.get_write_value_length();
956
957 // Retrieve pointer on write values (Do not delete !)
958 const Tango::DevLong *w_val;
959 attr.get_write_value(w_val);
960 /*----- PROTECTED REGION ID(TangoTestServer::write_IntWoSpectrum) ENABLED START -----*/
961 /* clang-format on */
962 // Add your own code
963 /* clang-format off */
964 /*----- PROTECTED REGION END -----*/ // TangoTestServer::write_IntWoSpectrum
965}
966/*--------------------------------------------------------------------------------------------------------------------*/
974/*--------------------------------------------------------------------------------------------------------------------*/
975void TangoTestServer::read_StringSpectrum(Tango::Attribute &attr)
976{
977 DEBUG_STREAM << "TangoTestServer::read_StringSpectrum(Tango::Attribute &attr) entering... " << std::endl;
978 /*----- PROTECTED REGION ID(TangoTestServer::read_StringSpectrum) ENABLED START -----*/
979 /* clang-format on */
980 // Set the attribute value
982 /* clang-format off */
983 /*----- PROTECTED REGION END -----*/ // TangoTestServer::read_StringSpectrum
984}
985/*--------------------------------------------------------------------------------------------------------------------*/
993/*--------------------------------------------------------------------------------------------------------------------*/
994void TangoTestServer::write_StringSpectrum(Tango::WAttribute &attr)
995{
996 DEBUG_STREAM << "TangoTestServer::write_StringSpectrum(Tango::WAttribute &attr) entering... " << std::endl;
997 // Retrieve number of write values
998 int w_length = attr.get_write_value_length();
999
1000 // Retrieve pointer on write values (Do not delete !)
1001 const Tango::ConstDevString *w_val;
1002 attr.get_write_value(w_val);
1003 /*----- PROTECTED REGION ID(TangoTestServer::write_StringSpectrum) ENABLED START -----*/
1004 /* clang-format on */
1005 for(int i = 0; i < w_length; i++) {
1006 if(attr_StringSpectrum_read[i] != nullptr) {
1007 Tango::string_free(attr_StringSpectrum_read[i]);
1008 }
1009 attr_StringSpectrum_read[i] = Tango::string_dup(w_val[i]);
1010 }
1011 /* clang-format off */
1012 /*----- PROTECTED REGION END -----*/ // TangoTestServer::write_StringSpectrum
1013}
1014/*--------------------------------------------------------------------------------------------------------------------*/
1022/*--------------------------------------------------------------------------------------------------------------------*/
1023void TangoTestServer::read_StringRoSpectrum(Tango::Attribute &attr)
1024{
1025 DEBUG_STREAM << "TangoTestServer::read_StringRoSpectrum(Tango::Attribute &attr) entering... " << std::endl;
1026 /*----- PROTECTED REGION ID(TangoTestServer::read_StringRoSpectrum) ENABLED START -----*/
1027 /* clang-format on */
1028 // Set the attribute value
1030 /* clang-format off */
1031 /*----- PROTECTED REGION END -----*/ // TangoTestServer::read_StringRoSpectrum
1032}
1033/*--------------------------------------------------------------------------------------------------------------------*/
1041/*--------------------------------------------------------------------------------------------------------------------*/
1042void TangoTestServer::read_StringWoSpectrum(Tango::Attribute &attr)
1043{
1044 DEBUG_STREAM << "TangoTestServer::read_StringWoSpectrum(Tango::Attribute &attr) entering... " << std::endl;
1045 /*----- PROTECTED REGION ID(TangoTestServer::read_StringWoSpectrum) ENABLED START -----*/
1046 /* clang-format on */
1047 // Set the attribute value
1049 /* clang-format off */
1050 /*----- PROTECTED REGION END -----*/ // TangoTestServer::read_StringWoSpectrum
1051}
1052/*--------------------------------------------------------------------------------------------------------------------*/
1060/*--------------------------------------------------------------------------------------------------------------------*/
1061void TangoTestServer::write_StringWoSpectrum(Tango::WAttribute &attr)
1062{
1063 DEBUG_STREAM << "TangoTestServer::write_StringWoSpectrum(Tango::WAttribute &attr) entering... " << std::endl;
1064 // Retrieve number of write values
1065 //int w_length = attr.get_write_value_length();
1066
1067 // Retrieve pointer on write values (Do not delete !)
1068 const Tango::ConstDevString *w_val;
1069 attr.get_write_value(w_val);
1070 /*----- PROTECTED REGION ID(TangoTestServer::write_StringWoSpectrum) ENABLED START -----*/
1071 /* clang-format on */
1072 // Add your own code
1073 /* clang-format off */
1074 /*----- PROTECTED REGION END -----*/ // TangoTestServer::write_StringWoSpectrum
1075}
1076
1084/*--------------------------------------------------------------------------------------------------------------------*/
1085void TangoTestServer::read_BooleanSpectrum(Tango::Attribute &attr)
1086{
1087 DEBUG_STREAM << "TangoTestServer::read_BooleanSpectrum(Tango::Attribute &attr) entering... " << std::endl;
1088 /*----- PROTECTED REGION ID(TangoTestServer::read_StringSpectrum) ENABLED START -----*/
1089 /* clang-format on */
1090 // Set the attribute value
1092 /* clang-format off */
1093 /*----- PROTECTED REGION END -----*/ // TangoTestServer::read_StringSpectrum
1094}
1095/*--------------------------------------------------------------------------------------------------------------------*/
1103/*--------------------------------------------------------------------------------------------------------------------*/
1104void TangoTestServer::write_BooleanSpectrum(Tango::WAttribute &attr)
1105{
1106 DEBUG_STREAM << "TangoTestServer::write_BooleanSpectrum(Tango::WAttribute &attr) entering... " << std::endl;
1107 // Retrieve number of write values
1108 int w_length = attr.get_write_value_length();
1109
1110 // Retrieve pointer on write values (Do not delete !)
1111 const Tango::DevBoolean *w_val;
1112 attr.get_write_value(w_val);
1113 /*----- PROTECTED REGION ID(TangoTestServer::write_StringSpectrum) ENABLED START -----*/
1114 /* clang-format on */
1115 for(int i = 0; i < w_length; i++) {
1116 attr_BooleanSpectrum_read[i] = w_val[i];
1117 }
1118 }
1119 /* clang-format off */
1120 /*----- PROTECTED REGION END -----*/ // TangoTestServer::write_StringSpectrum
1121
1122/*--------------------------------------------------------------------------------------------------------------------*/
1128/*--------------------------------------------------------------------------------------------------------------------*/
1130{
1131 /*----- PROTECTED REGION ID(TangoTestServer::add_dynamic_attributes) ENABLED START -----*/
1132 /* clang-format on */
1133 // Add your own code to create and add dynamic attributes if any
1134 /* clang-format off */
1135 /*----- PROTECTED REGION END -----*/ // TangoTestServer::add_dynamic_attributes
1136}
1137
1138/*--------------------------------------------------------------------------------------------------------------------*/
1144/*--------------------------------------------------------------------------------------------------------------------*/
1146{
1147 /*----- PROTECTED REGION ID(TangoTestServer::add_dynamic_commands) ENABLED START -----*/
1148 /* clang-format on */
1149 // Add your own code to create and add dynamic commands if any
1150 /* clang-format off */
1151 /*----- PROTECTED REGION END -----*/ // TangoTestServer::add_dynamic_commands
1152}
1153
1154/*----- PROTECTED REGION ID(TangoTestServer::namespace_ending) ENABLED START -----*/
1155 /* clang-format on */
1156 // Additional Methods
1157 /* clang-format off */
1158/*----- PROTECTED REGION END -----*/ // TangoTestServer::namespace_ending
1159} // namespace
virtual void read_StringRoSpectrum(Tango::Attribute &attr)
Attribute StringRoSpectrum related methods.
virtual void write_StringWoScalar(Tango::WAttribute &attr)
Attribute StringWoScalar related methods.
virtual void write_StringWoSpectrum(Tango::WAttribute &attr)
Write attribute StringWoSpectrum related method.
Tango::DevBoolean * attr_BooleanSpectrum_read
virtual void read_StringRoScalar(Tango::Attribute &attr)
Attribute StringRoScalar related methods.
virtual void write_IntSpectrum(Tango::WAttribute &attr)
Write attribute IntSpectrum related method.
virtual void read_StringSpectrum(Tango::Attribute &attr)
Attribute StringSpectrum related methods.
virtual void write_FloatSpectrum(Tango::WAttribute &attr)
Write attribute FloatSpectrum related method.
virtual void read_attr_hardware(std::vector< long > &attr_list)
virtual void write_IntWoScalar(Tango::WAttribute &attr)
Attribute IntWoScalar related methods.
virtual void read_BooleanSpectrum(Tango::Attribute &attr)
Attribute BooleanSpectrum related methods.
virtual void write_IntWoSpectrum(Tango::WAttribute &attr)
Attribute IntWoSpectrum related methods.
virtual void write_StringScalar(Tango::WAttribute &attr)
Write attribute StringScalar related method.
TangoTestServer(Tango::DeviceClass *cl, std::string &s)
Constructs a newly device object.
virtual void read_IntScalar(Tango::Attribute &attr)
Attribute IntScalar related methods.
virtual void write_BooleanSpectrum(Tango::WAttribute &attr)
Write attribute StringSpectrum related method.
virtual void write_DoubleScalar(Tango::WAttribute &attr)
Write attribute DoubleScalar related method.
virtual void read_FloatScalar(Tango::Attribute &attr)
Attribute FloatScalar related methods.
virtual void read_FloatWoSpectrum(Tango::Attribute &attr)
Attribute FloatWoSpectrum related methods.
virtual void read_IntRoSpectrum(Tango::Attribute &attr)
Attribute IntRoSpectrum related methods.
virtual void write_DoubleWoScalar(Tango::WAttribute &attr)
Attribute DoubleWoScalar related methods.
virtual void write_FloatScalar(Tango::WAttribute &attr)
Write attribute FloatScalar related method.
Tango::DevString * attr_StringSpectrum_read
virtual void read_FloatWoScalar(Tango::Attribute &attr)
Attribute FloatWoScalar related methods.
virtual void read_IntRoScalar(Tango::Attribute &attr)
Attribute IntRoScalar related methods.
virtual void write_FloatWoScalar(Tango::WAttribute &attr)
Write attribute FloatWoScalar related method.
virtual void write_StringSpectrum(Tango::WAttribute &attr)
Write attribute StringSpectrum related method.
virtual void read_BooleanRoScalar(Tango::Attribute &attr)
Attribute BooleanRoScalar related methods.
virtual void write_attr_hardware(std::vector< long > &attr_list)
virtual void read_DoubleRoScalar(Tango::Attribute &attr)
Attribute DoubleRoScalar related methods.
virtual void read_StringWoSpectrum(Tango::Attribute &attr)
Attribute StringWoSpectrum related methods.
virtual void read_DoubleScalar(Tango::Attribute &attr)
Attribute DoubleScalar related methods.
virtual void write_IntScalar(Tango::WAttribute &attr)
Write attribute IntScalar related method.
~TangoTestServer()
The device object destructor.
virtual void read_IntSpectrum(Tango::Attribute &attr)
Attribute IntSpectrum related methods.
Tango::DevBoolean * attr_BooleanScalar_read
virtual void read_StringScalar(Tango::Attribute &attr)
Attribute StringScalar related methods.
virtual void read_FloatRoScalar(Tango::Attribute &attr)
Attribute FloatRoScalar related methods.
virtual void read_FloatSpectrum(Tango::Attribute &attr)
Attribute FloatSpectrum related methods.
virtual void read_FloatRoSpectrum(Tango::Attribute &attr)
Attribute FloatRoSpectrum related methods.
virtual void write_DoubleSpectrum(Tango::WAttribute &attr)
Write attribute DoubleSpectrum related method.
Tango::DevDouble * attr_DoubleSpectrum_read
virtual void write_BooleanScalar(Tango::WAttribute &attr)
Write attribute BooleanScalar related method.
virtual void read_DoubleSpectrum(Tango::Attribute &attr)
Attribute DoubleSpectrum related methods.
virtual void read_BooleanScalar(Tango::Attribute &attr)
Attribute BooleanScalar related methods.
virtual void write_BooleanWoScalar(Tango::WAttribute &attr)
Attribute BooleanWoScalar related methods.
virtual void read_DoubleRoSpectrum(Tango::Attribute &attr)
Attribute DoubleRoSpectrum related methods.
virtual void write_FloatWoSpectrum(Tango::WAttribute &attr)
Write attribute FloatWoSpectrum related method.
virtual void write_DoubleWoSpectrum(Tango::WAttribute &attr)
Attribute DoubleWoSpectrum related methods.
TangoTestServer class description: