Skip to content
Snippets Groups Projects
SpectrumAnalyzer.h 18.6 KiB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621
//=============================================================================
//
// file :        SpectrumAnalyzer.h
//
// description : Include for the SpectrumAnalyzer class.
//
// project :	SpectrumAnalyzer
//
// $Author:  Giacomo Strangolino
//
// $Revision:  0.9 January, 26th, 2006.
//
// $Log: SpectrumAnalyzer.h,v $
// Revision 1.1  2008/04/23 12:27:46  claudio
// first import
//
//
// copyleft :    European Synchrotron Radiation Facility
//               BP 220, Grenoble 38043
//               FRANCE
//
//=============================================================================
//
//  		This file is generated by POGO
//	(Program Obviously used to Generate tango Object)
//
//         (c) - Software Engineering Group - ESRF
//=============================================================================
#ifndef _SPECTRUMANALYZER_H
#define _SPECTRUMANALYZER_H

#include <tango.h>
//using namespace Tango;

/**
 * @author	$Author: claudio $
 * @version	$Revision: 1.1 $
 */

 //	Add your own constants definitions here.
 //-----------------------------------------------


namespace SpectrumAnalyzer_ns
{

/**
 * Class Description:
 * Class for managing spectrum analyzer devices
 */

/*
 *	Device States Description:
 *	Tango::ON :	Device is online
 *	Tango::OFF :	Device is offline
 *	Tango::FAULT :	Device not working
 *	Tango::DISABLE :	accepts commands only from frontal panel. Remote control disabled.
 *	Tango::UNKNOWN :	Device is in unknown state when GPIB is not responding
 */


class SpectrumAnalyzer: public Tango::Device_3Impl
{
public :
	//	Add your own data members here
	//-----------------------------------------


	//	Here is the Start of the automatic code generation part
	//-------------------------------------------------------------	
/**
 *	@name attributes
 *	Attributes member data.
 */
//@{
		Tango::DevDouble	*attr_Span_read;
		Tango::DevDouble	attr_Span_write;
		Tango::DevDouble	*attr_CenterFrequency_read;
		Tango::DevDouble	attr_CenterFrequency_write;
		Tango::DevDouble	*attr_MarkerX_read;
		Tango::DevDouble	*attr_MarkerY_read;
		Tango::DevString	*attr_ErrorPolling_read;
		Tango::DevDouble	*attr_Attenuation_read;
		Tango::DevDouble	attr_Attenuation_write;
		Tango::DevString	*attr_DetectorType_read;
		Tango::DevString	attr_DetectorType_write;
		Tango::DevDouble	*attr_StartFrequency_read;
		Tango::DevDouble	attr_StartFrequency_write;
		Tango::DevDouble	*attr_StopFrequency_read;
		Tango::DevDouble	attr_StopFrequency_write;
		Tango::DevDouble	*attr_FreqOffset_read;
		Tango::DevDouble	attr_FreqOffset_write;
		Tango::DevDouble	*attr_ReferenceLevel_read;
		Tango::DevDouble	attr_ReferenceLevel_write;
		Tango::DevDouble	*attr_StartStop_read;
		Tango::DevDouble	attr_StartStop_write;
		Tango::DevDouble	*attr_TraceReal32_read;
		Tango::DevLong	*attr_TraceInt32_read;
		Tango::DevShort	*attr_OPC_read;
		Tango::DevShort	attr_OPC_write;
		Tango::DevDouble	*attr_ResolutionBandwidth_read;
		Tango::DevDouble	attr_ResolutionBandwidth_write;
		Tango::DevDouble	*attr_PeakThreshold_read;
		Tango::DevDouble	attr_PeakThreshold_write;
		Tango::DevDouble	*attr_PeakExcursion_read;
		Tango::DevDouble	attr_PeakExcursion_write;
		Tango::DevDouble	*attr_GetSignalPeaks_read;
		Tango::DevDouble	*attr_Fs_read;
		Tango::DevDouble	attr_Fs_write;
		Tango::DevDouble	*attr_WindowFs_read;
		Tango::DevDouble	attr_WindowFs_write;
		Tango::DevDouble	*attr_Window_read;
		Tango::DevDouble	attr_Window_write;
		Tango::DevLong	*attr_NumberOfSweeps_read;
		Tango::DevLong	attr_NumberOfSweeps_write;
//@}

/**
 *	@name Device properties
 *	Device properties member data.
 */
//@{
//@}

/**@name Constructors
 * Miscellaneous constructors */
//@{
/**
 * Constructs a newly allocated Command object.
 *
 *	@param cl	Class.
 *	@param s 	Device Name
 */
	SpectrumAnalyzer(Tango::DeviceClass *cl,string &s):Device_3Impl(cl,s) {};
/**
 * Constructs a newly allocated Command object.
 *
 *	@param cl	Class.
 *	@param s 	Device Name
 */
	SpectrumAnalyzer(Tango::DeviceClass *cl,const char *s):Device_3Impl(cl,s) {};
/**
 * Constructs a newly allocated Command object.
 *
 *	@param cl	Class.
 *	@param s 	Device name
 *	@param d	Device description.
 */
	SpectrumAnalyzer(Tango::DeviceClass *cl,const char *s,const char *d):Device_3Impl(cl,s,d) {};
//@}

/**
 * @name SpectrumAnalyzer methods prototypes
 */

//@{
/**
 *	Hardware acquisition for attributes.
 */
	virtual void read_attr_hardware(vector<long> &attr_list) = 0;
/**
 *	Extract real attribute values for Span acquisition result.
 */
	virtual void read_Span(Tango::Attribute &attr) = 0;
/**
 *	Write Span attribute values to hardware.
 */
	virtual void write_Span(Tango::WAttribute &attr) = 0;
/**
 *	Extract real attribute values for CenterFrequency acquisition result.
 */
	virtual void read_CenterFrequency(Tango::Attribute &attr) = 0;
/**
 *	Write CenterFrequency attribute values to hardware.
 */
	virtual void write_CenterFrequency(Tango::WAttribute &attr) = 0;
/**
 *	Extract real attribute values for MarkerX acquisition result.
 */
	virtual void read_MarkerX(Tango::Attribute &attr) = 0;
/**
 *	Extract real attribute values for MarkerY acquisition result.
 */
	virtual void read_MarkerY(Tango::Attribute &attr) = 0;
/**
 *	Extract real attribute values for ErrorPolling acquisition result.
 */
	virtual void read_ErrorPolling(Tango::Attribute &attr) = 0;
/**
 *	Extract real attribute values for Attenuation acquisition result.
 */
	virtual void read_Attenuation(Tango::Attribute &attr) = 0;
/**
 *	Write Attenuation attribute values to hardware.
 */
	virtual void write_Attenuation(Tango::WAttribute &attr) = 0;
/**
 *	Extract real attribute values for DetectorType acquisition result.
 */
	virtual void read_DetectorType(Tango::Attribute &attr) = 0;
/**
 *	Write DetectorType attribute values to hardware.
 */
	virtual void write_DetectorType(Tango::WAttribute &attr) = 0;
/**
 *	Extract real attribute values for StartFrequency acquisition result.
 */
	virtual void read_StartFrequency(Tango::Attribute &attr) = 0;
/**
 *	Write StartFrequency attribute values to hardware.
 */
	virtual void write_StartFrequency(Tango::WAttribute &attr) = 0;
/**
 *	Extract real attribute values for StopFrequency acquisition result.
 */
	virtual void read_StopFrequency(Tango::Attribute &attr) = 0;
/**
 *	Write StopFrequency attribute values to hardware.
 */
	virtual void write_StopFrequency(Tango::WAttribute &attr) = 0;
/**
 *	Extract real attribute values for FreqOffset acquisition result.
 */
	virtual void read_FreqOffset(Tango::Attribute &attr) = 0;
/**
 *	Write FreqOffset attribute values to hardware.
 */
	virtual void write_FreqOffset(Tango::WAttribute &attr) = 0;
/**
 *	Extract real attribute values for ReferenceLevel acquisition result.
 */
	virtual void read_ReferenceLevel(Tango::Attribute &attr) = 0;
/**
 *	Write ReferenceLevel attribute values to hardware.
 */
	virtual void write_ReferenceLevel(Tango::WAttribute &attr) = 0;
/**
 *	Extract real attribute values for StartStop acquisition result.
 */
	virtual void read_StartStop(Tango::Attribute &attr) = 0;
/**
 *	Write StartStop attribute values to hardware.
 */
	virtual void write_StartStop(Tango::WAttribute &attr) = 0;
/**
 *	Extract real attribute values for TraceReal32 acquisition result.
 */
	virtual void read_TraceReal32(Tango::Attribute &attr) = 0;
/**
 *	Extract real attribute values for TraceInt32 acquisition result.
 */
	virtual void read_TraceInt32(Tango::Attribute &attr) = 0;
/**
 *	Extract real attribute values for OPC acquisition result.
 */
	virtual void read_OPC(Tango::Attribute &attr) = 0;
/**
 *	Write OPC attribute values to hardware.
 */
	virtual void write_OPC(Tango::WAttribute &attr) = 0;
/**
 *	Extract real attribute values for ResolutionBandwidth acquisition result.
 */
	virtual void read_ResolutionBandwidth(Tango::Attribute &attr) = 0;
/**
 *	Write ResolutionBandwidth attribute values to hardware.
 */
	virtual void write_ResolutionBandwidth(Tango::WAttribute &attr) = 0;
/**
 *	Extract real attribute values for PeakThreshold acquisition result.
 */
	virtual void read_PeakThreshold(Tango::Attribute &attr) = 0;
/**
 *	Write PeakThreshold attribute values to hardware.
 */
	virtual void write_PeakThreshold(Tango::WAttribute &attr) = 0;
/**
 *	Extract real attribute values for PeakExcursion acquisition result.
 */
	virtual void read_PeakExcursion(Tango::Attribute &attr) = 0;
/**
 *	Write PeakExcursion attribute values to hardware.
 */
	virtual void write_PeakExcursion(Tango::WAttribute &attr) = 0;
/**
 *	Extract real attribute values for GetSignalPeaks acquisition result.
 */
	virtual void read_GetSignalPeaks(Tango::Attribute &attr) = 0;
/**
 *	Extract real attribute values for Fs acquisition result.
 */
	virtual void read_Fs(Tango::Attribute &attr) = 0;
/**
 *	Write Fs attribute values to hardware.
 */
	virtual void write_Fs(Tango::WAttribute &attr) = 0;
/**
 *	Extract real attribute values for WindowFs acquisition result.
 */
	virtual void read_WindowFs(Tango::Attribute &attr) = 0;
/**
 *	Write WindowFs attribute values to hardware.
 */
	virtual void write_WindowFs(Tango::WAttribute &attr) = 0;
/**
 *	Extract real attribute values for Window acquisition result.
 */
	virtual void read_Window(Tango::Attribute &attr) = 0;
/**
 *	Write Window attribute values to hardware.
 */
	virtual void write_Window(Tango::WAttribute &attr) = 0;
/**
 *	Extract real attribute values for NumberOfSweeps acquisition result.
 */
	virtual void read_NumberOfSweeps(Tango::Attribute &attr) = 0;
/**
 *	Write NumberOfSweeps attribute values to hardware.
 */
	virtual void write_NumberOfSweeps(Tango::WAttribute &attr) = 0;
/**
 *	Read/Write allowed for Span attribute.
 */
	virtual bool is_Span_allowed(Tango::AttReqType type){ return true; };
/**
 *	Read/Write allowed for CenterFrequency attribute.
 */
	virtual bool is_CenterFrequency_allowed(Tango::AttReqType type){ return true; };
/**
 *	Read/Write allowed for MarkerX attribute.
 */
	virtual bool is_MarkerX_allowed(Tango::AttReqType type){ return true; };
/**
 *	Read/Write allowed for MarkerY attribute.
 */
	virtual bool is_MarkerY_allowed(Tango::AttReqType type){ return true; };
/**
 *	Read/Write allowed for ErrorPolling attribute.
 */
	virtual bool is_ErrorPolling_allowed(Tango::AttReqType type){ return true; };
/**
 *	Read/Write allowed for Attenuation attribute.
 */
	virtual bool is_Attenuation_allowed(Tango::AttReqType type){ return true; };
/**
 *	Read/Write allowed for DetectorType attribute.
 */
	virtual bool is_DetectorType_allowed(Tango::AttReqType type){ return true; };
/**
 *	Read/Write allowed for StartFrequency attribute.
 */
	virtual bool is_StartFrequency_allowed(Tango::AttReqType type){ return true; };
/**
 *	Read/Write allowed for StopFrequency attribute.
 */
	virtual bool is_StopFrequency_allowed(Tango::AttReqType type){ return true; };
/**
 *	Read/Write allowed for FreqOffset attribute.
 */
	virtual bool is_FreqOffset_allowed(Tango::AttReqType type){ return true; };
/**
 *	Read/Write allowed for ReferenceLevel attribute.
 */
	virtual bool is_ReferenceLevel_allowed(Tango::AttReqType type){ return true; };
/**
 *	Read/Write allowed for StartStop attribute.
 */
	virtual bool is_StartStop_allowed(Tango::AttReqType type){ return true; };
/**
 *	Read/Write allowed for TraceReal32 attribute.
 */
	virtual bool is_TraceReal32_allowed(Tango::AttReqType type){ return true; };
/**
 *	Read/Write allowed for TraceInt32 attribute.
 */
	virtual bool is_TraceInt32_allowed(Tango::AttReqType type){ return true; };
/**
 *	Read/Write allowed for OPC attribute.
 */
	virtual bool is_OPC_allowed(Tango::AttReqType type){ return true; };
/**
 *	Read/Write allowed for ResolutionBandwidth attribute.
 */
	virtual bool is_ResolutionBandwidth_allowed(Tango::AttReqType type){ return true; };
/**
 *	Read/Write allowed for PeakThreshold attribute.
 */
	virtual bool is_PeakThreshold_allowed(Tango::AttReqType type){ return true; };
/**
 *	Read/Write allowed for PeakExcursion attribute.
 */
	virtual bool is_PeakExcursion_allowed(Tango::AttReqType type){ return true; };
/**
 *	Read/Write allowed for GetSignalPeaks attribute.
 */
	virtual bool is_GetSignalPeaks_allowed(Tango::AttReqType type){ return true; };
/**
 *	Read/Write allowed for Fs attribute.
 */
	virtual bool is_Fs_allowed(Tango::AttReqType type){ return true; };
/**
 *	Read/Write allowed for WindowFs attribute.
 */
	virtual bool is_WindowFs_allowed(Tango::AttReqType type){ return true; };
/**
 *	Read/Write allowed for Window attribute.
 */
	virtual bool is_Window_allowed(Tango::AttReqType type){ return true; };
/**
 *	Read/Write allowed for NumberOfSweeps attribute.
 */
	virtual bool is_NumberOfSweeps_allowed(Tango::AttReqType type){ return true; };
/**
 *	Execution allowed for Reset command.
 */
	virtual bool is_Reset_allowed(const CORBA::Any &any){ return true; };
/**
 *	Execution allowed for ClearStatus command.
 */
	virtual bool is_ClearStatus_allowed(const CORBA::Any &any){ return true; };
/**
 *	Execution allowed for Remote command.
 */
	virtual bool is_Remote_allowed(const CORBA::Any &any){ return true; };
/**
 *	Execution allowed for Local command.
 */
	virtual bool is_Local_allowed(const CORBA::Any &any){ return true; };
/**
 *	Execution allowed for GetPeak command.
 */
	virtual bool is_GetPeak_allowed(const CORBA::Any &any){ return true; };
/**
 *	Execution allowed for SetSingleSweep command.
 */
	virtual bool is_SetSingleSweep_allowed(const CORBA::Any &any){ return true; };
/**
 *	Execution allowed for ChangePowUnits command.
 */
	virtual bool is_ChangePowUnits_allowed(const CORBA::Any &any){ return true; };
/**
 *	Execution allowed for GetErrorInfo command.
 */
	virtual bool is_GetErrorInfo_allowed(const CORBA::Any &any){ return true; };
/**
 *	Execution allowed for GetMin command.
 */
	virtual bool is_GetMin_allowed(const CORBA::Any &any){ return true; };
/**
 *	Execution allowed for SetContinuousSweep command.
 */
	virtual bool is_SetContinuousSweep_allowed(const CORBA::Any &any){ return true; };
/**
 *	Execution allowed for RestartMeasurement command.
 */
	virtual bool is_RestartMeasurement_allowed(const CORBA::Any &any){ return true; };
/**
 *	Execution allowed for SetAutoAttenuation command.
 */
	virtual bool is_SetAutoAttenuation_allowed(const CORBA::Any &any){ return true; };
/**
 *	Execution allowed for GetAutoAttenuation command.
 */
	virtual bool is_GetAutoAttenuation_allowed(const CORBA::Any &any){ return true; };
/**
 *	Execution allowed for SetAsciiData command.
 */
	virtual bool is_SetAsciiData_allowed(const CORBA::Any &any){ return true; };
/**
 *	Execution allowed for SetINT32Data command.
 */
	virtual bool is_SetINT32Data_allowed(const CORBA::Any &any){ return true; };
/**
 *	Execution allowed for SetReal32Data command.
 */
	virtual bool is_SetReal32Data_allowed(const CORBA::Any &any){ return true; };
/**
 *	Execution allowed for GetDataFormat command.
 */
	virtual bool is_GetDataFormat_allowed(const CORBA::Any &any){ return true; };
/**
 *	Execution allowed for SaveData command.
 */
	virtual bool is_SaveData_allowed(const CORBA::Any &any){ return true; };
/**
 *	Execution allowed for PrintData command.
 */
	virtual bool is_PrintData_allowed(const CORBA::Any &any){ return true; };
/**
 * Resets instrument
 *	@exception DevFailed
 */
	virtual void	reset() = 0;
/**
 * Clears all data in instrument. IEEE common command.
 *	See specific instrument documentation for details.
 *	@exception DevFailed
 */
	virtual void	clear_status() = 0;
/**
 * Remote control enabled.
 *	@exception DevFailed
 */
	virtual void	remote() = 0;
/**
 * Disables remote control and enables front panel instrument interaction.
 *	@exception DevFailed
 */
	virtual void	local() = 0;
/**
 * Sets the marker to the maximum peak. Then one can read X and Y positions of the just
 *	placed marker.
 *	@exception DevFailed
 */
	virtual void	get_peak() = 0;
/**
 * Sets the analyzer to the single sweep mode.
 *	See specific instrument documentation for details.
 *	IVI SpecAn base attribute.
 *	@exception DevFailed
 */
	virtual void	set_single_sweep() = 0;
/**
 * Changes the power units of measure. Values allowed: DBM, DBMV, DBUV, W, V.
 *	IVI SpecAn base attribute.
 *	See specific instrument documentation for details.
 *	@param	argin	Set the power units of measure: DBM, DBMV, DBUV, W, V
 *	@exception DevFailed
 */
	virtual void	change_pow_units(Tango::DevString) = 0;
/**
 * Queries the earliest entry to the error queue and then deletes that entry.
 *	@return	The string represents the earliest entry to the error queue.
 *	@exception DevFailed
 */
	virtual Tango::DevString	get_error_info() = 0;
/**
 * Sets marker to the minimum amplitude value in current measure. Then one can read
 *	the X and Y values querying the MarkerX and MarkerY attributes.
 *	@exception DevFailed
 */
	virtual void	get_min() = 0;
/**
 * The trigger system is continuously initiated.
 *	See specific instrument documentation for details.
 *	IVI SpecAn base attribute 'Sweep Mode Continuous'.
 *	@exception DevFailed
 */
	virtual void	set_continuous_sweep() = 0;
/**
 * Restarts the measurement.
 *	In instrument specific documentation one can find some details about the meaning of this
 *	command.
 *	@exception DevFailed
 */
	virtual void	restart_measurement() = 0;
/**
 * Enables or disables auto attenuation.
 *	IVI SpecAn base attribute.
 *	@param	argin	1 Enables auto attenuation, 0 disables it.
 *	@exception DevFailed
 */
	virtual void	set_auto_attenuation(Tango::DevBoolean) = 0;
/**
 * Returns auto attenuation status: enabled or disabled.
 *	Auto attenuation is an IVI SpecAn base attribute.
 *	@return	! if auto attenuation is enabled, 0 if disabled
 *	@exception DevFailed
 */
	virtual Tango::DevBoolean	get_auto_attenuation() = 0;
/**
 * Sets the format of the output data of a measurement to ASCII.
 *	@exception DevFailed
 */
	virtual void	set_ascii_data() = 0;
/**
 * Sets the format of data to INT 32 (fastest). Trace data are in mdBm.
 *	@exception DevFailed
 */
	virtual void	set_int32_data() = 0;
/**
 * Sets the format of data to REAL 32: real values in amplitude units, in a definite length block.
 *	@exception DevFailed
 */
	virtual void	set_real32_data() = 0;
/**
 * Returns the format of the data in trace.
 *	@return	Returns the format of the data in trace
 *	@exception DevFailed
 */
	virtual Tango::DevString	get_data_format() = 0;
/**
 * Save trace data to the specified file.
 *	@param	argin	Name of the file to which you want to save trace data.
 *	@exception DevFailed
 */
	virtual void	save_data(Tango::DevString) = 0;
/**
 * Specifying a filename containing an instrument data trace, data in trace is printed out on a
 *	string.
 *	@param	argin	Input data filename.
 *	@return	Output in string format.
 *	@exception DevFailed
 */
	virtual Tango::ConstDevString	print_data(Tango::DevString) = 0;

//@}

	//	Here is the end of the automatic code generation part
	//-------------------------------------------------------------	



protected :	
	//	Add your own data members here
	//-----------------------------------------
};

}	// namespace_ns

#endif	// _SPECTRUMANALYZER_H