/* 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 Power chassis // Software Library for Linux // // // Purpose: class for IU Base control on the control CAN bus for power chassis // Date: April 23, 2014 // Author: Hovanes Egiyan // // //================================================================================================== #ifndef _BaseIUChassisBus_HH_ #define _BaseIUChassisBus_HH_ extern "C" { #include #include } ; #include #include #include #include #include #include #include "BaseIUMessage.hh" #include "BaseIUCommand.hh" #include "BaseIUModule.hh" #include "BaseIUVirtBus.hh" #include "BaseIUChassisBoard.hh" #include "BaseIUParDigital.hh" #include "BaseIUException.hh" using namespace std; //! Rename the virtual bus identification type for connection //! to be the identification type for chassis buses //typedef BaseIUVirtBusID BaseIUChassisBusID; //! BaseIUChassisBus class to contain information about the //! state of the chassis connected to this Anagate Uno bus. It contains an STL //! map with addresses of all chassis belonging to this bus. 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 BaseIUChassisBus : public BaseIUVirtBus { protected: //! Not allowed to invoke the default constructor or //! a constructor with a defined device address BaseIUChassisBus(BaseIUDevice* devPtr = 0) ; //! Copy constructor protected BaseIUChassisBus(BaseIUChassisBus& bus); virtual void InitParameters() {;} void SetParameter( string type, string name, void* setValPtr ) {;} public: //! Main constructor BaseIUChassisBus(BaseIUVirtBusID& devID); }; #endif // _BaseIUChassisBus_HH_