System.out.println( "DSR " +
z.reportln( "DSR " +
	public boolean sendEvent( int event, boolean state )	{		if (debug_events)			System.out.print(System.currentTimeMillis() + ": " + "RXTXPort:sendEvent(");		/* Let the native side know its time to die */		if ( fd == 0 || SPEventListener == null || monThread == null)		{			return(true);		}		switch( event )		{			case SerialPortEvent.DATA_AVAILABLE:				if( debug_events )					System.out.println( "DATA_AVAILABLE " +						monThread.Data + ")" );				break;			case SerialPortEvent.OUTPUT_BUFFER_EMPTY:				if( debug_events )					System.out.println( 						"OUTPUT_BUFFER_EMPTY " +						monThread.Output + ")" );				break;			case SerialPortEvent.CTS:				if( debug_events )					System.out.println( "CTS " +						monThread.CTS + ")" );				break;			case SerialPortEvent.DSR:				if( debug_events )					System.out.println( "DSR " +						monThread.Output + ")" );				break;			case SerialPortEvent.RI:				if( debug_events )					System.out.println( "RI " +						monThread.RI + ")" );				break;			case SerialPortEvent.CD:				if( debug_events )					System.out.println( "CD " +						monThread.CD + ")" );				break;			case SerialPortEvent.OE:				if( debug_events )					System.out.println( "OE " +						monThread.OE + ")" );				break;			case SerialPortEvent.PE:				if( debug_events )					System.out.println( "PE " +						monThread.PE + ")" );				break;			case SerialPortEvent.FE:				if( debug_events )					System.out.println( "FE " +						monThread.FE + ")" );				break;			case SerialPortEvent.BI:				if( debug_events )					System.out.println( "BI " +						monThread.BI + ")" );				break;			default:				if( debug_events )					System.out.println( "XXXXXXXXXXXXXX " +						event + ")" );				break;		}		if( debug_events && debug_verbose )			System.out.println(System.currentTimeMillis() + ": " +  "checking flags " );		switch( event )		{			case SerialPortEvent.DATA_AVAILABLE:				if( monThread.Data ) break;				return(false);			case SerialPortEvent.OUTPUT_BUFFER_EMPTY:				if( monThread.Output ) break;				return(false);			case SerialPortEvent.CTS:				if( monThread.CTS ) break;				return(false);			case SerialPortEvent.DSR:				if( monThread.DSR ) break;				return(false);			case SerialPortEvent.RI:				if( monThread.RI ) break;				return(false);			case SerialPortEvent.CD:				if( monThread.CD ) break;				return(false);			case SerialPortEvent.OE:				if( monThread.OE ) break;				return(false);			case SerialPortEvent.PE:				if( monThread.PE ) break;				return(false);			case SerialPortEvent.FE:				if( monThread.FE ) break;				return(false);			case SerialPortEvent.BI:				if( monThread.BI ) break;				return(false);			default:				System.err.println(System.currentTimeMillis() + ": " + "unknown event: " + event);				return(false);		}		if( debug_events && debug_verbose )			System.out.println(System.currentTimeMillis() + ": " +  "getting event" );		SerialPortEvent e = new SerialPortEvent(this, event, !state,			state );		if( debug_events && debug_verbose )			System.out.println(System.currentTimeMillis() + ": " +  "sending event" );		if(monThreadisInterrupted) 		{			if( debug_events )				System.out.println(System.currentTimeMillis() + ": " +  "sendEvent return" );			return(true);		}		if( SPEventListener != null )		{			SPEventListener.serialEvent( e );		}		if( debug_events && debug_verbose )			System.out.println(System.currentTimeMillis() + ": " +  "sendEvent return" );		if (fd == 0 ||  SPEventListener == null || monThread == null) 		{			return(true);		}		else 		{			return(false);  		}	}