Campbell Scientific TDRSDK Software Developement Kit User Manual

Page 8

Advertising
background image

TDRSDK Software Development Kit for TDR100

4

Parameters:

CBfunc: Pointer to procedure that will be called (if
required), upon receipt of a TDR100 command response.

cmdType:

API function numbers

errCode:

error code for the cmdType.

Return Codes:

0 = Success

1

=

Failure

5. GetDLLver

Allows the calling application to obtain the DLL version.

int GetDLLver(char Ver, int iStrSize)

Parameters:

Ver: Pointer to a string buffer. Upon successful return, will
contain the version in the form ‘1.0’.

iStrSize: Integer, size of pVer string buffer

Return Codes:

0 = Success

1 = String buffer too small

6. QuerySM

Allows the calling application to check the current state of the state machine in
the DLL. This function returns immediately. An application is required to
make the request according to the current state; otherwise, an error code will be
returned. See the VBA examples.

int QuerySM(int FuncNbr)

Parameters:

FuncNbr: pointer to integer value, returns function number
being processed or data available from.

Return Codes:

0 = Idle

n = still processing request

100 = Get data successfully

101 = CRC16 check error

102 = Wrong response

7. ReadSM_State

Allows the calling application to translate state number to a state string.

int ReadSM_State(int stateNbr, char stateStr, int strSiz)

Parameters: stateNbr:

state

numbers.

stateStr: state described in a string.

strSiz: buffer size for stateStr.

Return Codes:

0 = Success

1

=

Failure

Advertising