summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/performance-tests/RTEvent/lib/Client_Options.h
blob: cbffa42aeb785f116dc24374aa3aa7621eba6455 (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
52
53
54
55
56
57
58
59
60
61
62
/**
 * @file Client_Options.h
 *
 * $Id$
 *
 * @author Carlos O'Ryan <coryan@uci.edu>
 *
 */

#ifndef TAO_RTEC_PERF_CLIENT_OPTIONS_H
#define TAO_RTEC_PERF_CLIENT_OPTIONS_H
#include /**/ "ace/pre.h"

#include "rtec_perf_export.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

ACE_BEGIN_VERSIONED_NAMESPACE_DECL
class ACE_Arg_Shifter;
ACE_END_VERSIONED_NAMESPACE_DECL

/// Parse the command-line client_options for the tests.
/**
 * Note that some of the tests ignore some of the client_options, but it is
 * easier to have them all in a single class.
 */
class TAO_RTEC_Perf_Export Client_Options
{
public:
  /// Constructor
  Client_Options (int &argc, char *argv[]);

  const char *ior;
  int iterations;
  int nthreads;
  int high_priority_period;
  int high_priority_workload;
  int low_priority_period;
  int low_priority_workload;
  int low_priority_consumers;

  int dump_history;
  int use_rt_corba;
  int global_low_priority_rate;
  int unique_low_priority_event;
  int funky_supplier_publication;
  int high_priority_is_last;

private:
  int option (ACE_Arg_Shifter &arg_shifter,
              const char *option_name,
              int &option_value);

  int boolean_option (ACE_Arg_Shifter &arg_shifter,
                      const char *option_name,
                      int &option_value);
};

#include /**/ "ace/post.h"
#endif /* TAO_RTEC_PERF_CLIENT_OPTIONS_H */