cbLogReadCJCChannels()

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

Function Prototype

C/C++

int cbLogReadCJCChannels(char* Filename, int StartSample, int Count, float* CJCChannels)

Visual Basic

Function cbLogReadCJCChannels(ByVal Filename$, ByVal StartSample&, ByVal SampleCount&, ByRef CJCChannelData!) As Long

Arguments

Filename

The name of the file to retrieve the information from.

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 cbLogGetSampleInfo(), and the cjcCount value from cbLogGetCJCInfo():

float* CJCChannels = new float[SampleCount * CJCCount];

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

analog 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

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

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