public int getReceiveTimeout(){ return(NativegetReceiveTimeout( )); }
public boolean isReceiveTimeoutEnabled(){ return(NativeisReceiveTimeoutEnabled()); } public int getReceiveTimeout(){
/** Finalize the port */ protected void finalize() { if( fd > 0 ) close(); }
public void close() { setDTR(false); setDSR(false); nativeClose(); super.close(); fd = 0; }
public void enableReceiveTimeout(int time) { if (time >= 0) { timeout = time; NativeEnableReceiveTimeoutThreshold(time, threshold, InputBuffer); } else { System.out.println("Invalid timeout"); } }
/** Set the I2CPort parameters */ public void setI2CPortParams( int b, int d, int s, int p ) throws UnsupportedCommOperationException { nativeSetI2CPortParams( b, d, s, p ); speed = b; dataBits = d; stopBits = s; parity = p; }
/** Open the named port */ public I2C( String name ) throws PortInUseException { fd = open( name ); } private native int open( String name ) throws PortInUseException;
public void disableReceiveThreshold() { enableReceiveThreshold(0); } public int getReceiveThreshold(){
public void disableReceiveTimeout(){ enableReceiveTimeout(0); } public void enableReceiveTimeout( int time ){
public void run() { eventLoop(); } }
public void close() { setDTR(false); setDSR(false); nativeClose(); super.close(); fd = 0; }
public void enableReceiveThreshold(int thresh) { if (thresh >= 0) { threshold = thresh; NativeEnableReceiveTimeoutThreshold(timeout, threshold, InputBuffer); } else /* invalid thresh */ { System.out.println("Invalid Threshold"); } }
/** Set the I2CPort parameters */ public void setI2CPortParams(int b, int d, int s, int p) throws UnsupportedCommOperationException { nativeSetI2CPortParams(b, d, s, p); speed = b; dataBits = d; stopBits = s; parity = p; }
/** Open the named port */ public I2C(String name) throws PortInUseException { fd = open(name); }
public void disableReceiveThreshold() { enableReceiveThreshold(0); }
public void disableReceiveTimeout() { enableReceiveTimeout(0); }
public void run() { eventLoop(); } }
public void enableReceiveThreshold( int thresh ){ if(thresh >=0) { threshold=thresh; NativeEnableReceiveTimeoutThreshold(timeout, threshold, InputBuffer); } else /* invalid thresh */ { System.out.println("Invalid Threshold"); } } public void disableReceiveThreshold() {
/** Finalize the port */ protected void finalize() { if (fd > 0) close(); }
public boolean isReceiveTimeoutEnabled() { return (NativeisReceiveTimeoutEnabled()); }