class HVgroup

Class that handles groups of HV channels

Public Methods

HVgroup( const char *Name, const char *ModuleType )
Constructor for a named group which contains modules of the type ModuleType
~HVgroup()
Destructor

Public

Accessors to the group
pstring getName()
Returns the name of the group
pstring getType()
Returns the module types
pstring getNbElements()
Returns the number of channels in the group
int getLastOpStatus()
Returns the status of the last EPICS channel access call
void dumpGroup( ostream &os = cout )
Writes the list of channels to ostream
bool ChannelInGroup( const char *pcName )
Returns true if the channel with the same pcName is in the list
HVchannel* getChannel( const char* pcName )
Given the name of a channel finds it in the group and return a pointer (or NULL)
int getChannels( list<HVchannel*> &theList )
Returns a linked list with the pointers to the channels in the group
Adding and removing channels/modules to/from the group
int addChannel( HVchannel *pChannel )
Adds a channel to the group
int removeChannel( HVchannel *pChannel )
Removes a channel from the group
int removeChannel( const char *pcChannelName )
Removes a channel from the group
int addModule( HVmodule *pModule )
Adds a HV module to the group
int removeModule( HVmodule *pModule )
Removes a module from the group
int removeModule( const char* pcModuleName )
Removes a module from the group
Reading values from the EPICS IOC record
int getSetpoint( list< pair< HVchannel*, HVsetpoint > >& listOfPairs )
All the set points of the channels in the group
int getReadback( list< pair< HVchannel*, HVreadback > >& listOfPairs )
All the read back points of the channels in the group
int getCurrent( list< pair< HVchannel*, double > >& listOfPairs )
Measured current [microAmp]
int getVoltage( list< pair< HVchannel*, double > >& listOfPairs )
Measured voltage [Volt]
int getDemandVoltage( list< pair< HVchannel*, double > >& listOfPairs )
Demand voltage [Volt]
int getRampUpRate( list< pair< HVchannel*, double > >& listOfPairs )
Ramp up rate [Volt/sec]
int getRampDownRate( list< pair< HVchannel*, double > >& listOfPairs )
Ramp down rate [Volt/sec]
int getTripCurrent( list< pair< HVchannel*, double > >& listOfPairs )
Trip Current in [microAmp]
int getEnabled( list< pair< HVchannel*, bool > >& listOfPairs )
Returns true if the channel is enabled
int getChannelStatus( list< pair< HVchannel*, int > >& listOfPairs )
Returns the channel status as read from the hardware itself
int getMeasuredVoltageDeadZone( list< pair< HVchannel*, double > >& listOfPairs )
Measured Voltage dead zone [Volt]
int getMeasuredCurrentDeadZone( list< pair< HVchannel*, double > >& listOfPairs )
Measured current dead zone [Volt]
int getHighVoltageLimit( list< pair< HVchannel*, double > >& listOfPairs )
The (hardware) imposed high voltage limit (as given by the potentiometer)
int getRampTripEnable( list< pair< HVchannel1471*, bool> >& listOfPairs )
Ramp Trip Enable (1471 modules only)
int getPeakCurrent( list< pair< HVchannel1471*, double> >& listOfPairs )
Peak Current [microAmp] (1471 modules only)
int getPeakTripCurrent( list< pair< HVchannel1471*, double> >& listOfPairs )
Peak Current Trip [microAmp] (1471 modules only)
To store and retrieve readbacks and setpoints from the database
int storeSetpoint( list< pair< HVchannel*, HVsetpoint > >& listOfPairs, struct tm *stmTime = NULL )
Store all the setpoints (individual setpoints per channel)
int storeSetpoint( HVsetpoint &sp, struct tm *stmTime = NULL )
Store one setpoint for all channels in the group
int storeReadback( list< pair< HVchannel*, HVreadback > >& listOfPairs, struct tm *stmTime = NULL )
To store all the readbacks of the list in the database
Writing values into the EPICS IOC record
int setSetpoint( HVsetpoint &setpoint )
Sets all the set points of the channels in the group
int Enable()
Enables the channel
int Disable()
Disables the channel
int setDemandVoltage( double dVoltage )
Demand voltage [Volt]
int setRampUpRate( double dRampRate )
Ramp up rate [Volt/sec]
int setRampDownRate( double dRampRate )
Ramp down rate [Volt/sec]
int setTripCurrent( double dTripCurrent )
Trip Current in [microAmp]
int set1469TripCurrent( double dBulkCurrent, double dChanCurrent )
Seperate Trip Currents for Bulk Supplies and Controlled Channels
int setMeasuredVoltageDeadZone( double dVoltage )
Measured Voltage dead zone [Volt]
int setMeasuredCurrentDeadZone( double dVoltage )
Measured current dead zone [Volt]
int set1469MCDZ( double dBulkCurrent, double dChanCurrent )
Differing MCDZs for Bulk Supplies and the Controlled Channels
int setRampTripEnable( bool bRTE )
Ramp Trip Enable (1471 modules only)
int setPeakTripCurrent( double dPTC )
Peak Trip Current (1471 modules only)

Protected Fields

int iStatus
Status of the last CA call
list < HVchannel* > myChannels
List of the HV channels in the group.
pstring pcName
Name of the group
pstring pcType
Type of the modules in the group

Protected Methods

list < HVchannel*> ::iterator findChannel( HVchannel *pChannel )
Finds a channel in the list myChannels and returns an iterator it
list < HVchannel*> ::iterator findChannelByName( const char *name )
Finds a channel by name in the list myChannels and returns an iterator it

Documentation

Class that handles groups of HV channels. The group can consist of any arbitrary number of HV channels and the operations apply uniformly over all members of the group.

Individual channels can be added/removed from the group. Whole modules (i.e. all the channels of a module) can be added/removed from the group.

Only channels of the same module type can belong to the same group. A channel can belong to any number of groups.

Note:
In this current implementation we perform all the operations one by one on the HVchannels. Clearly we can optimize this as we learn more about ezca.

MODIFICATIONS:
Jan 25, 99: adding protections for groups consisting of modules with bulk supplies in the form of if ( (*it)->hasBulkSupply() == false || (*it)->isBulkSupply() )
CW


HVgroup( const char *Name, const char *ModuleType )
Constructor for a named group which contains modules of the type ModuleType

~HVgroup()
Destructor

Adding and removing channels/modules to/from the group

int addChannel( HVchannel *pChannel )
Adds a channel to the group
Returns:
hvcSuccess,
hvcOpFailed if the channel is already in the group,
hvBadModuleType if the channel is from a different type than the group.

int removeChannel( HVchannel *pChannel )
Removes a channel from the group
Returns:
hvcSuccess,
hvcOpFailed if the channel is not in the group.

int removeChannel( const char *pcChannelName )
Removes a channel from the group
Returns:
hvcSuccess,
hvcOpFailed if the channel is not in the group.

int addModule( HVmodule *pModule )
Adds a HV module to the group. Note that the channel is only removed from the group, but the HVchannel object is not deleted.
Returns:
hvcSuccess if all channels have been added successfully,
hvcOpFailed if some or all of the channel of the module is/are already in the group. hvcNoElementNotFound if no element was found.

int removeModule( HVmodule *pModule )
Removes a module from the group. Note that the channels of the module are only removed from the group, no object is deleted.
Returns:
hvcSuccess if all channels have been removed successfully from the group
hvcOpFailed if some or all of the channel of the module is/are not in the group,

int removeModule( const char* pcModuleName )
Removes a module from the group. Note that the channels of the module are only removed from the group, no object is deleted.
Returns:
hvcSuccess if all channels have been removed successfully from the group
hvcOpFailed if some or all of the channel of the module is/are not in the group,
hvcBadModuleType if the channel is from a different type than the group.

Accessors to the group

pstring getName()
Returns the name of the group

pstring getType()
Returns the module types

pstring getNbElements()
Returns the number of channels in the group

int getLastOpStatus()
Returns the status of the last EPICS channel access call

void dumpGroup( ostream &os = cout )
Writes the list of channels to ostream

bool ChannelInGroup( const char *pcName )
Returns true if the channel with the same pcName is in the list

HVchannel* getChannel( const char* pcName )
Given the name of a channel finds it in the group and return a pointer (or NULL)

int getChannels( list<HVchannel*> &theList )
Returns a linked list with the pointers to the channels in the group

Reading values from the EPICS IOC record

int getSetpoint( list< pair< HVchannel*, HVsetpoint > >& listOfPairs )
All the set points of the channels in the group

int getReadback( list< pair< HVchannel*, HVreadback > >& listOfPairs )
All the read back points of the channels in the group

int getCurrent( list< pair< HVchannel*, double > >& listOfPairs )
Measured current [microAmp]

int getVoltage( list< pair< HVchannel*, double > >& listOfPairs )
Measured voltage [Volt]

int getDemandVoltage( list< pair< HVchannel*, double > >& listOfPairs )
Demand voltage [Volt]

int getRampUpRate( list< pair< HVchannel*, double > >& listOfPairs )
Ramp up rate [Volt/sec]

int getRampDownRate( list< pair< HVchannel*, double > >& listOfPairs )
Ramp down rate [Volt/sec]

int getTripCurrent( list< pair< HVchannel*, double > >& listOfPairs )
Trip Current in [microAmp]

int getEnabled( list< pair< HVchannel*, bool > >& listOfPairs )
Returns true if the channel is enabled

int getChannelStatus( list< pair< HVchannel*, int > >& listOfPairs )
Returns the channel status as read from the hardware itself

int getMeasuredVoltageDeadZone( list< pair< HVchannel*, double > >& listOfPairs )
Measured Voltage dead zone [Volt]

int getMeasuredCurrentDeadZone( list< pair< HVchannel*, double > >& listOfPairs )
Measured current dead zone [Volt]

int getHighVoltageLimit( list< pair< HVchannel*, double > >& listOfPairs )
The (hardware) imposed high voltage limit (as given by the potentiometer)

int getRampTripEnable( list< pair< HVchannel1471*, bool> >& listOfPairs )
Ramp Trip Enable (1471 modules only)

int getPeakCurrent( list< pair< HVchannel1471*, double> >& listOfPairs )
Peak Current [microAmp] (1471 modules only)

int getPeakTripCurrent( list< pair< HVchannel1471*, double> >& listOfPairs )
Peak Current Trip [microAmp] (1471 modules only)

Writing values into the EPICS IOC record

int setSetpoint( HVsetpoint &setpoint )
Sets all the set points of the channels in the group

int Enable()
Enables the channel

int Disable()
Disables the channel

int setDemandVoltage( double dVoltage )
Demand voltage [Volt]

int setRampUpRate( double dRampRate )
Ramp up rate [Volt/sec]

int setRampDownRate( double dRampRate )
Ramp down rate [Volt/sec]

int setTripCurrent( double dTripCurrent )
Trip Current in [microAmp]

int set1469TripCurrent( double dBulkCurrent, double dChanCurrent )
Seperate Trip Currents for Bulk Supplies and Controlled Channels

int setMeasuredVoltageDeadZone( double dVoltage )
Measured Voltage dead zone [Volt]

int setMeasuredCurrentDeadZone( double dVoltage )
Measured current dead zone [Volt]

int set1469MCDZ( double dBulkCurrent, double dChanCurrent )
Differing MCDZs for Bulk Supplies and the Controlled Channels

int setRampTripEnable( bool bRTE )
Ramp Trip Enable (1471 modules only)

int setPeakTripCurrent( double dPTC )
Peak Trip Current (1471 modules only)

To store and retrieve readbacks and setpoints from the database

int storeSetpoint( list< pair< HVchannel*, HVsetpoint > >& listOfPairs, struct tm *stmTime = NULL )
Store all the setpoints (individual setpoints per channel)

int storeSetpoint( HVsetpoint &sp, struct tm *stmTime = NULL )
Store one setpoint for all channels in the group

int storeReadback( list< pair< HVchannel*, HVreadback > >& listOfPairs, struct tm *stmTime = NULL )
To store all the readbacks of the list in the database

list < HVchannel*> ::iterator findChannel( HVchannel *pChannel )
Finds a channel in the list myChannels and returns an iterator it

list < HVchannel*> ::iterator findChannelByName( const char *name )
Finds a channel by name in the list myChannels and returns an iterator it

pstring pcName
Name of the group

pstring pcType
Type of the modules in the group

int iStatus
Status of the last CA call

list < HVchannel* > myChannels
List of the HV channels in the group.


This class has no child classes.
Author:
C.Witzig
Date: July 6, 98
Version:
Last update July 6, 98

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de