Package nidaqdev

Class Nidaq

java.lang.Object
nidaqdev.Nidaq

public class Nidaq extends Object
Nidaq is is a wrapper style class, which makes calls to native C++ functions within in a .dll library. Each of the native C++ methods, corresponds very closely to a library call in NIDAQmx. It is by no means a complete wrapper for NIDAQmx and currently only contains those calls useful to the PAMGUARD project www.pamguard.org invalid input: '<'p
Author:
Paul Redmond, rewritten by Doug Gillespie To generate correct header file jni c side compiliation : javac Nidaq.java javah -jni nidaqdev.Nidaq
  • Constructor Details Link icon

    • Nidaq Link icon

      public Nidaq()
  • Method Details Link icon

    • isLoadLibraryOK Link icon

      public boolean isLoadLibraryOK()
    • javaDAQmxFailed Link icon

      public boolean javaDAQmxFailed(int error)
    • getDeviceName Link icon

      public String getDeviceName(int deviceNo)
      Parameters:
      deviceNo - the device number
      Returns:
      the device name
    • getDeviceType Link icon

      public String getDeviceType(int deviceNo)
      Parameters:
      deviceNo - the device number
      Returns:
      the device name
    • getNumDevices Link icon

      public int getNumDevices()
      Get the Number of NI devices.

      N.B. the devices are 1 indexed, so when device numbers will range from 1 to getNumDevices() not 0 to getNumDevices()-1.

      Returns:
      the number of NI devices
    • getMajorVersion Link icon

      public int getMajorVersion()
      Get the NI Major version number
      Returns:
      major version number
    • getMinorVersion Link icon

      public int getMinorVersion()
      Get the NI Minor version number
      Returns:
      major version number
    • setCallBacksPerSecond Link icon

      public void setCallBacksPerSecond(int callBacksPerSecond)
      Set the number of times that NI calls the EveryNCallbacks function to read from the internal buffers and send data through to the JAva side.
      Must be called just before jniPrepareDAQ.
      Parameters:
      callBacksPerSecond -
    • getCallBacksPerSecond Link icon

      public int getCallBacksPerSecond()
      Get the number of call backs per second.
      Returns:
      the number of NI callbacks per second.
    • javaPreparePlayback Link icon

      public int javaPreparePlayback(int boardNumber, int sampleRate, int bufferSamples, int[] outputChannelList)
    • javaPreparePlayback Link icon

      public int javaPreparePlayback(int boardNumber, int sampleRate, int bufferSamples, int[] outputChannelList, float outputLevel)
    • javaStartPlayback Link icon

      public boolean javaStartPlayback()
    • javaStopPlayback Link icon

      public boolean javaStopPlayback()
    • javaPlaybackData Link icon

      public int javaPlaybackData(double[] data)
    • getDevicesList Link icon

      public ArrayList<NIDeviceInfo> getDevicesList()
      Retrieve information for all NI devices.
      Returns:
      Array list of information
    • findDeviceInfo Link icon

      public NIDeviceInfo findDeviceInfo(int deviceNumber)
      Find information for a specific device number
      Parameters:
      deviceNumber - device number (NOT index !)
      Returns:
      device information or null.
    • getSerialNum Link icon

      public int getSerialNum(int deviceNo)
      Get the devices serial number
      Parameters:
      deviceNo - the device number
      Returns:
      serial number
    • setVoltageChannel Link icon

      public boolean setVoltageChannel(int deviceNo, int channel, double[] range, double voltage)
      Set a single voltage channel to a fixed value.
      Parameters:
      deviceNo - device number
      channel - channel number
      range - voltage range
      voltage - voltage
      Returns:
      true if set successfully
    • setVoltageChannel Link icon

      public boolean setVoltageChannel(int deviceNo, int channel, double voltage)
    • isSimulated Link icon

      public boolean isSimulated(int deviceNo)
      Get if the device is simulated
      Parameters:
      deviceNo - the device number
      Returns:
      is simulated
    • isAISimultaneousSampling Link icon

      public boolean isAISimultaneousSampling(int deviceNo)
      Get if the device is simulated
      Parameters:
      deviceNo - the device number
      Returns:
      is simulated
    • getMaxInputChannels Link icon

      public int getMaxInputChannels(int deviceNo)
    • getMaxSingleChannelRate Link icon

      public double getMaxSingleChannelRate(int deviceNo)
    • getMaxMultiChannelRate Link icon

      public double getMaxMultiChannelRate(int deviceNo)
    • getMaxOutputChannels Link icon

      public int getMaxOutputChannels(int deviceNo)
    • getAIVoltageRanges Link icon

      public double[] getAIVoltageRanges(int deviceNo)
    • getAOVoltageRanges Link icon

      public double[] getAOVoltageRanges(int deviceNo)
    • javaDAQmxGetErrorString Link icon

      public String javaDAQmxGetErrorString(int errorCode)
    • daqTest Link icon

      public void daqTest()
    • load Link icon

      public void load()
    • setTerminalConfig Link icon

      public void setTerminalConfig(int terminalConfig)
    • prepareDAQ Link icon

      public int prepareDAQ(int deviceNo, int sampleRate, int[] inputChannelList, double[] rangeListLo, double[] rangeListHi, int[] deviceList)
    • startDAQ Link icon

      public int startDAQ()
    • stopDAQ Link icon

      public int stopDAQ()
    • showString Link icon

      public void showString(char[] string)
      Mostly used as a callback from the C side to show string messages
      Parameters:
      string -
    • sayString Link icon

      public static void sayString(char[] string)
    • fullBuffer Link icon

      public static void fullBuffer(int iChan, double[] data)
    • resetPamguard Link icon

      public static void resetPamguard(int errorCode, char[] errorString)
    • getNiDaqProcess Link icon

      public static NIDAQProcess getNiDaqProcess()
      Returns:
      the niDaqProcess
    • setNiDaqProcess Link icon

      public static void setNiDaqProcess(NIDAQProcess niDaqProcess)
      Parameters:
      niDaqProcess - the niDaqProcess to set