1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
// NOLINTBEGIN(*)
#include "old_common.h"
int main(int argc, char **argv)
{
AttributeProxy *attr;
if(argc != 2)
{
TEST_LOG << "usage: %s attribute" << endl;
exit(-1);
}
string attr_name = argv[1];
try
{
attr = new AttributeProxy(attr_name);
TEST_LOG << "new AttributeProxy() returned" << endl;
}
catch(CORBA::Exception &e)
{
Except::print_exception(e);
exit(1);
}
attr->get_device_proxy()->set_transparency_reconnection(true);
while(1)
{
TEST_LOG << "Hit any key :" << endl;
char bid;
cin >> bid;
try
{
attr->ping();
TEST_LOG << "Ping successfull" << endl;
}
catch(Tango::CommunicationFailed &e)
{
cerr << "Commnunication Failed exception" << endl;
Except::print_exception(e);
}
catch(Tango::ConnectionFailed &e)
{
cerr << "Connection Failed exception" << endl;
Except::print_exception(e);
}
catch(CORBA::Exception &e)
{
Except::print_exception(e);
}
catch(...)
{
TEST_LOG << "Unknown exception" << endl;
}
}
return 0;
}
// NOLINTEND(*)
|