PowerSupply Class Reference

Inheritance diagram for PowerSupply:

BaseInstrument Agilent6627A

List of all members.


Detailed Description

Base Class for all the power supply devices.

Author:
Andrea Giachero (Andrea.Giachero@lngs.infn.it)

Public Member Functions

 PowerSupply (const std::string name, const std::string vendor, size_t n_channel)
 ctor
virtual ~PowerSupply ()
 dtor
const size_t GetNumberOfChannel () const
 Getter for the number of channel.
virtual bool SetVoltage (double voltage, size_t channel)=0
 Sets the voltage of the specified output channel.
virtual bool GetVoltage (double &voltage, size_t channel)=0
 Get the present voltage setting of the specified output channel.
virtual bool SetCurrent (double current, size_t channel)=0
 Sets the current of the specified output channel.
virtual bool GetCurrent (double &current, size_t channel)=0
 Gets the present current setting to the specified output channel.
virtual bool GetOutputVoltage (double &voltage, size_t channel)=0
 Gets the measured output voltage of the specified output channel.
virtual bool GetOutputCurrent (double &current, size_t channel)=0
 Gets the measured output current of the specified output channel.
virtual bool SetOutputEnable (bool enable, size_t channel)=0
 Turns the specified output channel on (true, 1) or off (false, 0).
virtual bool GetOutputEnable (bool &enable, size_t channel)=0
 Get whether the specified output channel is turned on or off.
bool EnableOutput (size_t channel)
 enable output of the specified channel
bool DisableOutput (size_t channel)
 diaable output of the specified channel

Private Attributes

const size_t f_numb

Constructor & Destructor Documentation

PowerSupply::PowerSupply ( const std::string  name,
const std::string  vendor,
size_t  n_channel 
)

ctor

Parameters:
name Power Supply namexs
vendor Power Supply vendor
number of channel


Member Function Documentation

virtual bool PowerSupply::SetVoltage ( double  voltage,
size_t  channel 
) [pure virtual]

Sets the voltage of the specified output channel.

Parameters:
voltage value to set
channel specified output channel
Returns:
true on success, false on failure. In case of failure the error code is set. The error code can be retrieved by mean of GetErrorCode() while the error message can be retrieved by mean of GetErrorMsg()

Implemented in Agilent6627A.

Referenced by QPowerSupply::SetDouble().

virtual bool PowerSupply::GetVoltage ( double &  voltage,
size_t  channel 
) [pure virtual]

Get the present voltage setting of the specified output channel.

Parameters:
voltage present voltage setting returned
channel specified output channel
Returns:
true on success, false on failure. In case of failure the error code is set. The error code can be retrieved by mean of GetErrorCode() while the error message can be retrieved by mean of GetErrorMsg()

Implemented in Agilent6627A.

Referenced by QPowerSupply::GetDouble().

virtual bool PowerSupply::SetCurrent ( double  current,
size_t  channel 
) [pure virtual]

Sets the current of the specified output channel.

Parameters:
current value to set
channel specified output channel
Returns:
true on success, false on failure. In case of failure the error code is set. The error code can be retrieved by mean of GetErrorCode() while the error message can be retrieved by mean of GetErrorMsg()

Implemented in Agilent6627A.

Referenced by QPowerSupply::SetDouble().

virtual bool PowerSupply::GetCurrent ( double &  current,
size_t  channel 
) [pure virtual]

Gets the present current setting to the specified output channel.

Parameters:
current present current returned
channel specified output channel
Returns:
true on success, false on failure. In case of failure the error code is set. The error code can be retrieved by mean of GetErrorCode() while the error message can be retrieved by mean of GetErrorMsg()

Implemented in Agilent6627A.

Referenced by QPowerSupply::GetDouble().

virtual bool PowerSupply::GetOutputVoltage ( double &  voltage,
size_t  channel 
) [pure virtual]

Gets the measured output voltage of the specified output channel.

Parameters:
voltage measured output voltage returned
channel specified output channel
Returns:
true on success, false on failure. In case of failure the error code is set. The error code can be retrieved by mean of GetErrorCode() while the error message can be retrieved by mean of GetErrorMsg()

Implemented in Agilent6627A.

Referenced by QPowerSupply::GetDouble().

virtual bool PowerSupply::GetOutputCurrent ( double &  current,
size_t  channel 
) [pure virtual]

Gets the measured output current of the specified output channel.

Parameters:
current measured output voltage returned
channel specified output channel
Returns:
true on success, false on failure. In case of failure the error code is set. The error code can be retrieved by mean of GetErrorCode() while the error message can be retrieved by mean of GetErrorMsg()

Implemented in Agilent6627A.

Referenced by QPowerSupply::GetDouble().

virtual bool PowerSupply::SetOutputEnable ( bool  enable,
size_t  channel 
) [pure virtual]

Turns the specified output channel on (true, 1) or off (false, 0).

Parameters:
enable if true the specified output is turned on, otherwise (false) is turned off
channel specified output channel
Returns:
true on success, false on failure. In case of failure the error code is set. The error code can be retrieved by mean of GetErrorCode() while the error message can be retrieved by mean of GetErrorMsg()

Implemented in Agilent6627A.

Referenced by DisableOutput(), EnableOutput(), and QPowerSupply::SetBool().

virtual bool PowerSupply::GetOutputEnable ( bool &  enable,
size_t  channel 
) [pure virtual]

Get whether the specified output channel is turned on or off.

Parameters:
enable response, The can be either true (1,turned on) or false (0, turned off).
channel specified output channel
Returns:
true on success, false on failure. In case of failure the error code is set. The error code can be retrieved by mean of GetErrorCode() while the error message can be retrieved by mean of GetErrorMsg()

Implemented in Agilent6627A.

Referenced by QPowerSupply::GetBool().

bool PowerSupply::EnableOutput ( size_t  channel  )  [inline]

enable output of the specified channel

Parameters:
channel specified output channel
Returns:
true on success, false on failure. In case of failure the error code is set. The error code can be retrieved by mean of GetErrorCode() while the error message can be retrieved by mean of GetErrorMsg()

References SetOutputEnable().

bool PowerSupply::DisableOutput ( size_t  channel  )  [inline]

diaable output of the specified channel

Parameters:
channel specified output channel
Returns:
true on success, false on failure. In case of failure the error code is set. The error code can be retrieved by mean of GetErrorCode() while the error message can be retrieved by mean of GetErrorMsg()

References SetOutputEnable().


Member Data Documentation

const size_t PowerSupply::f_numb [private]

Number of channel of the power supply

Referenced by GetNumberOfChannel().


The documentation for this class was generated from the following files:

Generated on Tue Nov 16 10:50:03 2010 for CUORE Software by  doxygen 1.5.6