6100 ADCCP Programming Manual
ADCCP Programming Example Using C
069225 Tandem Computers Incorporated C–3
{
short function_code = 1;
short txt_out = 40;
short txt_in = 0;
short buffer_size;
short status_code;
struct message *setPtr;
lowmem struct message msg = {/* Function */ 0,
/* Modifier */ 0,
/* Request ID */ 0,
/* Text Out */ 0,
/* Text In */ 0,
/* MAXFRAME */ 0x100,
/* MODE */ 1,
/* AFLDn */ 1,
/* EXTENDED */ 0,
/* STATIONS */ 1,
/* TRANSLATE */ 0,
/* RNR_TIMER */ 0,
/* XOFFSET */ 0,
/* XLENGTH */ 0,
/* POLL */ 1,
/* SREJ */ 0,
/* NOREJ */ 0,
/* Reserved */ 0,
/* TWA */ 1,
/* WINDOW */ 3,
/* SWITCHED */ 0,
/* HALFDUPLEX */ 0xff,
/* NOCARRFATAL */ 0,
/* SWINCARRIER */ 1,
/* SWOUTCARRIER */ 0,
/* FLAGIDLE */ 0,
/* L2RETRY */ 3,
/* L1RETRY */ 3,
/* THRESHOLD */ 0x1f4,
/* XFERTIMER */ 0x64,
/* T1TIMER */ 0x64,
/* IDLETIMER */ 0x64,
/* DSRTIMER */ 0x12c,
/* ADDRESS */ 0,
/* ABMSUPPON */ 0,
/* ABMIPON */ 0,
/* TESTFRAME */ 0,
/* SUPPRESSRR */ 0,
/* reserved */ 0,
/* OPTIONA */ 0x01,
/* OPTIONB */ 0
};
/*
* Assign function code and text in and text out values to request then
* assign pointer to be passed to the Receive function, which will use
* WRITEREAD to make the request. The status code of the response is
* returned to the calling function.
*/
msg.function = function_code;
msg.text_out = txt_out;
msg.text_in = txt_in;
setPtr = &msg;
buffer_size = (short) sizeof(msg);
Receive(rfnum,function_code,txt_out,txt_in,buffer_size,setPtr);
status_code = setPtr->modifier;