/* 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. */ #ifndef _BaseIUBaseBoard_HH_ #define _BaseIUBaseBoard_HH_ extern "C" { #include } #include #include #include #include #include #include "MtxLock.hh" #include "BaseIUMessage.hh" #include "BaseIUCommand.hh" #include "BaseIUVirtPar.hh" #include "BaseIUParADC.hh" #include "BaseIUParStatus.hh" #include "BaseIUDevice.hh" #include "BaseIUModule.hh" #include "BaseIUVirtBoard.hh" //! BaseIUBaseBoard class to contain information about a particular board (CW base) //! on a bus. The Sync method of this class will be called to synchronize //! with the hardware. class BaseIUBaseBoard : public BaseIUVirtBoard { protected: //! Initialize parameters for the board virtual void InitParameters(); public: //! Default constructor BaseIUBaseBoard() : BaseIUVirtBoard() { std::cout << "BaseIUBaseBoard::BaseIUBaseBoard() : Default constructor is called " << std::endl; InitParameters(); } //! Main constructor for the board object. The first argument is actually //! expected to be reference to the bus (which is derived from BaseIUModule) //! The second argument is the address of the module, and it is sent separately //! because busses do not carry address (set to 0). BaseIUBaseBoard(const BaseIUModule& module, int address) : BaseIUVirtBoard(module, address) { std::cout << "BaseIUBaseBoard::BaseIUBaseBoard() : Constructing board with address " << hex << showbase << bmAddress << " on port " << bmDevice->GetPortName() << std::endl; std::cout << "The BaseIUBaseBoard object is at " << this << std::endl; InitParameters(); } //! Copy constructor BaseIUBaseBoard(const BaseIUBaseBoard& board) : BaseIUVirtBoard(board) { if (bmDebFlag > 1) { std::cout << "BaseIUBaseBoard::BaseIUBaseBoard() : Copy constructor invoked" << std::endl; std::cout << "The BaseIUBaseBoard object is at " << this << std::endl; } } }; #endif // _BaseIUBaseBoard_HH_