OnixS C++ CME MDP Streamlined Market Data Handler  1.2.0
API Documentation
NetFeed.h
Go to the documentation of this file.
1 // Copyright Onix Solutions Limited [OnixS]. All rights reserved.
2 //
3 // This software owned by Onix Solutions Limited [OnixS] and is
4 // protected by copyright law and international copyright treaties.
5 //
6 // Access to and use of the software is governed by the terms of the applicable
7 // OnixS Software Services Agreement (the Agreement) and Customer end user license
8 // agreements granting a non-assignable, non-transferable and non-exclusive license
9 // to use the software for it's own data processing purposes under the terms defined
10 // in the Agreement.
11 //
12 // Except as otherwise granted within the terms of the Agreement, copying or
13 // reproduction of any part of this source code or associated reference material
14 // to any other location for further reproduction or redistribution, and any
15 // amendments to this copyright notice, are expressly prohibited.
16 //
17 // Any reproduction or redistribution for sale or hiring of the Software not in
18 // accordance with the terms of the Agreement is a violation of copyright law.
19 //
20 
21 #pragma once
22 
23 #include <string>
24 
27 
29 
31 
32 /// Base attributes of market data feed.
34 {
35  TimeSpan receiveTimeout_;
36 
37  NetFeedConnection connection_;
38 
39  NetFeedType::Enum type_;
40  NetFeedRole::Enum role_;
41 
42  std::string id_;
43 
44  NetFeed(const NetFeed&);
45  NetFeed& operator =(const NetFeed&);
46 
47 protected:
48  /// Class serves as basement for implementations.
50  {
51  }
52 
53  /// Class serves as basement for implementations.
55  {
56  }
57 
58 public:
59  /// Identifier associated with feed.
60  const std::string& id() const
61  {
62  return id_;
63  }
64 
65  /// Assigns identifier.
66  void
67  id(
68  const std::string& id)
69  {
70  id_ = id;
71  }
72 
73  /// Type of service (incremental, instrument, etc).
75  {
76  return type_;
77  }
78 
79  /// Assigns feed service type.
81  {
82  type_ = type;
83  }
84 
85  /// Role in a service (primary, secondary).
87  {
88  return role_;
89  }
90 
91  /// Assigns feed service role.
93  {
94  role_ = role;
95  }
96 
97  /// Connection attributes (overload for modifications).
99  {
100  return connection_;
101  }
102 
103  /// Connection attributes (read-only access).
104  const
106  connection() const
107  {
108  return connection_;
109  }
110 
111  /// Maximal time interval between two packets transmitted.
112  const
113  TimeSpan&
115  {
116  return receiveTimeout_;
117  }
118 
119  /// Updates time interval between two packets transmitted.
120  void
122  UInt32 timeInterval)
123  {
124  receiveTimeout_ =
125  TimeSpan(
126  0,
127  0,
128  timeInterval,
129  0);
130  }
131 };
132 
NetFeedConnection & connection()
Connection attributes (overload for modifications).
Definition: NetFeed.h:98
void id(const std::string &id)
Assigns identifier.
Definition: NetFeed.h:67
Enum
Feed types based on type of market data service.
~NetFeed()
Class serves as basement for implementations.
Definition: NetFeed.h:54
const TimeSpan & receiveTimeout() const
Maximal time interval between two packets transmitted.
Definition: NetFeed.h:114
Base attributes of market data feed.
Definition: NetFeed.h:33
const NetFeedConnection & connection() const
Connection attributes (read-only access).
Definition: NetFeed.h:106
#define ONIXS_CMESTREAMLINEDMDH_NAMESPACE_END
Definition: Bootstrap.h:173
#define ONIXS_CMESTREAMLINEDMDH_LTWT_CLASS
Definition: Bootstrap.h:111
void type(NetFeedType::Enum type)
Assigns feed service type.
Definition: NetFeed.h:80
void receiveTimeout(UInt32 timeInterval)
Updates time interval between two packets transmitted.
Definition: NetFeed.h:121
void role(NetFeedRole::Enum role)
Assigns feed service role.
Definition: NetFeed.h:92
NetFeed()
Class serves as basement for implementations.
Definition: NetFeed.h:49
Network feed connection attributes.
const std::string & id() const
Identifier associated with feed.
Definition: NetFeed.h:60
NetFeedType::Enum type() const
Type of service (incremental, instrument, etc).
Definition: NetFeed.h:74
Represents time interval.
Definition: Time.h:104
NetFeedRole::Enum role() const
Role in a service (primary, secondary).
Definition: NetFeed.h:86
UInt32 UInt32
uInt32.
Definition: Fields.h:183
#define ONIXS_CMESTREAMLINEDMDH_NAMESPACE_BEGIN
Definition: Bootstrap.h:169