Interface IMeter

    • Method Detail

      • getDescription

        static java.lang.String getDescription()
      • getCurrent

        double getCurrent()
                   throws java.io.IOException,
                          DeviceException
        Takes a current measurement and returns the value.
        Returns:
        Current measurement value, in Amps
        Throws:
        DeviceException - Upon incompatibility with device
        java.io.IOException - Upon communications error
      • getCurrent

        default double getCurrent​(double integrationTime)
                           throws DeviceException,
                                  java.io.IOException
        Takes a current measurement using a specified one-off integration time.
        Parameters:
        integrationTime - Integration time to use in seconds
        Returns:
        Current measurement value, in Amps
        Throws:
        DeviceException - Upon incompatibility with device
        java.io.IOException - Upon communications error
      • setIntegrationTime

        void setIntegrationTime​(double time)
                         throws java.io.IOException,
                                DeviceException
        Sets the integration time for each measurement.
        Parameters:
        time - Integration time, in seconds.
        Throws:
        DeviceException - Upon incompatibility with device
        java.io.IOException - Upon communications error
      • getIntegrationTime

        double getIntegrationTime()
                           throws java.io.IOException,
                                  DeviceException
        Returns the integration time used for each measurement.
        Returns:
        Integration time, in seconds.
        Throws:
        DeviceException - Upon incompatibility with device
        java.io.IOException - Upon communications error
      • setCurrentRange

        void setCurrentRange​(double range)
                      throws java.io.IOException,
                             DeviceException
        Sets the range used for current measurements. A value of n indicates the range -n to +n. If only discrete options are available, the smallest range that contains the given value is chosen.
        Parameters:
        range - The range to use, in Amps
        Throws:
        DeviceException - Upon incompatibility with device
        java.io.IOException - Upon communications error
      • getCurrentRange

        double getCurrentRange()
                        throws java.io.IOException,
                               DeviceException
        Returns the range used for current measurements. A value of n indicates the range -n to +n.
        Returns:
        The range being used, in Amps
        Throws:
        DeviceException - Upon incompatibility with device
        java.io.IOException - Upon communications error
      • useAutoCurrentRange

        void useAutoCurrentRange()
                          throws java.io.IOException,
                                 DeviceException
        Instruments the ammeter to automatically select which range to use for current measurements.
        Throws:
        DeviceException - Upon incompatibility with device
        java.io.IOException - Upon communications error
      • isAutoRangingCurrent

        boolean isAutoRangingCurrent()
                              throws java.io.IOException,
                                     DeviceException
        Returns whether the ammeter is currently using auto-ranging for current measurements.
        Returns:
        Is auto-ranging being used?
        Throws:
        DeviceException - Upon incompatibility with device
        java.io.IOException - Upon communications error
      • setAverageMode

        void setAverageMode​(AMode mode)
                     throws java.io.IOException,
                            DeviceException
        Sets the type of averaging to use for each measurement.
        Parameters:
        mode - Averaging mode to use
        Throws:
        DeviceException - Upon incompatibility with device
        java.io.IOException - Upon communications error
      • setAverageCount

        void setAverageCount​(int count)
                      throws java.io.IOException,
                             DeviceException
        Sets the number of measurements to use for each average. Only applies if the averaging mode is not "NONE".
        Parameters:
        count - Number of measurements
        Throws:
        DeviceException - Upon incompatibility with device
        java.io.IOException - Upon communications error
      • getAverageMode

        AMode getAverageMode()
                      throws java.io.IOException,
                             DeviceException
        Returns the type of averaging being used for each measurement.
        Returns:
        Averaging type
        Throws:
        DeviceException - Upon incompatibility with device
        java.io.IOException - Upon communications error
      • getAverageCount

        int getAverageCount()
                     throws java.io.IOException,
                            DeviceException
        Returns the number of measurements being used for each average. Only applies if the averaging mode is not "NONE".
        Returns:
        Number of measurements
        Throws:
        DeviceException - Upon incompatibility with device
        java.io.IOException - Upon communications error
      • turnOn

        void turnOn()
             throws java.io.IOException,
                    DeviceException
        Turns the ammeter measurement channel on.
        Specified by:
        turnOn in interface Switch
        Throws:
        DeviceException - Upon incompatibility with device
        java.io.IOException - Upon communications error
      • turnOff

        void turnOff()
              throws java.io.IOException,
                     DeviceException
        Turns the ammeter measurement channel off.
        Specified by:
        turnOff in interface Switch
        Throws:
        DeviceException - Upon incompatibility with device
        java.io.IOException - Upon communications error
      • isOn

        boolean isOn()
              throws java.io.IOException,
                     DeviceException
        Returns whether the ammeter measurement channel is on or off.
        Specified by:
        isOn in interface Switch
        Returns:
        Is it on?
        Throws:
        DeviceException - Upon incompatibility with device
        java.io.IOException - Upon communications error
      • isLineFilterEnabled

        boolean isLineFilterEnabled()
                             throws DeviceException,
                                    java.io.IOException
        Returns whether the voltmeter is using any line-frequency filtering
        Returns:
        Using line filter?
        Throws:
        DeviceException - Upon incompatibility with device
        java.io.IOException - Upon communications error
      • setLineFilterEnabled

        void setLineFilterEnabled​(boolean enabled)
                           throws DeviceException,
                                  java.io.IOException
        Sets whether the voltmeter should use any line-frequency filtering (if available)
        Parameters:
        enabled - Use line filter?
        Throws:
        DeviceException - Upon incompatibility with device
        java.io.IOException - Upon communications error
      • waitForStableCurrent

        default void waitForStableCurrent​(double pctMargin,
                                          int interval,
                                          int duration)
                                   throws java.io.IOException,
                                          DeviceException,
                                          java.lang.InterruptedException
        Throws:
        java.io.IOException
        DeviceException
        java.lang.InterruptedException