Package nidaqdev
Class Nidaq
java.lang.Object
nidaqdev.Nidaq
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
 
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassclassclassclassclassclassclassclassclassclass - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoiddaqTest()findDeviceInfo(int deviceNumber) Find information for a specific device numberstatic voidfullBuffer(int iChan, double[] data) double[]getAIVoltageRanges(int deviceNo) double[]getAOVoltageRanges(int deviceNo) intGet the number of call backs per second.getDeviceName(int deviceNo) Retrieve information for all NI devices.getDeviceType(int deviceNo) intGet the NI Major version numberintgetMaxInputChannels(int deviceNo) doublegetMaxMultiChannelRate(int deviceNo) intgetMaxOutputChannels(int deviceNo) doublegetMaxSingleChannelRate(int deviceNo) intGet the NI Minor version numberstatic NIDAQProcessintGet the Number of NI devices.intgetSerialNum(int deviceNo) Get the devices serial numberbooleanisAISimultaneousSampling(int deviceNo) Get if the device is simulatedbooleanbooleanisSimulated(int deviceNo) Get if the device is simulatedbooleanjavaDAQmxFailed(int error) javaDAQmxGetErrorString(int errorCode) intjavaPlaybackData(double[] data) intjavaPreparePlayback(int boardNumber, int sampleRate, int bufferSamples, int[] outputChannelList) intjavaPreparePlayback(int boardNumber, int sampleRate, int bufferSamples, int[] outputChannelList, float outputLevel) booleanbooleanvoidload()intprepareDAQ(int deviceNo, int sampleRate, int[] inputChannelList, double[] rangeListLo, double[] rangeListHi, int[] deviceList) static voidresetPamguard(int errorCode, char[] errorString) static voidsayString(char[] string) voidsetCallBacksPerSecond(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.static voidsetNiDaqProcess(NIDAQProcess niDaqProcess) voidsetTerminalConfig(int terminalConfig) booleansetVoltageChannel(int deviceNo, int channel, double voltage) booleansetVoltageChannel(int deviceNo, int channel, double[] range, double voltage) Set a single voltage channel to a fixed value.voidshowString(char[] string) Mostly used as a callback from the C side to show string messagesintstartDAQ()intstopDAQ() 
- 
Constructor Details
- 
Nidaq
public Nidaq() 
 - 
 - 
Method Details
- 
isLoadLibraryOK
public boolean isLoadLibraryOK() - 
javaDAQmxFailed
public boolean javaDAQmxFailed(int error)  - 
getDeviceName
- Parameters:
 deviceNo- the device number- Returns:
 - the device name
 
 - 
getDeviceType
- Parameters:
 deviceNo- the device number- Returns:
 - the device name
 
 - 
getNumDevices
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
public int getMajorVersion()Get the NI Major version number- Returns:
 - major version number
 
 - 
getMinorVersion
public int getMinorVersion()Get the NI Minor version number- Returns:
 - major version number
 
 - 
setCallBacksPerSecond
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
public int getCallBacksPerSecond()Get the number of call backs per second.- Returns:
 - the number of NI callbacks per second.
 
 - 
javaPreparePlayback
public int javaPreparePlayback(int boardNumber, int sampleRate, int bufferSamples, int[] outputChannelList)  - 
javaPreparePlayback
public int javaPreparePlayback(int boardNumber, int sampleRate, int bufferSamples, int[] outputChannelList, float outputLevel)  - 
javaStartPlayback
public boolean javaStartPlayback() - 
javaStopPlayback
public boolean javaStopPlayback() - 
javaPlaybackData
public int javaPlaybackData(double[] data)  - 
getDevicesList
Retrieve information for all NI devices.- Returns:
 - Array list of information
 
 - 
findDeviceInfo
Find information for a specific device number- Parameters:
 deviceNumber- device number (NOT index !)- Returns:
 - device information or null.
 
 - 
getSerialNum
public int getSerialNum(int deviceNo) Get the devices serial number- Parameters:
 deviceNo- the device number- Returns:
 - serial number
 
 - 
setVoltageChannel
public boolean setVoltageChannel(int deviceNo, int channel, double[] range, double voltage) Set a single voltage channel to a fixed value.- Parameters:
 deviceNo- device numberchannel- channel numberrange- voltage rangevoltage- voltage- Returns:
 - true if set successfully
 
 - 
setVoltageChannel
public boolean setVoltageChannel(int deviceNo, int channel, double voltage)  - 
isSimulated
public boolean isSimulated(int deviceNo) Get if the device is simulated- Parameters:
 deviceNo- the device number- Returns:
 - is simulated
 
 - 
isAISimultaneousSampling
public boolean isAISimultaneousSampling(int deviceNo) Get if the device is simulated- Parameters:
 deviceNo- the device number- Returns:
 - is simulated
 
 - 
getMaxInputChannels
public int getMaxInputChannels(int deviceNo)  - 
getMaxSingleChannelRate
public double getMaxSingleChannelRate(int deviceNo)  - 
getMaxMultiChannelRate
public double getMaxMultiChannelRate(int deviceNo)  - 
getMaxOutputChannels
public int getMaxOutputChannels(int deviceNo)  - 
getAIVoltageRanges
public double[] getAIVoltageRanges(int deviceNo)  - 
getAOVoltageRanges
public double[] getAOVoltageRanges(int deviceNo)  - 
javaDAQmxGetErrorString
 - 
daqTest
public void daqTest() - 
load
public void load() - 
setTerminalConfig
public void setTerminalConfig(int terminalConfig)  - 
prepareDAQ
public int prepareDAQ(int deviceNo, int sampleRate, int[] inputChannelList, double[] rangeListLo, double[] rangeListHi, int[] deviceList)  - 
startDAQ
public int startDAQ() - 
stopDAQ
public int stopDAQ() - 
showString
public void showString(char[] string) Mostly used as a callback from the C side to show string messages- Parameters:
 string-
 - 
sayString
public static void sayString(char[] string)  - 
fullBuffer
public static void fullBuffer(int iChan, double[] data)  - 
resetPamguard
public static void resetPamguard(int errorCode, char[] errorString)  - 
getNiDaqProcess
- Returns:
 - the niDaqProcess
 
 - 
setNiDaqProcess
- Parameters:
 niDaqProcess- the niDaqProcess to set
 
 -