blob: a5a8a3b02cbd36ae74ceecf2da8c005f072721ab (
plain)
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
|
// $Id$
//==============================================================
/**
* @file client.cpp
*
* This is a simple client test program that interact with the RoundTrip
* component implementation. The single threaded client issues
* two-way operations, the total latency (response time) is measured
* NOTE: this client implementation has been adapted from the
* $TAO_ROOT/performance-results/Latency/Single_Threaded/
*
* @author Arvind S. Krishna <arvindk@dre.vanderbilt.edu>
*/
//==============================================================
#include "RoundTripClientC.h"
const char *ior = "file://test.ior";
int
main (int argc, char *argv[])
{
ACE_TRY_NEW_ENV
{
// Initialize orb
CORBA::ORB_var orb = CORBA::ORB_init (argc, argv ACE_ENV_ARG_PARAMETER);
// Resolve HomeFinder interface
CORBA::Object_var obj
= orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
Benchmark::RoundTripClient_var test =
Benchmark::RoundTripClient::_narrow(obj.in());
//Get the RoundTrip reference
Benchmark::Controller_var trigger = test->provide_controller ();
//Send a trigger to start the test
trigger->start();
}
ACE_CATCHANY
{
ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception Handled:");
return 1;
}
ACE_ENDTRY;
return 0;
}
|