/* 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 "BaseIUChassisBoard.hh" //! Initialize all parameters for the IU base board //! Only parameters in this list will be processed, but //! not necessarily all of them. void BaseIUChassisBoard::InitParameters() { if (bmDebFlag > 1) { cout << "BaseIUChassisBoard::InitParameters() : Initializing board parameters for " << "board with address " << bmAddress << endl; } { //! Board status parameter named "PINS". Name does not have impact //! for the status parameter BaseIUVirtPar* parPtr = new BaseIUParStatus("", *this); MtxLock scopeLock(bmMutex); bvbPar[BaseIUParStatus::bpsParType][""] = parPtr; scopeLock.Unlock(); } //! Below are initialization of the ADC parameters on the chassis //! Each parameter has a name which determines the extra bytes //! sent to the hardware // Voltages { //! ADC for Left A Voltage BaseIUVirtPar* parPtr = new BaseIUParADC("VLA", *this); MtxLock scopeLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["VLA"] = parPtr; scopeLock.Unlock(); } { //! ADC for Left B Voltage BaseIUVirtPar* parPtr = new BaseIUParADC("VLB", *this); MtxLock scopeLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["VLB"] = parPtr; scopeLock.Unlock(); } { //! ADC for Left C Voltage BaseIUVirtPar* parPtr = new BaseIUParADC("VLC", *this); MtxLock scopeLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["VLC"] = parPtr; scopeLock.Unlock(); } { //! ADC for Left D Voltage BaseIUVirtPar* parPtr = new BaseIUParADC("VLD", *this); MtxLock scopeLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["VLD"] = parPtr; scopeLock.Unlock(); } { //! ADC for Right A Voltage BaseIUVirtPar* parPtr = new BaseIUParADC("VRA", *this); MtxLock scopeLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["VRA"] = parPtr; scopeLock.Unlock(); } { //! ADC for Right B Voltage BaseIUVirtPar* parPtr = new BaseIUParADC("VRB", *this); MtxLock scopeLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["VRB"] = parPtr; scopeLock.Unlock(); } { //! ADC for Right C Voltage BaseIUVirtPar* parPtr = new BaseIUParADC("VRC", *this); MtxLock scopeLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["VRC"] = parPtr; scopeLock.Unlock(); } { //! ADC for Right D Voltage BaseIUVirtPar* parPtr = new BaseIUParADC("VRD", *this); MtxLock scopeLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["VRD"] = parPtr; scopeLock.Unlock(); } // Currents { //! ADC for Left A Current BaseIUVirtPar* parPtr = new BaseIUParADC("ILA", *this); MtxLock scopeLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["ILA"] = parPtr; scopeLock.Unlock(); } { //! ADC for Left B Current BaseIUVirtPar* parPtr = new BaseIUParADC("ILB", *this); MtxLock scopeLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["ILB"] = parPtr; scopeLock.Unlock(); } { //! ADC for Left C Current BaseIUVirtPar* parPtr = new BaseIUParADC("ILC", *this); MtxLock scopeLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["ILC"] = parPtr; scopeLock.Unlock(); } { //! ADC for Left D Current BaseIUVirtPar* parPtr = new BaseIUParADC("ILD", *this); MtxLock scopeLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["ILD"] = parPtr; scopeLock.Unlock(); } { //! ADC for Right A Current BaseIUVirtPar* parPtr = new BaseIUParADC("IRA", *this); MtxLock scopeLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["IRA"] = parPtr; scopeLock.Unlock(); } { //! ADC for Right B Current BaseIUVirtPar* parPtr = new BaseIUParADC("IRB", *this); MtxLock scopeLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["IRB"] = parPtr; scopeLock.Unlock(); } { //! ADC for Right C Current BaseIUVirtPar* parPtr = new BaseIUParADC("IRC", *this); MtxLock scopeLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["IRC"] = parPtr; scopeLock.Unlock(); } { //! ADC for Right D Current BaseIUVirtPar* parPtr = new BaseIUParADC("IRD", *this); MtxLock scopeLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["IRD"] = parPtr; scopeLock.Unlock(); } // Statuses { //! ADC for Left A Status BaseIUVirtPar* parPtr = new BaseIUParADC("SLA", *this); MtxLock scopeLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["SLA"] = parPtr; scopeLock.Unlock(); } { //! ADC for Left B Status BaseIUVirtPar* parPtr = new BaseIUParADC("SLB", *this); MtxLock scopeLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["SLB"] = parPtr; scopeLock.Unlock(); } { //! ADC for Left C Status BaseIUVirtPar* parPtr = new BaseIUParADC("SLC", *this); MtxLock scopeLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["SLC"] = parPtr; scopeLock.Unlock(); } { //! ADC for Left D Status BaseIUVirtPar* parPtr = new BaseIUParADC("SLD", *this); MtxLock scopeLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["SLD"] = parPtr; scopeLock.Unlock(); } { //! ADC for Right A Status BaseIUVirtPar* parPtr = new BaseIUParADC("SRA", *this); MtxLock scopeLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["SRA"] = parPtr; scopeLock.Unlock(); } { //! ADC for Right B Status BaseIUVirtPar* parPtr = new BaseIUParADC("SRB", *this); MtxLock scopeLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["SRB"] = parPtr; scopeLock.Unlock(); } { //! ADC for Right C Status BaseIUVirtPar* parPtr = new BaseIUParADC("SRC", *this); MtxLock scopeLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["SRC"] = parPtr; scopeLock.Unlock(); } { //! ADC for Right D Status BaseIUVirtPar* parPtr = new BaseIUParADC("SRD", *this); MtxLock scopeLock(bmMutex); bvbPar[BaseIUParADC::bpaParType]["SRD"] = parPtr; scopeLock.Unlock(); } return; }