From 46bd2ba42d186a81d7ad7e4a55e03dd63b2d042f Mon Sep 17 00:00:00 2001 From: Jonathan McCrohan Date: Sun, 3 Mar 2013 19:30:43 +0000 Subject: Imported Upstream version 2.1.8.20121218 --- Java/com/phidgets/event/TagGainEvent.java | 18 +++++++++++++++++- Java/com/phidgets/event/TagLossEvent.java | 18 +++++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) (limited to 'Java/com/phidgets/event') diff --git a/Java/com/phidgets/event/TagGainEvent.java b/Java/com/phidgets/event/TagGainEvent.java index 6cb7a74..8639ae4 100644 --- a/Java/com/phidgets/event/TagGainEvent.java +++ b/Java/com/phidgets/event/TagGainEvent.java @@ -15,6 +15,7 @@ public class TagGainEvent { Phidget source; String value; + int protocol; /** * Class constructor. This is called internally by the phidget library when creating this event. @@ -26,6 +27,12 @@ public class TagGainEvent this.source = source; this.value = value; } + public TagGainEvent(Phidget source, String value, int protocol) + { + this.source = source; + this.value = value; + this.protocol = protocol; + } /** * Returns the source Phidget of this event. This is a reference to the Phidget object from which this @@ -39,7 +46,7 @@ public class TagGainEvent } /** - * Returns the gained tag. The tag is a 10 digit hex number represented as a string. + * Returns the gained tag. * * @return the gained tag */ @@ -47,6 +54,15 @@ public class TagGainEvent return value; } + /** + * Returns the protocol of the Tag that was lost. + * + * @return the lost tag protocol + */ + public int getProtocol() { + return protocol; + } + /** * Returns a string containing information about the event. * diff --git a/Java/com/phidgets/event/TagLossEvent.java b/Java/com/phidgets/event/TagLossEvent.java index ccca4fe..8dcd723 100644 --- a/Java/com/phidgets/event/TagLossEvent.java +++ b/Java/com/phidgets/event/TagLossEvent.java @@ -15,6 +15,7 @@ public class TagLossEvent { Phidget source; String value; + int protocol; /** * Class constructor. This is called internally by the phidget library when creating this event. @@ -26,6 +27,12 @@ public class TagLossEvent this.source = source; this.value = value; } + public TagLossEvent(Phidget source, String value, int protocol) + { + this.source = source; + this.value = value; + this.protocol = protocol; + } /** * Returns the source Phidget of this event. This is a reference to the Phidget object from which this @@ -39,7 +46,7 @@ public class TagLossEvent } /** - * Returns the Tag that was lost. This is a 10 digit hex number as a string. + * Returns the Tag that was lost. * * @return the lost tag */ @@ -47,6 +54,15 @@ public class TagLossEvent return value; } + /** + * Returns the protocol of the Tag that was lost. + * + * @return the lost tag protocol + */ + public int getProtocol() { + return protocol; + } + /** * Returns a string containing information about the event. * -- cgit v1.2.3