You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
2.2 KiB

5 years ago
  1. /* Non functional contact taj@www.linux.org.uk for details */
  2. /*-------------------------------------------------------------------------
  3. | rxtx is a native interface to serial ports in java.
  4. | Copyright 1997-2004 by Trent Jarvi taj@www.linux.org.uk
  5. |
  6. | This library is free software; you can redistribute it and/or
  7. | modify it under the terms of the GNU Library General Public
  8. | License as published by the Free Software Foundation; either
  9. | version 2 of the License, or (at your option) any later version.
  10. |
  11. | This library is distributed in the hope that it will be useful,
  12. | but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. | Library General Public License for more details.
  15. |
  16. | You should have received a copy of the GNU Library General Public
  17. | License along with this library; if not, write to the Free
  18. | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  19. --------------------------------------------------------------------------*/
  20. package gnu.io;
  21. import java.util.*;
  22. /**
  23. * @author Trent Jarvi
  24. * @version %I%, %G%
  25. * @since JDK1.0
  26. */
  27. public class I2CPortEvent extends EventObject
  28. {
  29. public static final int DATA_AVAILABLE =1;
  30. public static final int OUTPUT_BUFFER_EMPTY =2;
  31. public static final int CTS =3;
  32. public static final int DSR =4;
  33. public static final int RI =5;
  34. public static final int CD =6;
  35. public static final int OE =7;
  36. public static final int PE =8;
  37. public static final int FE =9;
  38. public static final int BI =10;
  39. private boolean OldValue;
  40. private boolean NewValue;
  41. private int eventType;
  42. /*public int eventType =0; depricated */
  43. public I2CPortEvent(I2CPort srcport, int eventtype, boolean oldvalue, boolean newvalue)
  44. {
  45. super( srcport );
  46. OldValue=oldvalue;
  47. NewValue=newvalue;
  48. eventType=eventtype;
  49. }
  50. public int getEventType()
  51. {
  52. return(eventType);
  53. }
  54. public boolean getNewValue()
  55. {
  56. return( NewValue );
  57. }
  58. public boolean getOldValue()
  59. {
  60. return( OldValue );
  61. }
  62. }