Operation, Remote Operation
Examples
Rev. L0
ATC-5000NG ATC/DME Test Set Operation Manual
1-2-5
February 2020
Subject to Export Control. See Cover Page for details.
Page 169
if ((ATC_s tatu s = v iSe tAt tribu te( *ins tHan dle , VI_ATT R_T MO_ VAL UE,
T IME_OUT_ NORM_VAL)) <0 )
retu rn AT C_in itCle a nUp ( rmSe ss ion , ins tHan dle , AT C_s tatu s);
if ((ATC_s tatu s = v iSe tBu f(* inst Ha nd le,
VI_READ_ BUF |VI_WRIT E_ BUF , 4 00 0))< 0 )
retu rn AT C_in itCle a nUp ( rmSe ss ion , ins tHan dle , AT C_s tatu s);
if ((ATC_s tatu s = v iSe tAt tribu te (*ins tHan dle , VI_ATT R_WR_ BUF _OPER_MODE,
VI _F LUSH_ ON_ ACCESS)) < 0 )
retu rn AT C_in itCle a nUp ( rmSe ss ion , ins tHan dle , AT C_s tatu s);
if ((ATC_s tatu s = v iSe tAt tribu te (*ins tHan dle , VI_ATT R_RD_BUF_ OPER_MODE,
VI _F LUSH_ ON_ ACCESS)) < 0 )
retu rn AT C_in itCle a nUp ( rmSe ss ion , ins tHan dle , AT C_s tatu s);
if ((ATC_s tatu s = v iSe tAt tribu te (*ins tHan dle , VI_ATT R_T ERMCHAR_EN,
VI_ TRUE)) <0 )
retu rn AT C_in itCle a nUp ( rmSe ss ion , ins tHan dle , AT C_s tatu s);
if ((ATC_s tatu s = v iSe tAt tribu te (*ins tHan dle ,
VI_ ATT R_ TERMCHAR, '\n')) < 0 )
retu rn AT C_in itCle a nUp ( rmSe ss ion , ins tHan dle , AT C_s tatu s);
}
if (I DQu ery )
{
ViCha r mfg [50 ], de sc [50 ], p n[5 0];
if ((ATC_s tatu s = ATC_ rea d_ IDN ( *ins tHan dle , mfg, de sc, pn )) < 0)
retu rn AT C_in itCle a nUp ( rmSe ss ion , ins tHan dle ,
VI_ERROR_ FAIL_ ID_QUERY);
}
//- Re se t ins tru me nt ------ ------ ------ ------- ------ ------ ------- ------ --
if (r ese tDev ice )
{
if (IDQu er y)
De lay (WAITT IME0_ 02 );
if ((ATC_s tatu s = ATC_ res et ( *ins tHan dle )) < 0)
retu rn AT C_in itCle a nUp ( rmSe ss ion , ins tHan dle , AT C_s tatu s);
}
re turn ATC_ sta tus ;
}
//= == == == == = == == == == = == == == == = == == == == = == == == = == == == == = == == == == = == == == == = == == ==
// F un ctio n: L og se ss ion into wait list
// Purp os e: Th is fu nc tion ad ds th e s es sion to the o pe n lis t
//= == == == == = == == == == = == == == == = == == == == = == == == = == == == == = == == == == = == == == == = == == ==
ViSta tus AT C_s es sio nIn foOp en (ViSe ss ion ins tHa nd le, ViRsr c re so urc eNa me )
{
in t ind ex ;
// Ch ec k to se e if t he se ssio n ha nd le a lrea dy ex ists
fo r (in de x = 0; in d ex < MAX_ SESSIONS; in de x+ +)
{
if (se ssio nI nfo [ind ex ].se ss ion == in stHan dle )
bre ak ;
}
if (in de x < MAX_ SESSI ONS)
r etu rn AT C_ ERROR_SESSION_ ALREADY_ EXIT S;
Содержание 138156
Страница 3: ......