package com.phidgets.events
{
	import com.phidgets.Phidget;
	import flash.events.Event;
	
	public class PhidgetEvent extends Event
	{
		public static const CONNECT	:String = "connect";
		public static const DISCONNECT:String 	= "disconnect";
		public static const ATTACH:String 	= "attach";
		public static const DETACH:String 	= "detach";
		
		private var _phidget:Phidget;
		
		public function PhidgetEvent (type:String,phidget:Phidget) {
			super(type);
			this._phidget = phidget;
		}
		
		override public function toString():String{
			return "[ Phidget Event: "+type+" ]";
		}
		
		public function get Device():Phidget{ 
			return _phidget;
		}
	}
}