/* 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. */ //================================================================================================== // // CLAS to handle a CANbus with a set of IU Bases // Software Library for Linux // // // Purpose: class for IU Base control on one bus // Date: August 12, 2011 // Author: Hovanes Egiyan // // //================================================================================================== #ifndef _BaseIUBaseBus_HH_ #define _BaseIUBaseBus_HH_ extern "C" { #include #include } #include #include #include #include #include #include #include "BaseIUMessage.hh" #include "BaseIUCommand.hh" #include "BaseIUModule.hh" #include "BaseIUVirtBus.hh" #include "BaseIUVirtBoard.hh" #include "BaseIUBaseBoard.hh" #include "BaseIUParBusStatus.hh" #include "BaseIUParDigital.hh" #include "BaseIUException.hh" using namespace std; //! BaseIUBaseBus class to contain information about the //! whole BaseIU module state. It contains an STL map with //! addresses of all boards belonging to this chassis. Each object is //! supposed to be constructed in a new thread and its Sync() method //! should be called periodically to synchronize the parameters in //! the object of this class and the corresponding hardware module. //! This class inherits from BaseIUModule class, therefore it //! contains the pointer to the serial port object. The port objects //! are created in the constructor of this class. class BaseIUBaseBus: public BaseIUVirtBus { protected: //! Not allowed to invoke the default constructor or //! a constructor with a defined device address BaseIUBaseBus(BaseIUDevice* devPtr = 0) { ; } //! Copy constructor protected BaseIUBaseBus(BaseIUBaseBus& bus); // Set values for all parameters for certain types and name virtual void SetParameter( string type, string bitName, void* setValPtr ); virtual void InitParameters() ; public: //! Main constructor BaseIUBaseBus(BaseIUVirtBusID& devID); }; #endif // _BaseIUBaseBus_HH_