ReadCJCChannels()

Reads CJC temperature data from a binary file, and stores the values in an array.

Member of the DataLogger class.

Function Prototype

VB .NET

Public Function ReadCJCChannels(ByVal startSample As Integer, ByVal count Integer, ByRef cjcChannels As Single) As MccDaq.ErrorInfo

C# .NET

public MccDaq.ErrorInfo ReadCJCChannels(int startSample, int count, ref float [] cjcChannels)

Parameter

startSample

The first sample to read from the binary file.

count

The number of samples to read from the binary file.

cjcChannels

Receives the CJC temperature values.

Returns

Notes

CJC array

The user is responsible for allocating the size of the CJC array, and ensuring that it is large enough to hold the data that will be returned. You can calculate the array allocation using the sampleCount value from GetSampleInfo(), and the cjcCount value from GetCJCInfo():

float* cjcChannels = new float[sampleCount * cjcCount];

The figure below shows the layout of the CJC array, and how the elements should be indexed.

CJC array

Where n is (CJCCount - 1)

Use the following code fragment to access the elements of the CJC array:

for (i=0; i<numberOfSamples; i++)

{

for (j=0; j<numberOfCJCChannels; j++)

{

c = cjcArray[(i * numberOfCJCChannels) + j];

}

}

where

numberOfSamples is set by the sampleCount value from GetSampleInfo().

numberOfCJCChannels is set by the cjcCount value from GetCJCInfo().