/*
 * 
 * SerLEDStatusOn.H header file for class SerLED
 *
 */

#ifndef SERLEDSTATUSON_H
#define SERLEDSTATUSON_H

//this 
#include "SerLEDStatus.H"

/** @class SerLEDStatusOn
    Status class for turning an led on
    @author felix@rauscher-muenchen.de
    @date Feb 2006
*/
  
 class SerLEDStatusOn : public SerLEDStatus
 	{
	private:
//============================private data members==============================
	//! is true if led is on
		bool _is_on;
	public:
//============================constructor=======================================
	/** default constructor */
		inline SerLEDStatusOn(): SerLEDStatus(),
					 _is_on(false)
			{}
	/** initializing constructor 
	    @param dev device class
	    @param led  SerLEDDevice :: RTS or SerLEDDevice :: DTR	
	*/
		inline SerLEDStatusOn(SerLEDDevice * dev, int led): 
						SerLEDStatus(dev, led),
						_is_on(false)
			{}
//===========================public member functions============================
	/** Activate status */
		inline void Activate()
			{
			_device->On(_led);
			_is_on=true;
			}
	/** Deactivate status */
		inline void DeActivate()
			{
			_device->Off(_led);
			_is_on=false;
			}
	/** return true if status is active */
		inline bool IsActive()
			{
			return _is_on;
			}
	};

#endif
