summaryrefslogtreecommitdiffstats
path: root/util/scan/dvb-c/fi-dna (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2013-09-03Imported Debian patch 1.1.1+rev1457-4debian/1.1.1+rev1457-4Mark Purcell4-1/+11
2013-09-03Imported Debian patch 1.1.1+rev1457-3debian/1.1.1+rev1457-3Tobias Grimm4-3/+11
2013-09-03Imported Debian patch 1.1.1+rev1457-2debian/1.1.1+rev1457-2Mark Purcell6-6/+1086
2013-09-03Imported Upstream version 1.1.1+rev1457upstream/1.1.1+rev1457etobi373-3363/+3502
2013-09-03Imported Debian patch 1.1.1+rev1355-1.1debian/1.1.1+rev1355-1.1Simon Paillard3-0/+215
2013-09-03Imported Upstream version 1.1.1+rev1355upstream/1.1.1+rev1355etobi210-637/+35932
2013-09-03Imported Upstream version 1.1.1+rev1273upstream/1.1.1+rev1273etobi154-853/+1524
2013-09-03Imported Debian patch 1.1.1+rev1207-5debian/1.1.1+rev1207-5Tobias Grimm5-9/+74
2013-09-03Imported Debian patch 1.1.1+rev1207-4debian/1.1.1+rev1207-4Mark Purcell2-2/+12
2013-09-03Imported Debian patch 1.1.1+rev1207-3debian/1.1.1+rev1207-3Mark Purcell2-3/+20
2013-09-03Imported Debian patch 1.1.1+rev1207-2debian/1.1.1+rev1207-2Mark Purcell2-1/+15
2013-09-03Imported Upstream version 1.1.1+rev1207upstream/1.1.1+rev1207etobi1282-2474/+68297
2013-09-03Imported Debian patch 1.1.1-3debian/1.1.1-3Debian VDR Team6-770/+7062
2013-09-03Imported Debian patch 1.1.1-2debian/1.1.1-2Thomas Schmidt4-1/+27
2013-09-03Imported Upstream version 1.1.1upstream/1.1.1etobi30-172/+2229
2013-09-03Imported Debian patch 1.1.0-11debian/1.1.0-11Debian VDR Team5-3/+83
2013-09-03Imported Debian patch 1.1.0-9debian/1.1.0-9Thomas Schmidt3-0/+33
2013-09-03Imported Debian patch 1.1.0-8debian/1.1.0-8Debian VDR Team9-560/+1531
2013-09-03Imported Debian patch 1.1.0-7debian/1.1.0-7Debian VDR Team4-324/+553
2013-09-03Imported Debian patch 1.1.0-6debian/1.1.0-6Debian VDR Team6-8/+21
2013-09-03Imported Debian patch 1.1.0-5debian/1.1.0-5Debian VDR Team15-0/+2186
vent.*; /** * This class represents a Phidget Frequency Counter. All methods * to read manipulate the Phidget Frequency Counter are implemented in this class. * <p> * * @author Phidgets Inc. */ public final class FrequencyCounterPhidget extends Phidget { public FrequencyCounterPhidget () throws PhidgetException { super (create ()); } private static native long create () throws PhidgetException; /** * Zero-Crossing Filter Type. This is used with {@link #getFilter(int) getFilter} and {@link #setFilter(int, int) setFilter} */ public static final int PHIDGET_FREQUENCYCOUNTER_FILTERTYPE_ZERO_CROSSING = 1; /** * Logic-Level Filter Type. This is used with {@link #getFilter(int) getFilter} and {@link #setFilter(int, int) setFilter} */ public static final int PHIDGET_FREQUENCYCOUNTER_FILTERTYPE_LOGIC_LEVEL = 2; /** * Unknown Filter Type. This is used with {@link #getFilter(int) getFilter} and {@link #setFilter(int, int) setFilter} */ public static final int PHIDGET_FREQUENCYCOUNTER_FILTERTYPE_UNKNOWN = 3; /** * Returns the number of channels. * @return Number of inputs */ public native int getFrequencyInputCount () throws PhidgetException; /** * Returns the last calcualted frequency on the specified channel, in Hz. This function will return 0 if the {@link #getTimeout(int) getTimeout} value elapses without detecting a signal. * Frequency is recalculated up to 31.25 times a second, depending on the pulse rate. * @param index Index of the channel * @return frequency of the channel * @throws PhidgetException If this Phidget is not opened and attached, or if the index is out of range. * See {@link com.phidgets.Phidget#open(int) open} for information on determining if a device is attached. */ public native double getFrequency (int index) throws PhidgetException; /** * Returns the total number of pulses detected on the specified channel since the Phidget was opened, or since the last reset. * @param index Index of the channel * @return total number of pulses * @throws PhidgetException If this Phidget is not opened and attached, or if the index is out of range. * See {@link com.phidgets.Phidget#open(int) open} for information on determining if a device is attached. */ public native long getTotalCount (int index) throws PhidgetException; /** * Returns the total elapsed tiem since Phidget was opened, or since the last reset, in microseconds. This time corresponds to the {@link #getTotalCount(int) getTotalCount} property. * @param index Index of the channel * @return total time, in microseconds * @throws PhidgetException If this Phidget is not opened and attached, or if the index is out of range. * See {@link com.phidgets.Phidget#open(int) open} for information on determining if a device is attached. */ public native long getTotalTime (int index) throws PhidgetException; /** * Returns the timeout value, in microseconds. This value is used to set the time to wait without detecting a signal before reporting 0 Hz. The valid range is 0.1 - 100 seconds(100,000 - 100,000,000 microseconds). * 0.1 timeout represents the lowest frequency that will be measurable. * @param index Index of the channel * @return timeout value * @throws PhidgetException If this Phidget is not opened and attached, or if the index is out of range. * See {@link com.phidgets.Phidget#open(int) open} for information on determining if a device is attached. */ public native int getTimeout (int index) throws PhidgetException; /** * Sets the timeout value, in microseconds. This value is used to set the time to wait without detecting a signal before reporting 0 Hz. The valid range is 0.1 - 100 seconds(100,000 - 100,000,000 microseconds). * 0.1 timeout represents the lowest frequency that will be measurable. * @param index Index of the channel * @param timeout new timeout value * @throws PhidgetException If this Phidget is not opened and attached, the index is out of range or the the timeout value is out of range. * See {@link com.phidgets.Phidget#open(int) open} for information on determining if a device is attached. */ public native void setTimeout (int index, int timeout) throws PhidgetException; /** * Returns the enabled state on the specified channel. When the channel is disabled, it will no longer register counts. TotalTime and TotalCount properties will not be incremented until * the channel is re-enabled. * @param index Index of the channel * @return state * @throws PhidgetException If this Phidget is not opened and attached, or if the index is invalid. * See {@link com.phidgets.Phidget#open(int) open} for information on determining if a device is attached. */ public native boolean getEnabled (int index) throws PhidgetException; /** * Gets the enabled state on the specified channel. When the channel is disabled, it will no longer register counts. TotalTime and TotalCount properties will not be incremented until * the channel is re-enabled. * @param index Index of the channel * @param state new enabled state * @throws PhidgetException If this Phidget is not opened and attached, or if the index is invalid. * See {@link com.phidgets.Phidget#open(int) open} for information on determining if a device is attached. */ public native void setEnabled (int index, boolean state) throws PhidgetException; /** * Gets the channel filter mode. This controls the type of signal that the Frequency Counter will respond to - either a zero-centered or a logic-level signal. * <p> * The possible values for type are {@link #PHIDGET_FREQUENCYCOUNTER_FILTERTYPE_ZERO_CROSSING PHIDGET_FREQUENCYCOUNTER_FILTERTYPE_ZERO_CROSSING}, * {@link #PHIDGET_FREQUENCYCOUNTER_FILTERTYPE_LOGIC_LEVEL PHIDGET_FREQUENCYCOUNTER_FILTERTYPE_LOGIC_LEVEL}, {@link #PHIDGET_FREQUENCYCOUNTER_FILTERTYPE_UNKNOWN PHIDGET_FREQUENCYCOUNTER_FILTERTYPE_UNKNOWN} * <p> * @param index Index of the channel * @return filter type * @throws PhidgetException If this Phidget is not opened and attached, or if the index is invalid. * See {@link com.phidgets.Phidget#open(int) open} for information on determining if a device is attached. */ public native int getFilter (int index) throws PhidgetException; /** * Sets the channel filter mode. This controls the type of signal that the Frequency Counter will respond to - either a zero-centered or a logic-level signal. * <p> * The possible values for type are {@link #PHIDGET_FREQUENCYCOUNTER_FILTERTYPE_ZERO_CROSSING PHIDGET_FREQUENCYCOUNTER_FILTERTYPE_ZERO_CROSSING}, * {@link #PHIDGET_FREQUENCYCOUNTER_FILTERTYPE_LOGIC_LEVEL PHIDGET_FREQUENCYCOUNTER_FILTERTYPE_LOGIC_LEVEL}, {@link #PHIDGET_FREQUENCYCOUNTER_FILTERTYPE_UNKNOWN PHIDGET_FREQUENCYCOUNTER_FILTERTYPE_UNKNOWN} * <p> * @param index Index of the channel * @param type new filter type * @throws PhidgetException If this Phidget is not opened and attached, or if the index is invalid. * See {@link com.phidgets.Phidget#open(int) open} for information on determining if a device is attached. */ public native void setFilter (int index, int type) throws PhidgetException; /** * Resets the {@link #getTotalCount(int) getTotalCount} and {@link #getTotalTime(int) getTotalTime} counters to 0 for the specified channel. For best performance, this should be called when the channel is disabled. * @param index Index of the channel * @throws PhidgetException If this Phidget is not opened and attached, or if the index is invalid. * See {@link com.phidgets.Phidget#open(int) open} for information on determining if a device is attached. */ public native void reset (int index) throws PhidgetException; private final void enableDeviceSpecificEvents (boolean b) { enableFrequencyCounterCountEvents (b && frequencyCounterCountListeners.size () > 0); } /** * Adds a count listener. The count handler is a method that will be called whenever some counts have been detected. * This event will fire up to 31.25 times a second, depending on the pulse rate. The time is in microseconds and represents the amount * of time in which the number of counts occured. This event can be used to calculate frequency independently of the phidget21 library frequency implementation. * This event will fire with a count of 0 once, after the Timeout time has elapsed with no counts for a channel, to indicate 0 Hz. * <p> * There is no limit on the number of count handlers that can be registered for a particular Phidget. * * @param l An implemetation of the {@link com.phidgets.event.FrequencyCounterCountListener FrequencyCounterCountListener} interface */ public final void addFrequencyCounterCountListener (FrequencyCounterCountListener l) { synchronized (frequencyCounterCountListeners) { frequencyCounterCountListeners.add (l); enableFrequencyCounterCountEvents (true); }} private LinkedList frequencyCounterCountListeners = new LinkedList (); private long nativeFrequencyCounterCountHandler = 0; public final void removeFrequencyCounterCountListener (FrequencyCounterCountListener l) { synchronized (frequencyCounterCountListeners) { frequencyCounterCountListeners.remove (l); enableFrequencyCounterCountEvents (frequencyCounterCountListeners.size () > 0); }} private void fireFrequencyCounterCount (FrequencyCounterCountEvent e) { synchronized (frequencyCounterCountListeners) { for (Iterator it = frequencyCounterCountListeners.iterator (); it.hasNext ();) ((FrequencyCounterCountListener) it.next ()).frequencyCounterCounted (e); } } private native void enableFrequencyCounterCountEvents (boolean b); }