/* * BaseIUParBusStatus.hh * * Class to handle the status parameter for an entire CAN-bus. * The definition of this parameter is an AND of all bits of all bases * responding from the bus each time request is made and the FIFO is * consequently processed. * * Created on: Jan 12, 2015 * Author: Hovanes Egiyan */ #ifndef BASEIUPARBUSSTATUS_HH_ #define BASEIUPARBUSSTATUS_HH_ #include "BaseIUVirtPar.hh" #include "BaseIUParStatus.hh" class BaseIUParBusStatus: public BaseIUParStatus { protected: BaseIUParBusStatus(); // Protected //! Get the deque after sending read request and process it to //! retrieve the parameter value on the bus. If there was not //! message found then the return value is false. Otherwise it is true. virtual bool ProcessDeque( bool clearFlag = 0 ); public: // static const string bpbsParType; // Parameter type string //! Main constructor BaseIUParBusStatus( string name, BaseIUModule& board ); //! Short constructor, no device no address BaseIUParBusStatus( string name ); //! Copy constructor BaseIUParBusStatus( const BaseIUParBusStatus& par ); //! Destructor virtual ~BaseIUParBusStatus(); //! Assignment operator BaseIUParBusStatus& operator=( const BaseIUParBusStatus& par ); //! Cloning function defined for polymorphism for copy constructor //! Invokes the copy constructor for this class and returns the //! the address of the resulting object virtual BaseIUVirtPar* CloneParameter(); //! Method to sync the parameter with the value on the hardware //! For this class just read the value, writing happens in SetPinStatus directly. virtual bool Sync( bool dir = 0 ); //! Request read of this ADC for all boards on the bus virtual void ReadRequest( BaseIUDevice* dev, string name ); //! Set and send the status word value to the bus virtual uint16_t SetPinStatus(const string pinName, const bool status); }; #endif /* BASEIUPARBUSSTATUS_HH_ */