3 gethellotwo – INFICON XTC/3 Thin Film Deposition Controller Communications Library Operating Manual User Manual

Page 25

Advertising
background image

1 - 11

IP

N 07

4-

45

4-

P1

B

XTC/3 Communications Library Operating Manual

1.3.2.3 getHelloTwo

int getHelloTwo (XTC3HelloData *val, char* ErrMsg, unsigned short *len, BOOL
TCP)
;

Description:

This function gets the Structure Number, Compatiblity Number, Range Number,
and Unit Type (XTC/3M vs XTC/3S).

Arguments:

XTC3HelloData *val

This 16 byte structure will hold the 4 integers described above, in that order,
sent by the XTC/3 instrument.

char* ErrMsg

unsigned short *len

BOOL TCP

Example:

#include "XTC3Lib.h"
void main()
{

if(StartSocket()==0)

printf("Socket could not be initialized.");

if(!ConnectSocket("10.211.70.209"))

printf("Socket could not be connected!");

char ErrStr[256];
unsigned short length = 0;
memset(ErrStr,0,256);
XTC3HelloData val;
BOOL TCP = TRUE; // TCP/IP comm.
getHelloTwo (&val, ErrMsg, length, TCP);
if(*ErrStr == 0)
{

printf("Data Transfer successful\n");
printf("Structure Number: %d\n"

"Compatibility Number: %d\n"
" Range Number: %d\n"
" Unit Type: %d\n",
val.m_Data[0], val.m_Data[1], val.m_Data[2],
val.m_Data[3]);

}
else

printf(ErrStr);

CloseSocket();

}

Advertising