aboutsummaryrefslogtreecommitdiffstats
path: root/Java/com/phidgets/event
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Java/com/phidgets/event/AccelerationChangeEvent.java69
-rw-r--r--Java/com/phidgets/event/AccelerationChangeListener.java20
-rw-r--r--Java/com/phidgets/event/AttachEvent.java46
-rw-r--r--Java/com/phidgets/event/AttachListener.java20
-rw-r--r--Java/com/phidgets/event/BackEMFUpdateEvent.java70
-rw-r--r--Java/com/phidgets/event/BackEMFUpdateListener.java21
-rw-r--r--Java/com/phidgets/event/BridgeDataEvent.java69
-rw-r--r--Java/com/phidgets/event/BridgeDataListener.java20
-rw-r--r--Java/com/phidgets/event/CodeEvent.java73
-rw-r--r--Java/com/phidgets/event/CodeListener.java21
-rw-r--r--Java/com/phidgets/event/CurrentChangeEvent.java69
-rw-r--r--Java/com/phidgets/event/CurrentChangeListener.java21
-rw-r--r--Java/com/phidgets/event/CurrentUpdateEvent.java70
-rw-r--r--Java/com/phidgets/event/CurrentUpdateListener.java20
-rw-r--r--Java/com/phidgets/event/DetachEvent.java46
-rw-r--r--Java/com/phidgets/event/DetachListener.java20
-rw-r--r--Java/com/phidgets/event/EncoderPositionChangeEvent.java84
-rw-r--r--Java/com/phidgets/event/EncoderPositionChangeListener.java20
-rw-r--r--Java/com/phidgets/event/EncoderPositionUpdateEvent.java73
-rw-r--r--Java/com/phidgets/event/EncoderPositionUpdateListener.java20
-rw-r--r--Java/com/phidgets/event/ErrorEvent.java59
-rw-r--r--Java/com/phidgets/event/ErrorListener.java21
-rw-r--r--Java/com/phidgets/event/FrequencyCounterCountEvent.java81
-rw-r--r--Java/com/phidgets/event/FrequencyCounterCountListener.java20
-rw-r--r--Java/com/phidgets/event/GPSPositionChangeEvent.java80
-rw-r--r--Java/com/phidgets/event/GPSPositionChangeListener.java20
-rw-r--r--Java/com/phidgets/event/GPSPositionFixStatusChangeEvent.java58
-rw-r--r--Java/com/phidgets/event/GPSPositionFixStatusChangeListener.java20
-rw-r--r--Java/com/phidgets/event/InputChangeEvent.java69
-rw-r--r--Java/com/phidgets/event/InputChangeListener.java21
-rw-r--r--Java/com/phidgets/event/KeyChangeEvent.java63
-rw-r--r--Java/com/phidgets/event/KeyChangeListener.java21
-rw-r--r--Java/com/phidgets/event/KeyRemovalEvent.java61
-rw-r--r--Java/com/phidgets/event/KeyRemovalListener.java21
-rw-r--r--Java/com/phidgets/event/LearnEvent.java60
-rw-r--r--Java/com/phidgets/event/LearnListener.java21
-rw-r--r--Java/com/phidgets/event/MotorVelocityChangeEvent.java69
-rw-r--r--Java/com/phidgets/event/MotorVelocityChangeListener.java20
-rw-r--r--Java/com/phidgets/event/OutputChangeEvent.java69
-rw-r--r--Java/com/phidgets/event/OutputChangeListener.java21
-rw-r--r--Java/com/phidgets/event/PHChangeEvent.java58
-rw-r--r--Java/com/phidgets/event/PHChangeListener.java20
-rw-r--r--Java/com/phidgets/event/RawDataEvent.java70
-rw-r--r--Java/com/phidgets/event/RawDataListener.java21
-rw-r--r--Java/com/phidgets/event/SensorChangeEvent.java69
-rw-r--r--Java/com/phidgets/event/SensorChangeListener.java19
-rw-r--r--Java/com/phidgets/event/SensorUpdateEvent.java70
-rw-r--r--Java/com/phidgets/event/SensorUpdateListener.java19
-rw-r--r--Java/com/phidgets/event/ServerConnectEvent.java48
-rw-r--r--Java/com/phidgets/event/ServerConnectListener.java20
-rw-r--r--Java/com/phidgets/event/ServerDisconnectEvent.java48
-rw-r--r--Java/com/phidgets/event/ServerDisconnectListener.java20
-rw-r--r--Java/com/phidgets/event/ServoPositionChangeEvent.java70
-rw-r--r--Java/com/phidgets/event/ServoPositionChangeListener.java21
-rw-r--r--Java/com/phidgets/event/ServoVelocityChangeEvent.java69
-rw-r--r--Java/com/phidgets/event/ServoVelocityChangeListener.java20
-rw-r--r--Java/com/phidgets/event/SpatialDataEvent.java60
-rw-r--r--Java/com/phidgets/event/SpatialDataListener.java21
-rw-r--r--Java/com/phidgets/event/StepperPositionChangeEvent.java70
-rw-r--r--Java/com/phidgets/event/StepperPositionChangeListener.java21
-rw-r--r--Java/com/phidgets/event/StepperVelocityChangeEvent.java69
-rw-r--r--Java/com/phidgets/event/StepperVelocityChangeListener.java20
-rw-r--r--Java/com/phidgets/event/TagGainEvent.java59
-rw-r--r--Java/com/phidgets/event/TagGainListener.java21
-rw-r--r--Java/com/phidgets/event/TagLossEvent.java59
-rw-r--r--Java/com/phidgets/event/TagLossListener.java21
-rw-r--r--Java/com/phidgets/event/TemperatureChangeEvent.java70
-rw-r--r--Java/com/phidgets/event/TemperatureChangeListener.java20
-rw-r--r--Java/com/phidgets/event/WeightChangeEvent.java58
-rw-r--r--Java/com/phidgets/event/WeightChangeListener.java20
70 files changed, 2998 insertions, 0 deletions
diff --git a/Java/com/phidgets/event/AccelerationChangeEvent.java b/Java/com/phidgets/event/AccelerationChangeEvent.java
new file mode 100644
index 0000000..92f9c69
--- /dev/null
+++ b/Java/com/phidgets/event/AccelerationChangeEvent.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+
+/**
+ * This class represents the data for an AccelerationChangeEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class AccelerationChangeEvent
+{
+ Phidget source;
+ int index;
+ double value;
+
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ */
+ public AccelerationChangeEvent(Phidget source, int index, double value) {
+ this.source = source;
+ this.index = index;
+ this.value = value;
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns the index of the axis.
+ *
+ * @return the index of the axis
+ */
+ public int getIndex() {
+ return index;
+ }
+
+ /**
+ * Returns the acceleration. This is returned in g's
+ *
+ * @return the acceleration of the axis
+ */
+ public double getValue() {
+ return value;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ return source.toString() + " Acceleration " + index + " changed to "
+ + value;
+ }
+}
diff --git a/Java/com/phidgets/event/AccelerationChangeListener.java b/Java/com/phidgets/event/AccelerationChangeListener.java
new file mode 100644
index 0000000..b97172e
--- /dev/null
+++ b/Java/com/phidgets/event/AccelerationChangeListener.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents a AccelerationChangeEvent. This event originates from the Phidget Accelerometer
+ *
+ * @author Phidgets Inc.
+ */
+public interface AccelerationChangeListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void accelerationChanged(AccelerationChangeEvent ae);
+}
diff --git a/Java/com/phidgets/event/AttachEvent.java b/Java/com/phidgets/event/AttachEvent.java
new file mode 100644
index 0000000..eecb7b0
--- /dev/null
+++ b/Java/com/phidgets/event/AttachEvent.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+
+/**
+ * This class represents the data for a AttachEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class AttachEvent
+{
+ Phidget source;
+
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ */
+ public AttachEvent(Phidget source) {
+ this.source = source;
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ return source.toString();
+ }
+}
diff --git a/Java/com/phidgets/event/AttachListener.java b/Java/com/phidgets/event/AttachListener.java
new file mode 100644
index 0000000..5fe8c00
--- /dev/null
+++ b/Java/com/phidgets/event/AttachListener.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents a AttachEvent. This event originates from all Phidgets.
+ *
+ * @author Phidgets Inc.
+ */
+public interface AttachListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void attached(AttachEvent ae);
+}
diff --git a/Java/com/phidgets/event/BackEMFUpdateEvent.java b/Java/com/phidgets/event/BackEMFUpdateEvent.java
new file mode 100644
index 0000000..7dace73
--- /dev/null
+++ b/Java/com/phidgets/event/BackEMFUpdateEvent.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2011 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+
+/**
+ * This class represents the data for a BackEMFUpdateEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class BackEMFUpdateEvent
+{
+ Phidget source;
+ int index;
+ double voltage;
+
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ */
+ public BackEMFUpdateEvent(Phidget source, int index, double voltage)
+ {
+ this.source = source;
+ this.index = index;
+ this.voltage = voltage;
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns the index of the motor.
+ *
+ * @return the index of the motor
+ */
+ public int getIndex() {
+ return index;
+ }
+
+ /**
+ * Returns the backEMF value.
+ *
+ * @return the backEMF value
+ */
+ public double getVoltage() {
+ return voltage;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ return source.toString() + " BackEMF Value " + index + " is "
+ + voltage;
+ }
+}
diff --git a/Java/com/phidgets/event/BackEMFUpdateListener.java b/Java/com/phidgets/event/BackEMFUpdateListener.java
new file mode 100644
index 0000000..9a99a97
--- /dev/null
+++ b/Java/com/phidgets/event/BackEMFUpdateListener.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2011 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents a BackEMFUpdateEvent. This event originates from the
+ * Phidget Motor Control. This event is not supported by all Motor Controllers.
+ *
+ * @author Phidgets Inc.
+ */
+public interface BackEMFUpdateListener
+{
+ /**
+ * This method is called with the event data every 16ms, when back EMF sensing is enabled for that motor.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void backEMFUpdated(BackEMFUpdateEvent ae);
+}
diff --git a/Java/com/phidgets/event/BridgeDataEvent.java b/Java/com/phidgets/event/BridgeDataEvent.java
new file mode 100644
index 0000000..3dd1578
--- /dev/null
+++ b/Java/com/phidgets/event/BridgeDataEvent.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2011 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+
+/**
+ * This class represents the data for a BridgeDataEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class BridgeDataEvent
+{
+ Phidget source;
+ int index;
+ double value;
+
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ */
+ public BridgeDataEvent(Phidget source, int index, double value) {
+ this.source = source;
+ this.index = index;
+ this.value = value;
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns the index of the bridge.
+ *
+ * @return the index of the bridge
+ */
+ public int getIndex() {
+ return index;
+ }
+
+ /**
+ * Retuns the bridge value, in mV/V.
+ *
+ * @return the bridge value
+ */
+ public double getValue() {
+ return value;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ return source.toString() + " bridge " + index + " value changed to "
+ + value;
+ }
+}
diff --git a/Java/com/phidgets/event/BridgeDataListener.java b/Java/com/phidgets/event/BridgeDataListener.java
new file mode 100644
index 0000000..de2f993
--- /dev/null
+++ b/Java/com/phidgets/event/BridgeDataListener.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2011 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+/**
+ * This interface represents a BridgeDataEvent. This event originates from the Phidget Bridge
+ *
+ * @author Phidgets Inc.
+ */
+public interface BridgeDataListener
+{
+ /**
+ * This method is called with the event data when a new event arrives. The event is issued at the specified data rate, for
+ * each enabled bridge.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void bridgeData(BridgeDataEvent ae);
+}
diff --git a/Java/com/phidgets/event/CodeEvent.java b/Java/com/phidgets/event/CodeEvent.java
new file mode 100644
index 0000000..0cb5336
--- /dev/null
+++ b/Java/com/phidgets/event/CodeEvent.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+import com.phidgets.IRCode;
+
+/**
+ * This class represents the data for a CodeEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class CodeEvent
+{
+ Phidget source;
+ IRCode code;
+ boolean repeat;
+
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ * @param code the IR code
+ * @param repeat whether the code is a repeat
+ */
+ public CodeEvent(Phidget source, IRCode code, boolean repeat)
+ {
+ this.source = source;
+ this.code = code;
+ this.repeat = repeat;
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns the code.
+ *
+ * @return the code
+ */
+ public IRCode getCode() {
+ return code;
+ }
+
+ /**
+ * Returns the repeat identifier.
+ *
+ * @return whether this is a repeat
+ */
+ public boolean getRepeat() {
+ return repeat;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ return source.toString() + " Code: "
+ + code.toString();
+ }
+}
diff --git a/Java/com/phidgets/event/CodeListener.java b/Java/com/phidgets/event/CodeListener.java
new file mode 100644
index 0000000..30bdde1
--- /dev/null
+++ b/Java/com/phidgets/event/CodeListener.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents a CodeEvent. This event originates from the Phidget IR.
+ * This event occurs when a code is seen by the reader.
+ *
+ * @author Phidgets Inc.
+ */
+public interface CodeListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void code(CodeEvent ae);
+}
diff --git a/Java/com/phidgets/event/CurrentChangeEvent.java b/Java/com/phidgets/event/CurrentChangeEvent.java
new file mode 100644
index 0000000..b279ce8
--- /dev/null
+++ b/Java/com/phidgets/event/CurrentChangeEvent.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+
+/**
+ * This class represents the data for a CurrentChangeEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class CurrentChangeEvent
+{
+ Phidget source;
+ int index;
+ double value;
+
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ */
+ public CurrentChangeEvent(Phidget source, int index, double value) {
+ this.source = source;
+ this.index = index;
+ this.value = value;
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns the index of the motor.
+ *
+ * @return the index of the motor
+ */
+ public int getIndex() {
+ return index;
+ }
+
+ /**
+ * Returns the current of the motor. This is a representation of the ammount of current being used by the motor.
+ *
+ * @return the motor's current draw
+ */
+ public double getValue() {
+ return value;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ return source.toString() + " current " + index + " changed to "
+ + value;
+ }
+}
diff --git a/Java/com/phidgets/event/CurrentChangeListener.java b/Java/com/phidgets/event/CurrentChangeListener.java
new file mode 100644
index 0000000..f45681c
--- /dev/null
+++ b/Java/com/phidgets/event/CurrentChangeListener.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2011 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents a CurrentChangeEvent. This event originates from the Phidget Motor Controller.
+ * This event is not supported by all Motor Controllers.
+ *
+ * @author Phidgets Inc.
+ */
+public interface CurrentChangeListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void currentChanged(CurrentChangeEvent ae);
+}
diff --git a/Java/com/phidgets/event/CurrentUpdateEvent.java b/Java/com/phidgets/event/CurrentUpdateEvent.java
new file mode 100644
index 0000000..12265e5
--- /dev/null
+++ b/Java/com/phidgets/event/CurrentUpdateEvent.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+
+/**
+ * This class represents the data for a CurrentUpdateEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class CurrentUpdateEvent
+{
+ Phidget source;
+ int index;
+ double value;
+
+ /**
+ * Class constructor. This is called internally by the Phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ */
+ public CurrentUpdateEvent(Phidget source, int index, double value)
+ {
+ this.source = source;
+ this.index = index;
+ this.value = value;
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns the index of the motor.
+ *
+ * @return the index of the motor
+ */
+ public int getIndex() {
+ return index;
+ }
+
+ /**
+ * Returns the current of the motor. This is a representation of the amount of current being used by the motor.
+ *
+ * @return the motor's current draw
+ */
+ public double getValue() {
+ return value;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ return source.toString() + " current " + index + " is "
+ + value;
+ }
+}
diff --git a/Java/com/phidgets/event/CurrentUpdateListener.java b/Java/com/phidgets/event/CurrentUpdateListener.java
new file mode 100644
index 0000000..20a6784
--- /dev/null
+++ b/Java/com/phidgets/event/CurrentUpdateListener.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2011 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents a CurrentUpdateEvent. This event originates from the Phidget Motor Controller. This event is not supported by all Motor Controllers.
+ *
+ * @author Phidgets Inc.
+ */
+public interface CurrentUpdateListener
+{
+ /**
+ * This method is called with every 8ms.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void currentUpdated(CurrentUpdateEvent ae);
+}
diff --git a/Java/com/phidgets/event/DetachEvent.java b/Java/com/phidgets/event/DetachEvent.java
new file mode 100644
index 0000000..97bfe29
--- /dev/null
+++ b/Java/com/phidgets/event/DetachEvent.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+
+/**
+ * This class represents the data for a DetachEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class DetachEvent
+{
+ Phidget source;
+
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ */
+ public DetachEvent(Phidget source) {
+ this.source = source;
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ return source.toString();
+ }
+}
diff --git a/Java/com/phidgets/event/DetachListener.java b/Java/com/phidgets/event/DetachListener.java
new file mode 100644
index 0000000..b74e0ec
--- /dev/null
+++ b/Java/com/phidgets/event/DetachListener.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents a DetachEvent. This event originates from all Phidgets, as well as the Phidget Manager.
+ *
+ * @author Phidgets Inc.
+ */
+public interface DetachListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void detached(DetachEvent ae);
+}
diff --git a/Java/com/phidgets/event/EncoderPositionChangeEvent.java b/Java/com/phidgets/event/EncoderPositionChangeEvent.java
new file mode 100644
index 0000000..52118a7
--- /dev/null
+++ b/Java/com/phidgets/event/EncoderPositionChangeEvent.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+
+/**
+ * This class represents the data for a EncoderPositionChangeEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class EncoderPositionChangeEvent
+{
+ Phidget source;
+ int index;
+ int value;
+ int time;
+
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ */
+ public EncoderPositionChangeEvent(Phidget source, int index, int time, int value) {
+ this.source = source;
+ this.index = index;
+ this.value = value;
+ this.time = time;
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns the index of the encoder.
+ *
+ * @return the index of the encoder
+ */
+ public int getIndex() {
+ return index;
+ }
+
+ /**
+ * Returns the position change of the encoder. This is the amount of change in the encoder's position
+ * since the last {@link #EncoderPositionChangeEvent}.
+ *
+ * @return the change in position of the encoder
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Returns the timestamp of this position change. This is the time since the last {@link #EncoderPositionChangeEvent}.
+ * This time is not represented in a real quantitly such as seconds, but can be used as a qualitative quantity.
+ *
+ * @return the timestamp of this change event
+ */
+ public int getTime()
+ {
+ return time;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+
+ return source.toString() + " encoder position " + index + " changed by "
+ + value + " Time: " + time;
+ }
+}
diff --git a/Java/com/phidgets/event/EncoderPositionChangeListener.java b/Java/com/phidgets/event/EncoderPositionChangeListener.java
new file mode 100644
index 0000000..dabdb08
--- /dev/null
+++ b/Java/com/phidgets/event/EncoderPositionChangeListener.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents an EncoderPositionChangeEvent. This event originates from the Phidget Encoder and the Phidget Motor Controller. This event is not supported by all Motor Controllers.
+ *
+ * @author Phidgets Inc.
+ */
+public interface EncoderPositionChangeListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void encoderPositionChanged(EncoderPositionChangeEvent ae);
+}
diff --git a/Java/com/phidgets/event/EncoderPositionUpdateEvent.java b/Java/com/phidgets/event/EncoderPositionUpdateEvent.java
new file mode 100644
index 0000000..8124b04
--- /dev/null
+++ b/Java/com/phidgets/event/EncoderPositionUpdateEvent.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2011 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+
+/**
+ * This class represents the data for a EncoderPositionUpdateEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class EncoderPositionUpdateEvent
+{
+ Phidget source;
+ int index;
+ int value;
+
+ /**
+ * Class constructor. This is called internally by the Phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ */
+ public EncoderPositionUpdateEvent(Phidget source, int index, int value)
+ {
+ this.source = source;
+ this.index = index;
+ this.value = value;
+
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns the index of the encoder.
+ *
+ * @return the index of the encoder
+ */
+ public int getIndex() {
+ return index;
+ }
+
+ /**
+ * Returns the position change of the encoder. This is the amount of change in the encoder's position
+ * since the last {@link #EncoderPositionUpdateEvent}.
+ *
+ * @return the change in position of the encoder
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+
+ return source.toString() + " encoder position " + index + " is "
+ + value;
+ }
+}
diff --git a/Java/com/phidgets/event/EncoderPositionUpdateListener.java b/Java/com/phidgets/event/EncoderPositionUpdateListener.java
new file mode 100644
index 0000000..f16c899
--- /dev/null
+++ b/Java/com/phidgets/event/EncoderPositionUpdateListener.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2011 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents an EncoderPositionUpdateEvent. This event originates from the Phidget Motor Controller. This event is not supported by all Motor Controllers.
+ *
+ * @author Phidgets Inc.
+ */
+public interface EncoderPositionUpdateListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void encoderPositionUpdated(EncoderPositionUpdateEvent ae);
+}
diff --git a/Java/com/phidgets/event/ErrorEvent.java b/Java/com/phidgets/event/ErrorEvent.java
new file mode 100644
index 0000000..e0dc374
--- /dev/null
+++ b/Java/com/phidgets/event/ErrorEvent.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+import com.phidgets.PhidgetException;
+
+/**
+ * This class represents the data for a ErrorEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class ErrorEvent
+{
+ Phidget source;
+ PhidgetException exception;
+
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ */
+ public ErrorEvent(Phidget source, PhidgetException ex) {
+ this.source = source;
+ this.exception = ex;
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns the exception that describes the error.
+ *
+ * @return the event exception
+ */
+ public PhidgetException getException()
+ {
+ return exception;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ return "Error Event (" + exception.getErrorNumber() + "): " + exception.getDescription();
+ }
+}
diff --git a/Java/com/phidgets/event/ErrorListener.java b/Java/com/phidgets/event/ErrorListener.java
new file mode 100644
index 0000000..a1a0207
--- /dev/null
+++ b/Java/com/phidgets/event/ErrorListener.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents a ErrorEvent. This event originates from all Phidgets.
+ * It is used for asynchronous error handling.
+ *
+ * @author Phidgets Inc.
+ */
+public interface ErrorListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void error(ErrorEvent ae);
+}
diff --git a/Java/com/phidgets/event/FrequencyCounterCountEvent.java b/Java/com/phidgets/event/FrequencyCounterCountEvent.java
new file mode 100644
index 0000000..4a9291b
--- /dev/null
+++ b/Java/com/phidgets/event/FrequencyCounterCountEvent.java
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2011 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+
+/**
+ * This class represents the data for a FrequencyCounterCountEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class FrequencyCounterCountEvent
+{
+ Phidget source;
+ int index;
+ int time;
+ int count;
+
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ */
+ public FrequencyCounterCountEvent(Phidget source, int index, int time, int count) {
+ this.source = source;
+ this.index = index;
+ this.time = time;
+ this.count = count;
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns the index of the channel.
+ *
+ * @return the index of the channel
+ */
+ public int getIndex() {
+ return index;
+ }
+
+ /**
+ * Returns the amount of time in which the number of counts occured, in microseconds.
+ *
+ * @return the amount of time in which the number of counts occured
+ */
+ public int getTime() {
+ return time;
+ }
+
+ /**
+ * Returns the number of counts detected.
+ *
+ * @return the number of counts detected
+ */
+ public int getCount() {
+ return count;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+
+ return source.toString() + " Channel " + index + ": " + count + " pulses in "
+ + time + " miroseconds";
+ }
+}
diff --git a/Java/com/phidgets/event/FrequencyCounterCountListener.java b/Java/com/phidgets/event/FrequencyCounterCountListener.java
new file mode 100644
index 0000000..fd19348
--- /dev/null
+++ b/Java/com/phidgets/event/FrequencyCounterCountListener.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2011 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents a FrequencyCounterCountEvent. This event originates from the Phidget Frequency Counter
+ *
+ * @author Phidgets Inc.
+ */
+public interface FrequencyCounterCountListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void frequencyCounterCounted(FrequencyCounterCountEvent ae);
+}
diff --git a/Java/com/phidgets/event/GPSPositionChangeEvent.java b/Java/com/phidgets/event/GPSPositionChangeEvent.java
new file mode 100644
index 0000000..42b9199
--- /dev/null
+++ b/Java/com/phidgets/event/GPSPositionChangeEvent.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+
+/**
+ * This class represents the data for a GPSPositionChangeEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class GPSPositionChangeEvent
+{
+ Phidget source;
+ double latitude;
+ double longitude;
+ double altitude;
+
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ */
+ public GPSPositionChangeEvent(Phidget source, double latitude, double longitude, double altitude) {
+ this.source = source;
+ this.latitude = latitude;
+ this.longitude = longitude;
+ this.altitude = altitude;
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns the latitude of the GPS, in signed degrees format.
+ *
+ * @return the latitude
+ */
+ public double getLatitude() {
+ return latitude;
+ }
+
+ /**
+ * Returns the longitude of the GPS, in signed degrees format
+ *
+ * @return the longitude
+ */
+ public double getLongitude() {
+ return longitude;
+ }
+
+ /**
+ * Returns the altitude of the GPS, in meters.
+ *
+ * @return the altitude
+ */
+ public double getAltitude() {
+ return altitude;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ return("Position is - Latitude: "+ latitude + " degrees" +
+ ", Longitude: " + longitude + " degrees" + ", Altitude: "+ altitude + "m");
+ }
+}
diff --git a/Java/com/phidgets/event/GPSPositionChangeListener.java b/Java/com/phidgets/event/GPSPositionChangeListener.java
new file mode 100644
index 0000000..dceb712
--- /dev/null
+++ b/Java/com/phidgets/event/GPSPositionChangeListener.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2011 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents a GPSPositionChangeEvent. This event originates from the Phidget GPS
+ *
+ * @author Phidgets Inc.
+ */
+public interface GPSPositionChangeListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void gpsPositionChanged(GPSPositionChangeEvent ae);
+}
diff --git a/Java/com/phidgets/event/GPSPositionFixStatusChangeEvent.java b/Java/com/phidgets/event/GPSPositionFixStatusChangeEvent.java
new file mode 100644
index 0000000..94f08a9
--- /dev/null
+++ b/Java/com/phidgets/event/GPSPositionFixStatusChangeEvent.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+
+/**
+ * This class represents the data for a GPSPositionFixStatusChangeEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class GPSPositionFixStatusChangeEvent
+{
+ Phidget source;
+ boolean status;
+
+
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ */
+ public GPSPositionFixStatusChangeEvent(Phidget source, boolean status) {
+ this.source = source;
+ this.status = status;
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns the position fix status of the GPS.
+ *
+ * @return the position fix status
+ */
+ public boolean getStatus() {
+ return status;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ return("Position fix status IS : " + status);
+ }
+}
diff --git a/Java/com/phidgets/event/GPSPositionFixStatusChangeListener.java b/Java/com/phidgets/event/GPSPositionFixStatusChangeListener.java
new file mode 100644
index 0000000..2768cea
--- /dev/null
+++ b/Java/com/phidgets/event/GPSPositionFixStatusChangeListener.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2011 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents a GPSPositionFixStatusChangeEvent. This event originates from the Phidget GPS
+ *
+ * @author Phidgets Inc.
+ */
+public interface GPSPositionFixStatusChangeListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void gpsPositionFixStatusChanged(GPSPositionFixStatusChangeEvent ae);
+}
diff --git a/Java/com/phidgets/event/InputChangeEvent.java b/Java/com/phidgets/event/InputChangeEvent.java
new file mode 100644
index 0000000..273bb9b
--- /dev/null
+++ b/Java/com/phidgets/event/InputChangeEvent.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+
+/**
+ * This class represents the data for a InputChangeEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class InputChangeEvent
+{
+ Phidget source;
+ int index;
+ boolean state;
+
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ */
+ public InputChangeEvent(Phidget source, int index, boolean state) {
+ this.source = source;
+ this.index = index;
+ this.state = state;
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns the index of the digital input.
+ *
+ * @return the index of the input
+ */
+ public int getIndex() {
+ return index;
+ }
+
+ /**
+ * Returns the state of the input. True indicates that it is activated, False indicated the default state.
+ *
+ * @return the state of the input
+ */
+ public boolean getState() {
+ return state;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ return source.toString() + " input " + index + " changed to "
+ + state;
+ }
+}
diff --git a/Java/com/phidgets/event/InputChangeListener.java b/Java/com/phidgets/event/InputChangeListener.java
new file mode 100644
index 0000000..c63ade9
--- /dev/null
+++ b/Java/com/phidgets/event/InputChangeListener.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents a InputChangeEvent. This event originates from the Phidget Encoder, the Phidget InterfaceKit,
+ * and the Phidget Motor Controller.
+ *
+ * @author Phidgets Inc.
+ */
+public interface InputChangeListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void inputChanged(InputChangeEvent ae);
+}
diff --git a/Java/com/phidgets/event/KeyChangeEvent.java b/Java/com/phidgets/event/KeyChangeEvent.java
new file mode 100644
index 0000000..fe86cda
--- /dev/null
+++ b/Java/com/phidgets/event/KeyChangeEvent.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2006 Dictionarys Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Dictionary;
+
+/**
+ * This class represents the data for a KeyChangeEvent.
+ *
+ * @author Dictionarys Inc.
+ */
+public class KeyChangeEvent
+{
+ Dictionary source;
+ String value;
+ String key;
+
+ /**
+ * Class constructor. This is called internally by the Dictionary library when creating this event.
+ *
+ * @param source the Dictionary object from which this event originated
+ */
+ public KeyChangeEvent(Dictionary source, String key, String value)
+ {
+ this.source = source;
+ this.value = value;
+ this.key = key;
+ }
+
+ /**
+ * Returns the source Dictionary of this event. This is a reference to the Dictionary object from which this
+ * event was called. This object can be cast into a specific type of Dictionary object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Dictionary getSource() {
+ return source;
+ }
+
+ public String getKey()
+ {
+ return key;
+ }
+
+ public String getValue()
+ {
+ return value;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString()
+ {
+ return source.toString() + " Key changed: "
+ + key + ":" + value;
+ }
+}
diff --git a/Java/com/phidgets/event/KeyChangeListener.java b/Java/com/phidgets/event/KeyChangeListener.java
new file mode 100644
index 0000000..07772c2
--- /dev/null
+++ b/Java/com/phidgets/event/KeyChangeListener.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents a KeyChangeEvent. This event originates from the Phidget Dictionary. Key Change events
+ * occur when key that matches the listen pattern is either added or changes in the Dictionary.
+ *
+ * @author Phidgets Inc.
+ */
+public interface KeyChangeListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void keyChanged(KeyChangeEvent ae);
+}
diff --git a/Java/com/phidgets/event/KeyRemovalEvent.java b/Java/com/phidgets/event/KeyRemovalEvent.java
new file mode 100644
index 0000000..1a7fe9f
--- /dev/null
+++ b/Java/com/phidgets/event/KeyRemovalEvent.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2006 Dictionarys Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Dictionary;
+
+/**
+ * This class represents the data for a KeyRemovalEvent.
+ *
+ * @author Dictionarys Inc.
+ */
+public class KeyRemovalEvent
+{
+ Dictionary source;
+ String value;
+ String key;
+
+ /**
+ * Class constructor. This is called internally by the Dictionary library when creating this event.
+ *
+ * @param source the Dictionary object from which this event originated
+ */
+ public KeyRemovalEvent(Dictionary source, String key, String value)
+ {
+ this.source = source;
+ this.value = value;
+ this.key = key;
+ }
+
+ /**
+ * Returns the source Dictionary of this event. This is a reference to the Dictionary object from which this
+ * event was called. This object can be cast into a specific type of Dictionary object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Dictionary getSource() {
+ return source;
+ }
+
+ public String getKey()
+ {
+ return key;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ return source.toString() + " Key removed: "
+ + key + ":" + value;
+ }
+}
diff --git a/Java/com/phidgets/event/KeyRemovalListener.java b/Java/com/phidgets/event/KeyRemovalListener.java
new file mode 100644
index 0000000..bac9a92
--- /dev/null
+++ b/Java/com/phidgets/event/KeyRemovalListener.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents a KeyRemovalEvent. This event originates from the Phidget Dictionary.
+ * This event occurs key that matches the listen pattern is removed.
+ *
+ * @author Phidgets Inc.
+ */
+public interface KeyRemovalListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void keyRemoved(KeyRemovalEvent ae);
+}
diff --git a/Java/com/phidgets/event/LearnEvent.java b/Java/com/phidgets/event/LearnEvent.java
new file mode 100644
index 0000000..f0a784d
--- /dev/null
+++ b/Java/com/phidgets/event/LearnEvent.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+import com.phidgets.IRLearnedCode;
+
+/**
+ * This class represents the data for a LearnEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class LearnEvent
+{
+ Phidget source;
+ IRLearnedCode value;
+
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ */
+ public LearnEvent(Phidget source, IRLearnedCode value)
+ {
+ this.source = source;
+ this.value = value;
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns the learned code.
+ *
+ * @return the learned code
+ */
+ public IRLearnedCode getValue() {
+ return value;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ return source.toString() + " Learned Code: "
+ + value;
+ }
+}
diff --git a/Java/com/phidgets/event/LearnListener.java b/Java/com/phidgets/event/LearnListener.java
new file mode 100644
index 0000000..174aa30
--- /dev/null
+++ b/Java/com/phidgets/event/LearnListener.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents a LearnEvent. This event originates from the Phidget IR.
+ * This event occurs when a code is learned by the reader.
+ *
+ * @author Phidgets Inc.
+ */
+public interface LearnListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void learn(LearnEvent ae);
+}
diff --git a/Java/com/phidgets/event/MotorVelocityChangeEvent.java b/Java/com/phidgets/event/MotorVelocityChangeEvent.java
new file mode 100644
index 0000000..b3aef63
--- /dev/null
+++ b/Java/com/phidgets/event/MotorVelocityChangeEvent.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+
+/**
+ * This class represents the data for a MotorVelocityChangeEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class MotorVelocityChangeEvent
+{
+ Phidget source;
+ int index;
+ double value;
+
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ */
+ public MotorVelocityChangeEvent(Phidget source, int index, double value) {
+ this.source = source;
+ this.index = index;
+ this.value = value;
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns the index of the motor.
+ *
+ * @return the index of the motor
+ */
+ public int getIndex() {
+ return index;
+ }
+
+ /**
+ * Return the velocity of the motor. This is reported back from the motor controller as the motor changes speed.
+ *
+ * @return the motor velocity
+ */
+ public double getValue() {
+ return value;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ return source.toString() + " motor velocity " + index + " changed to "
+ + value;
+ }
+}
diff --git a/Java/com/phidgets/event/MotorVelocityChangeListener.java b/Java/com/phidgets/event/MotorVelocityChangeListener.java
new file mode 100644
index 0000000..88cd722
--- /dev/null
+++ b/Java/com/phidgets/event/MotorVelocityChangeListener.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents a MotorVelocityChangeEvent. This event originates from the Phidget Motor Controller
+ *
+ * @author Phidgets Inc.
+ */
+public interface MotorVelocityChangeListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void motorVelocityChanged(MotorVelocityChangeEvent ae);
+}
diff --git a/Java/com/phidgets/event/OutputChangeEvent.java b/Java/com/phidgets/event/OutputChangeEvent.java
new file mode 100644
index 0000000..01e6af5
--- /dev/null
+++ b/Java/com/phidgets/event/OutputChangeEvent.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+
+/**
+ * This class represents the data for a OutputChangeEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class OutputChangeEvent
+{
+ Phidget source;
+ int index;
+ boolean state;
+
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ */
+ public OutputChangeEvent(Phidget source, int index, boolean state) {
+ this.source = source;
+ this.index = index;
+ this.state = state;
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns the index of the output.
+ *
+ * @return the index of the output
+ */
+ public int getIndex() {
+ return index;
+ }
+
+ /**
+ * Returns the state of the output. True indicated that the output is active, False indicated the default inactive state.
+ *
+ * @return the state of the output
+ */
+ public boolean getState() {
+ return state;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ return source.toString() + " output " + index + " changed to "
+ + state;
+ }
+}
diff --git a/Java/com/phidgets/event/OutputChangeListener.java b/Java/com/phidgets/event/OutputChangeListener.java
new file mode 100644
index 0000000..998ffbf
--- /dev/null
+++ b/Java/com/phidgets/event/OutputChangeListener.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents a OutputChangeEvent. This event originates from the
+ * Phidget Interface Kit and the Phidget RFID Reader
+ *
+ * @author Phidgets Inc.
+ */
+public interface OutputChangeListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void outputChanged(OutputChangeEvent ae);
+}
diff --git a/Java/com/phidgets/event/PHChangeEvent.java b/Java/com/phidgets/event/PHChangeEvent.java
new file mode 100644
index 0000000..a885132
--- /dev/null
+++ b/Java/com/phidgets/event/PHChangeEvent.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+
+/**
+ * This class represents the data for a PHChangeEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class PHChangeEvent
+{
+ Phidget source;
+ double value;
+
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ */
+ public PHChangeEvent(Phidget source, double value) {
+ this.source = source;
+ this.value = value;
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns the pH. This value can range from 0-14
+ *
+ * @return the pH
+ */
+ public double getValue() {
+ return value;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ return source.toString() + " ph changed to "
+ + value;
+ }
+}
diff --git a/Java/com/phidgets/event/PHChangeListener.java b/Java/com/phidgets/event/PHChangeListener.java
new file mode 100644
index 0000000..0791631
--- /dev/null
+++ b/Java/com/phidgets/event/PHChangeListener.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents a PHChangeEvent. This event originates from the Phidget PH Sensor
+ *
+ * @author Phidgets Inc.
+ */
+public interface PHChangeListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void phChanged(PHChangeEvent ae);
+}
diff --git a/Java/com/phidgets/event/RawDataEvent.java b/Java/com/phidgets/event/RawDataEvent.java
new file mode 100644
index 0000000..ba0c644
--- /dev/null
+++ b/Java/com/phidgets/event/RawDataEvent.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+
+/**
+ * This class represents the data for a RawDataEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class RawDataEvent
+{
+ Phidget source;
+ int[] data;
+
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ */
+ public RawDataEvent(Phidget source, int[] data)
+ {
+ this.source = source;
+ this.data = new int[data.length];
+ for(int i=0;i<data.length;i++)
+ this.data[i] = data[i];
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns the raw data.
+ *
+ * @return the raw data
+ */
+ public int[] getData() {
+ return data;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ String out = " Raw data:";
+ for(int i=0;i<data.length;i++)
+ {
+ if(i%8 == 0) out = out + "\n";
+ if(data[i]==com.phidgets.IRPhidget.RAWDATA_LONGSPACE)
+ out = out + "LONG";
+ else
+ out = out + data[i];
+ if((i+1)%8 != 0) out = out + ", ";
+ }
+ return out;
+ }
+}
diff --git a/Java/com/phidgets/event/RawDataListener.java b/Java/com/phidgets/event/RawDataListener.java
new file mode 100644
index 0000000..2a656bd
--- /dev/null
+++ b/Java/com/phidgets/event/RawDataListener.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents a RawDataEvent. This event originates from the Phidget IR.
+ * This event occurs when the reader sees IR data.
+ *
+ * @author Phidgets Inc.
+ */
+public interface RawDataListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void rawData(RawDataEvent ae);
+}
diff --git a/Java/com/phidgets/event/SensorChangeEvent.java b/Java/com/phidgets/event/SensorChangeEvent.java
new file mode 100644
index 0000000..fce96ca
--- /dev/null
+++ b/Java/com/phidgets/event/SensorChangeEvent.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+
+/**
+ * This class represents the data for a SensorChangeEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class SensorChangeEvent
+{
+ Phidget source;
+ int index;
+ int value;
+
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ */
+ public SensorChangeEvent(Phidget source, int index, int value) {
+ this.source = source;
+ this.index = index;
+ this.value = value;
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns the index of the sensor.
+ *
+ * @return the index of the sensor
+ */
+ public int getIndex() {
+ return index;
+ }
+
+ /**
+ * Retuns the value of the sensor. This value can range from 0-1000.
+ *
+ * @return the value of the sensor
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ return source.toString() + " sensor " + index + " changed to "
+ + value;
+ }
+}
diff --git a/Java/com/phidgets/event/SensorChangeListener.java b/Java/com/phidgets/event/SensorChangeListener.java
new file mode 100644
index 0000000..5a4cb40
--- /dev/null
+++ b/Java/com/phidgets/event/SensorChangeListener.java
@@ -0,0 +1,19 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+/**
+ * This interface represents a SensorChangeEvent. This event originates from the Phidget Interface Kit
+ *
+ * @author Phidgets Inc.
+ */
+public interface SensorChangeListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void sensorChanged(SensorChangeEvent ae);
+}
diff --git a/Java/com/phidgets/event/SensorUpdateEvent.java b/Java/com/phidgets/event/SensorUpdateEvent.java
new file mode 100644
index 0000000..24edd6e
--- /dev/null
+++ b/Java/com/phidgets/event/SensorUpdateEvent.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2011 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+
+/**
+ * This class represents the data for a SensorUpdateEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class SensorUpdateEvent
+{
+ Phidget source;
+ int index;
+ int value;
+
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ */
+ public SensorUpdateEvent(Phidget source, int index, int value)
+ {
+ this.source = source;
+ this.index = index;
+ this.value = value;
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns the index of the sensor.
+ *
+ * @return the index of the sensor
+ */
+ public int getIndex() {
+ return index;
+ }
+
+ /**
+ * Retuns the value of the sensor. This value ranges from 0-1000.
+ *
+ * @return the value of the sensor
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ return source.toString() + " sensor " + index + " is "
+ + value;
+ }
+}
diff --git a/Java/com/phidgets/event/SensorUpdateListener.java b/Java/com/phidgets/event/SensorUpdateListener.java
new file mode 100644
index 0000000..5c491cc
--- /dev/null
+++ b/Java/com/phidgets/event/SensorUpdateListener.java
@@ -0,0 +1,19 @@
+/*
+ * Copyright 2011 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+/**
+ * This interface represents a SensorUpdateEvent. This event originates from the Phidget Motor Control
+ *
+ * @author Phidgets Inc.
+ */
+public interface SensorUpdateListener
+{
+ /**
+ * This method is called with the event data every 8ms.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void sensorUpdated(SensorUpdateEvent ae);
+}
diff --git a/Java/com/phidgets/event/ServerConnectEvent.java b/Java/com/phidgets/event/ServerConnectEvent.java
new file mode 100644
index 0000000..cc89dde
--- /dev/null
+++ b/Java/com/phidgets/event/ServerConnectEvent.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+
+/**
+ * This class represents the data for a ServerConnectEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class ServerConnectEvent
+{
+ Object source;
+
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the object from which this event originated
+ */
+ public ServerConnectEvent(Object source)
+ {
+ this.source = source;
+ }
+
+ /**
+ * Returns the source Object of this event. This is a reference to the object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Object getSource()
+ {
+ return source;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ return source.toString();
+ }
+}
diff --git a/Java/com/phidgets/event/ServerConnectListener.java b/Java/com/phidgets/event/ServerConnectListener.java
new file mode 100644
index 0000000..5667a30
--- /dev/null
+++ b/Java/com/phidgets/event/ServerConnectListener.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents a ServerConnectEvent. This event originates from all Phidgets.
+ *
+ * @author Phidgets Inc.
+ */
+public interface ServerConnectListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void serverConnected(ServerConnectEvent ae);
+}
diff --git a/Java/com/phidgets/event/ServerDisconnectEvent.java b/Java/com/phidgets/event/ServerDisconnectEvent.java
new file mode 100644
index 0000000..1b4740d
--- /dev/null
+++ b/Java/com/phidgets/event/ServerDisconnectEvent.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+
+/**
+ * This class represents the data for a ServerDisconnectEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class ServerDisconnectEvent
+{
+ Object source;
+
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the object from which this event originated
+ */
+ public ServerDisconnectEvent(Object source)
+ {
+ this.source = source;
+ }
+
+ /**
+ * Returns the source Object of this event. This is a reference to the object from which this
+ * event was called. This object can be cast into a specific type of object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Object getSource()
+ {
+ return source;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ return source.toString();
+ }
+}
diff --git a/Java/com/phidgets/event/ServerDisconnectListener.java b/Java/com/phidgets/event/ServerDisconnectListener.java
new file mode 100644
index 0000000..93df8f9
--- /dev/null
+++ b/Java/com/phidgets/event/ServerDisconnectListener.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents a ServerDisconnectEvent. This event originates from all Phidgets.
+ *
+ * @author Phidgets Inc.
+ */
+public interface ServerDisconnectListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void serverDisconnected(ServerDisconnectEvent ae);
+}
diff --git a/Java/com/phidgets/event/ServoPositionChangeEvent.java b/Java/com/phidgets/event/ServoPositionChangeEvent.java
new file mode 100644
index 0000000..f685964
--- /dev/null
+++ b/Java/com/phidgets/event/ServoPositionChangeEvent.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+
+/**
+ * This class represents the data for a ServoPositionChangeEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class ServoPositionChangeEvent
+{
+ Phidget source;
+ int index;
+ double value;
+
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ */
+ public ServoPositionChangeEvent(Phidget source, int index, double value) {
+ this.source = source;
+ this.index = index;
+ this.value = value;
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns the index of the servo motor.
+ *
+ * @return index of the servo
+ */
+ public int getIndex() {
+ return index;
+ }
+
+ /**
+ * Returns the position of the servo motor. This is esentially just the last position that the
+ * servo was set to, echoed back from the controller board.
+ *
+ * @return position of the servo
+ */
+ public double getValue() {
+ return value;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ return source.toString() + " servo position " + index + " changed to "
+ + value;
+ }
+}
diff --git a/Java/com/phidgets/event/ServoPositionChangeListener.java b/Java/com/phidgets/event/ServoPositionChangeListener.java
new file mode 100644
index 0000000..00e8cf8
--- /dev/null
+++ b/Java/com/phidgets/event/ServoPositionChangeListener.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents a ServoPositionChangeEvent. This event originates from the Phidget Servo Controller and the
+ * Phidget Advanced Servo Controller.
+ *
+ * @author Phidgets Inc.
+ */
+public interface ServoPositionChangeListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void servoPositionChanged(ServoPositionChangeEvent ae);
+}
diff --git a/Java/com/phidgets/event/ServoVelocityChangeEvent.java b/Java/com/phidgets/event/ServoVelocityChangeEvent.java
new file mode 100644
index 0000000..9c43651
--- /dev/null
+++ b/Java/com/phidgets/event/ServoVelocityChangeEvent.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+
+/**
+ * This class represents the data for a ServoVelocityChangeEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class ServoVelocityChangeEvent
+{
+ Phidget source;
+ int index;
+ double value;
+
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ */
+ public ServoVelocityChangeEvent(Phidget source, int index, double value) {
+ this.source = source;
+ this.index = index;
+ this.value = value;
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns the index of the Servo.
+ *
+ * @return the index of the servo
+ */
+ public int getIndex() {
+ return index;
+ }
+
+ /**
+ * Return the velocity of the Servo. This is reported back from the Servo controller as the Servo changes speed.
+ *
+ * @return the Servo velocity
+ */
+ public double getValue() {
+ return value;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ return source.toString() + " Servo velocity " + index + " changed to "
+ + value;
+ }
+}
diff --git a/Java/com/phidgets/event/ServoVelocityChangeListener.java b/Java/com/phidgets/event/ServoVelocityChangeListener.java
new file mode 100644
index 0000000..962ca53
--- /dev/null
+++ b/Java/com/phidgets/event/ServoVelocityChangeListener.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents a ServoVelocityChangeEvent. This event originates from the Phidget Advanced Servo Controller
+ *
+ * @author Phidgets Inc.
+ */
+public interface ServoVelocityChangeListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void servoVelocityChanged(ServoVelocityChangeEvent ae);
+}
diff --git a/Java/com/phidgets/event/SpatialDataEvent.java b/Java/com/phidgets/event/SpatialDataEvent.java
new file mode 100644
index 0000000..e6c6dae
--- /dev/null
+++ b/Java/com/phidgets/event/SpatialDataEvent.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+import com.phidgets.SpatialEventData;
+
+/**
+ * This class represents the data for a SpatialDataEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class SpatialDataEvent
+{
+ Phidget source;
+ SpatialEventData[] data;
+
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ * @param data the spatial data
+ */
+ public SpatialDataEvent(Phidget source, SpatialEventData[] data)
+ {
+ this.source = source;
+ this.data = data;
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns the data. This may contain multiple sets of data for high data rates.
+ *
+ * @return the data
+ */
+ public SpatialEventData[] getData() {
+ return data;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ return source.toString() + " Spatial Data";
+ }
+}
diff --git a/Java/com/phidgets/event/SpatialDataListener.java b/Java/com/phidgets/event/SpatialDataListener.java
new file mode 100644
index 0000000..a381777
--- /dev/null
+++ b/Java/com/phidgets/event/SpatialDataListener.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents a SpatialDataEvent. This event originates from the Phidget Spatial.
+ * This event occurs when spatial data comes in
+ *
+ * @author Phidgets Inc.
+ */
+public interface SpatialDataListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void data(SpatialDataEvent ae);
+}
diff --git a/Java/com/phidgets/event/StepperPositionChangeEvent.java b/Java/com/phidgets/event/StepperPositionChangeEvent.java
new file mode 100644
index 0000000..e002dd9
--- /dev/null
+++ b/Java/com/phidgets/event/StepperPositionChangeEvent.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+
+/**
+ * This class represents the data for a StepperPositionChangeEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class StepperPositionChangeEvent
+{
+ Phidget source;
+ int index;
+ long value;
+
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ */
+ public StepperPositionChangeEvent(Phidget source, int index, long value) {
+ this.source = source;
+ this.index = index;
+ this.value = value;
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns the index of the Stepper motor.
+ *
+ * @return index of the Stepper
+ */
+ public int getIndex() {
+ return index;
+ }
+
+ /**
+ * Returns the position of the Stepper motor. This is esentially just the last position that the
+ * Stepper was set to, echoed back from the controller board.
+ *
+ * @return position of the Stepper
+ */
+ public double getValue() {
+ return value;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ return source.toString() + " Stepper position " + index + " changed to "
+ + value;
+ }
+}
diff --git a/Java/com/phidgets/event/StepperPositionChangeListener.java b/Java/com/phidgets/event/StepperPositionChangeListener.java
new file mode 100644
index 0000000..b1cf3fc
--- /dev/null
+++ b/Java/com/phidgets/event/StepperPositionChangeListener.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents a StepperPositionChangeEvent. This event originates from the Phidget Stepper Controller and the
+ * Phidget Advanced Stepper Controller.
+ *
+ * @author Phidgets Inc.
+ */
+public interface StepperPositionChangeListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void stepperPositionChanged(StepperPositionChangeEvent ae);
+}
diff --git a/Java/com/phidgets/event/StepperVelocityChangeEvent.java b/Java/com/phidgets/event/StepperVelocityChangeEvent.java
new file mode 100644
index 0000000..6154170
--- /dev/null
+++ b/Java/com/phidgets/event/StepperVelocityChangeEvent.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+
+/**
+ * This class represents the data for a StepperVelocityChangeEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class StepperVelocityChangeEvent
+{
+ Phidget source;
+ int index;
+ double value;
+
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ */
+ public StepperVelocityChangeEvent(Phidget source, int index, double value) {
+ this.source = source;
+ this.index = index;
+ this.value = value;
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns the index of the Stepper.
+ *
+ * @return the index of the Stepper
+ */
+ public int getIndex() {
+ return index;
+ }
+
+ /**
+ * Return the velocity of the Stepper. This is reported back from the Stepper controller as the Stepper changes speed.
+ *
+ * @return the Stepper velocity
+ */
+ public double getValue() {
+ return value;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ return source.toString() + " Stepper velocity " + index + " changed to "
+ + value;
+ }
+}
diff --git a/Java/com/phidgets/event/StepperVelocityChangeListener.java b/Java/com/phidgets/event/StepperVelocityChangeListener.java
new file mode 100644
index 0000000..b416441
--- /dev/null
+++ b/Java/com/phidgets/event/StepperVelocityChangeListener.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents a StepperVelocityChangeEvent. This event originates from the Phidget Stepper Controller
+ *
+ * @author Phidgets Inc.
+ */
+public interface StepperVelocityChangeListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void stepperVelocityChanged(StepperVelocityChangeEvent ae);
+}
diff --git a/Java/com/phidgets/event/TagGainEvent.java b/Java/com/phidgets/event/TagGainEvent.java
new file mode 100644
index 0000000..6cb7a74
--- /dev/null
+++ b/Java/com/phidgets/event/TagGainEvent.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+
+/**
+ * This class represents the data for a TagGainEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class TagGainEvent
+{
+ Phidget source;
+ String value;
+
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ */
+ public TagGainEvent(Phidget source, String value)
+ {
+ this.source = source;
+ this.value = value;
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns the gained tag. The tag is a 10 digit hex number represented as a string.
+ *
+ * @return the gained tag
+ */
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ return source.toString() + " Tag Gained: "
+ + value;
+ }
+}
diff --git a/Java/com/phidgets/event/TagGainListener.java b/Java/com/phidgets/event/TagGainListener.java
new file mode 100644
index 0000000..df7b43f
--- /dev/null
+++ b/Java/com/phidgets/event/TagGainListener.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents a TagGainEvent. This event originates from the Phidget RFID Reader.
+ * This event occurs when a tag is placed on a reader.
+ *
+ * @author Phidgets Inc.
+ */
+public interface TagGainListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void tagGained(TagGainEvent ae);
+}
diff --git a/Java/com/phidgets/event/TagLossEvent.java b/Java/com/phidgets/event/TagLossEvent.java
new file mode 100644
index 0000000..ccca4fe
--- /dev/null
+++ b/Java/com/phidgets/event/TagLossEvent.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+
+/**
+ * This class represents the data for a TagLossEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class TagLossEvent
+{
+ Phidget source;
+ String value;
+
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ */
+ public TagLossEvent(Phidget source, String value)
+ {
+ this.source = source;
+ this.value = value;
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns the Tag that was lost. This is a 10 digit hex number as a string.
+ *
+ * @return the lost tag
+ */
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ return source.toString() + " Tag lost: "
+ + value;
+ }
+}
diff --git a/Java/com/phidgets/event/TagLossListener.java b/Java/com/phidgets/event/TagLossListener.java
new file mode 100644
index 0000000..66a3a8a
--- /dev/null
+++ b/Java/com/phidgets/event/TagLossListener.java
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents a TagLossEvent. This event originates from the Phidget RFID reader. Tag loss events
+ * occur when a tag is removed from the RFID reader.
+ *
+ * @author Phidgets Inc.
+ */
+public interface TagLossListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void tagLost(TagLossEvent ae);
+}
diff --git a/Java/com/phidgets/event/TemperatureChangeEvent.java b/Java/com/phidgets/event/TemperatureChangeEvent.java
new file mode 100644
index 0000000..5de528c
--- /dev/null
+++ b/Java/com/phidgets/event/TemperatureChangeEvent.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+
+/**
+ * This class represents the data for a TemperatureChangeEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class TemperatureChangeEvent
+{
+ Phidget source;
+ int index;
+ double value;
+
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ */
+ public TemperatureChangeEvent(Phidget source, int index, double value) {
+ this.source = source;
+ this.index = index;
+ this.value = value;
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns the index of the temperature sensor. An index of 0 indicated the Cold Juction Temperature sensing IC.
+ * An index of 1 indicated the thermocouple.
+ *
+ * @return the index of the sensor
+ */
+ public int getIndex() {
+ return index;
+ }
+
+ /**
+ * Returns the temperature of the sensor is degrees celcius.
+ *
+ * @return the temperature of the sensor
+ */
+ public double getValue() {
+ return value;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ return source.toString() + " Temperature " + index + " changed to "
+ + value;
+ }
+}
diff --git a/Java/com/phidgets/event/TemperatureChangeListener.java b/Java/com/phidgets/event/TemperatureChangeListener.java
new file mode 100644
index 0000000..a9eccb7
--- /dev/null
+++ b/Java/com/phidgets/event/TemperatureChangeListener.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents a TemperatureChangeEvent. This event originates from the Phidget Temperature Sensor
+ *
+ * @author Phidgets Inc.
+ */
+public interface TemperatureChangeListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void temperatureChanged(TemperatureChangeEvent ae);
+}
diff --git a/Java/com/phidgets/event/WeightChangeEvent.java b/Java/com/phidgets/event/WeightChangeEvent.java
new file mode 100644
index 0000000..1277003
--- /dev/null
+++ b/Java/com/phidgets/event/WeightChangeEvent.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+import com.phidgets.Phidget;
+
+/**
+ * This class represents the data for a WeightChangeEvent.
+ *
+ * @author Phidgets Inc.
+ */
+public class WeightChangeEvent
+{
+ Phidget source;
+ double value;
+ /**
+ * Class constructor. This is called internally by the phidget library when creating this event.
+ *
+ * @param source the Phidget object from which this event originated
+ */
+ public WeightChangeEvent(Phidget source, double value)
+ {
+ this.source = source;
+ this.value = value;
+ }
+
+ /**
+ * Returns the source Phidget of this event. This is a reference to the Phidget object from which this
+ * event was called. This object can be cast into a specific type of Phidget object to call specific
+ * device calls on it.
+ *
+ * @return the event caller
+ */
+ public Phidget getSource() {
+ return source;
+ }
+
+ /**
+ * Returns the weight in kg.
+ *
+ * @return the weight
+ */
+ public double getValue() {
+ return value;
+ }
+
+ /**
+ * Returns a string containing information about the event.
+ *
+ * @return an informative event string
+ */
+ public String toString() {
+ return source.toString() + " Weight changed to "
+ + value;
+ }
+}
diff --git a/Java/com/phidgets/event/WeightChangeListener.java b/Java/com/phidgets/event/WeightChangeListener.java
new file mode 100644
index 0000000..d6794db
--- /dev/null
+++ b/Java/com/phidgets/event/WeightChangeListener.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2006 Phidgets Inc. All rights reserved.
+ */
+
+package com.phidgets.event;
+
+/**
+ * This interface represents a WeightChangeEvent. This event originates from the Phidget Weight Sensor
+ *
+ * @author Phidgets Inc.
+ */
+public interface WeightChangeListener
+{
+ /**
+ * This method is called with the event data when a new event arrives.
+ *
+ * @param ae the event data object containing event data
+ */
+ public void weightChanged(WeightChangeEvent ae);
+}