/* Copyright (c) 20011 Hovanes Egiyan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "BaseIUBaseBoard.hh" using namespace std; //! Initialize all parameters for the IU base board //! Only parameters in this list will be processed, but //! not necessarily all of them. void BaseIUBaseBoard::InitParameters() { if (bmDebFlag > 1) { cout << "BaseIUBaseBoard::InitParameters() : Initializing board parameters for " << "board with address " << bmAddress << endl; } { //! Board unnamed status parameter. Name does not have impact //! for the status parameter BaseIUVirtPar* parPtr = new BaseIUParStatus(BaseIUParStatus::bpsParType, *this); MtxLock objLock(bmMutex); bvbPar[BaseIUParStatus::bpsParType][BaseIUParStatus::bpsParType] = parPtr; objLock.Unlock(); } //! Below are initialization of the ADC parameters on the board //! Each parameter has a name which determines the extra bytes //! sent to the hardware { //! ADC for Medium Voltage Bottom BaseIUVirtPar* parPtr = new BaseIUParADC("MVB", *this); MtxLock objLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["MVB"] = parPtr; objLock.Unlock(); } { //! ADC for Medium Voltage Top BaseIUVirtPar* parPtr = new BaseIUParADC("MVT", *this); MtxLock objLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["MVT"] = parPtr; objLock.Unlock(); } { //! ADC for 1st Dynode BaseIUVirtPar* parPtr = new BaseIUParADC("DYN", *this); MtxLock objLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["DYN"] = parPtr; objLock.Unlock(); } { //! ADC for Cathode voltage BaseIUVirtPar* parPtr = new BaseIUParADC("CAT", *this); MtxLock objLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["CAT"] = parPtr; objLock.Unlock(); } { //! ADC for DAC output voltage BaseIUVirtPar* parPtr = new BaseIUParADC("DAC", *this); MtxLock objLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["DAC"] = parPtr; objLock.Unlock(); } { //! ADC for temperature control BaseIUVirtPar* parPtr = new BaseIUParADC("TEM", *this); MtxLock objLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["TEM"] = parPtr; objLock.Unlock(); } { //! ADC for current monitor BaseIUVirtPar* parPtr = new BaseIUParADC("CUR", *this); MtxLock objLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["CUR"] = parPtr; objLock.Unlock(); } { //! Setpoint readback value for voltage received from the host. //! Sometimes called Demand Voltage BaseIUVirtPar* parPtr = new BaseIUParADC("SET", *this); MtxLock objLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["SET"] = parPtr; objLock.Unlock(); } return; }