OnixS C++ CME Market Data Handler  5.4.0
API documentation
FeedSettings.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 
25 #include <OnixS/CME/MDH/Integral.h>
28 
30 
31 // A bit of forward declarations.
32 
34 (
35  NetFeedEngine
36 );
37 
38 /// Collection of parameters which
39 /// are common for all types of feeds.
40 template
41 <
42  typename Layout
43 >
44 class
46 {
47  const SettingGroup& group_;
48 
49  Layout layout_;
50  UInt32 heartbeatInterval_;
51 
52  std::string feedANetworkInterfaces_;
53  std::string feedBNetworkInterfaces_;
54 
56  operator =(
57  const
58  FeedSettingsBase& other);
59 
60 protected:
61  // Makes assignment more flexible.
62  friend
64  (
66  );
67 
68  /// Initializes the instance with the
69  /// given values and optional grouping.
71  const SettingGroup* group,
72  Layout layout, UInt32 heartbeat)
73  : group_(
74  group
75  ? *group
76  : SettingGroup::null())
77  , layout_(layout)
78  , heartbeatInterval_(heartbeat)
79  {
80  }
81 
82  /// Initializes the instance
83  /// as a copy of the other one.
84  ///
85  /// Attributes controlling value
86  /// assignment aren't cloned and
87  /// thus only settings are copied.
89  const
90  FeedSettingsBase& other)
91  : group_(
92  SettingGroup::null())
93  , layout_(
94  other.layout_)
95  , heartbeatInterval_(
96  other.heartbeatInterval_)
97  , feedANetworkInterfaces_(
98  other.feedANetworkInterfaces_)
99  , feedBNetworkInterfaces_(
100  other.feedBNetworkInterfaces_)
101  {
102  }
103 
104  // Finalizes the instance.
106  {
107  }
108 
109  /// Instance of the group which
110  /// the given settings belong to.
111  const
112  SettingGroup&
113  group() const
114  {
115  return group_;
116  }
117 
118  /// Re-initializes the instance as a
119  /// copy of the other one without involving
120  /// assignment control services.
121  void
122  assignNoControl(
123  const FeedSettingsBase& other)
124  {
125  layout_ =
126  other.layout_;
127 
128  heartbeatInterval_ =
129  other.heartbeatInterval_;
130 
131  feedANetworkInterfaces_ =
132  other.feedANetworkInterfaces_;
133 
134  feedBNetworkInterfaces_ =
135  other.feedBNetworkInterfaces_;
136  }
137 
138 public:
139  /// Defines feed layout for a feed group.
140  Layout layout() const
141  {
142  return layout_;
143  }
144 
145  /// Defines feed layout for recovery feed group.
146  void
147  layout(
148  Layout value)
149  {
150  group_.
151  controlAssignment
152  (
153  "Layout",
154  layout_,
155  value
156  );
157  }
158 
159  /// Specifies maximal time interval between two
160  /// network packets. If no data is received during
161  /// specified time frame, corresponding event is raised
162  /// and further behavior is defined by feed layout.
163  ///
164  /// Interval is measured in seconds.
165  UInt32
166  heartbeatInterval() const
167  {
168  return heartbeatInterval_;
169  }
170 
171  /// Specifies maximal time interval between two packets.
172  void
173  heartbeatInterval(
174  UInt32 interval)
175  {
176  group_.
177  controlAssignment
178  (
179  "Heartbeat Interval",
180  heartbeatInterval_,
181  interval
182  );
183  }
184 
185  /// Specifies one or more network interfaces to use for
186  /// "A" feeds while joining the multicast group; use
187  /// semi-colon delimited list if more than one.
188  ///
189  /// @note On Linux the network interface is specified
190  /// by its name, on Windows - by IP address.
191  ///
192  /// @note If the value is empty or absent then the
193  /// Settings::networkInterface value is used.
194  const
195  std::string&
196  feedANetworkInterfaces() const
197  {
198  return feedANetworkInterfaces_;
199  }
200 
201  /// Specifies one or more network interfaces to use for
202  /// "A" feeds while joining the multicast group; use
203  /// semi-colon delimited list if more than one.
204  void
205  feedANetworkInterfaces(
206  const std::string& interfaces)
207  {
208  group_.
209  controlAssignment
210  (
211  "Feed A Network Interfaces",
212  feedANetworkInterfaces_,
213  interfaces
214  );
215  }
216 
217  /// Specifies one or more network interfaces to use for "B"
218  /// feeds while joining the multicast group; use semi-colon
219  /// delimited list if more than one.
220  ///
221  /// @note On Linux the network interface is specified by
222  /// its name, on Windows - by IP address.
223  ///
224  /// @note If the value is empty or absent then the
225  /// Settings::networkInterface value is used.
226  const
227  std::string&
228  feedBNetworkInterfaces() const
229  {
230  return feedBNetworkInterfaces_;
231  }
232 
233  /// Specifies one or more network interfaces to use for
234  /// "B" feeds while joining the multicast group; use
235  /// semi-colon delimited list if more than one.
236  void
237  feedBNetworkInterfaces(
238  const std::string& interfaces)
239  {
240  group_.
241  controlAssignment
242  (
243  "Feed B Network Interfaces",
244  feedBNetworkInterfaces_,
245  interfaces
246  );
247  }
248 };
249 
250 /// Defines feed layout alternates available for
251 /// recovery feeds like instrument and snapshot.
253 {
254  /// Integral type used as basement for constants.
255  typedef UInt32 Base;
256 
257  enum Enum
258  {
259  /// Indicates only feed A is used as source for market data.
261 
262  /// Indicates only feed B is used as source for market data.
264 
265  /// Feed A is used as primary source of market data. If Handler
266  /// detects absence of market data on feed A, it switches to
267  /// feed B to continue market data processing. Feed B is used
268  /// by Handler until market data absence is detected on it. In
269  /// that case Handler will switch back to feed A. In other words,
270  /// this layout instructs Handler to cycle between feeds if data
271  /// absence is detected starting from feed A.
273 
274  /// Feed B is used as primary source of market data. If Handler
275  /// detects absence of market data on feed B, it switches to
276  /// feed A to continue market data processing. Feed A is used
277  /// by Handler until market data absence is detected on it. In
278  /// that case Handler will switch back to feed B. In other words,
279  /// this layout instructs Handler to cycle between feeds if data
280  /// absence is detected starting from feed B.
281  FeedBWithFailoverToFeedA
282  };
283 };
284 
285 /// Appends string presentation of feed layout.
286 ONIXS_CMEMDH_EXPORTED
287 void
288 toStr(
289  std::string&,
291 
292 /// Returns string presentation of feed layout.
293 inline
294 std::string
297 {
298  std::string str;
299 
300  toStr(str, layout);
301 
302  return str;
303 }
304 
305 /// Collection of parameters affecting recovery feeds behavior.
308 : public FeedSettingsBase
309  <
311  >
312 {
313  friend
315  (
317  );
318 
319  typedef
321  <
323  >
324  Base;
325 
326  void
327  assignNoControl(
328  const
330  {
331  Base::assignNoControl(other);
332  }
333 
334 public:
335  /// Initializes instance with default values.
336  ///
337  /// By default, feed A is used as the primary source
338  /// of market recovery data with fail-over to the feed B.
339  /// Heartbeats are expected within 30 seconds periodicity.
341  const SettingGroup* group = NULL)
342  : Base(
343  group,
345  FeedAWithFailoverToFeedB,
346  30)
347  {
348  }
349 
350  /// Initializes the instance as a copy of the other one.
352  const MulticastRecoveryFeedSettings& other)
353  : Base(static_cast<const Base&>(other))
354  {
355  }
356 
357  /// Finalizes the instance.
359  {
360  }
361 
362  /// Re-initializes the instance as a copy of the other one.
364  operator =(
365  const
367  {
368  group().
369  controlAssignment
370  (
371  "Multicast Recovery Feed Settings",
372  &MulticastRecoveryFeedSettings::assignNoControl,
373  *this,
374  other
375  );
376 
377  return *this;
378  }
379 };
380 
381 /// Serializes feed settings into string.
382 ONIXS_CMEMDH_EXPORTED
383 void
384 toStr(
385  std::string&,
387 
388 /// Serializes feed settings into string.
389 inline
390 std::string
392  const
394 {
395  std::string str;
396 
397  toStr(str, settings);
398 
399  return str;
400 }
401 
402 /// Collection of parameters affecting recovery feeds behavior.
405 : public FeedSettingsBase
406  <
408  >
409 {
410  // Makes assignment more flexible.
411  friend
413  (
415  );
416 
417  typedef
419  <
421  >
422  Base;
423 
424  UInt32 connectionAttempts_;
425  UInt32 connectionTimeout_;
426  UInt32 sendTimeout_;
427 
428  void
429  assignNoControl(
430  const TcpRecoveryFeedSettings& other)
431  {
432  Base::assignNoControl(other);
433 
434  connectionAttempts_ =
435  other.connectionAttempts_;
436 
437  connectionTimeout_ =
438  other.connectionTimeout_;
439 
440  sendTimeout_ =
441  other.sendTimeout_;
442  }
443 
444 public:
445  /// Initializes instance with default values.
446  ///
447  /// By default, feed A is used as the primary source
448  /// of market recovery data with fail-over to the feed B.
449  /// Heartbeats are expected within 2 seconds periodicity.
451  const SettingGroup* group = NULL)
452  : Base(
453  group,
455  FeedAOnly,
456  2)
457  , connectionAttempts_(3)
458  , connectionTimeout_(500)
459  , sendTimeout_(5000)
460  {
461  }
462 
463  /// Initializes the instance
464  /// as a copy of the other one.
466  const
468  : Base(
469  static_cast
470  <const Base&>
471  (other))
472  , connectionAttempts_(
473  other.connectionAttempts_)
474  , connectionTimeout_(
475  other.connectionTimeout_)
476  , sendTimeout_(
477  other.sendTimeout_)
478  {
479  }
480 
481  /// Finalizes the instance.
483  {
484  }
485 
486  /// Number of times the Handler must try
487  /// recovering from the other feed if it
488  /// fails to recover from the primary one.
489  ///
490  /// @note Default value is '3'.
491  UInt32
492  connectionAttempts() const
493  {
494  return connectionAttempts_;
495  }
496 
497  /// Number of times the Handler must try
498  /// recovering from the other feed if it
499  /// fails to recover from the primary one.
500  void
501  connectionAttempts(
502  UInt32 attemptQty)
503  {
504  group().
505  controlAssignment
506  (
507  "Connection Attempts",
508  connectionAttempts_,
509  attemptQty
510  );
511  }
512 
513  /// Interval between the attempts to receive
514  /// missed packets via the TCP recovery feed if
515  /// previous attempt either failed or was rejected.
516  ///
517  /// Interval is measured in milliseconds.
518  ///
519  /// @note Default value is '500'.
520  UInt32
521  connectionTimeout() const
522  {
523  return connectionTimeout_;
524  }
525 
526  /// Interval between the attempts to receive
527  /// missed packets via the TCP recovery feed if
528  /// previous attempt either failed or was rejected.
529  ///
530  /// Interval is measured in milliseconds.
531  void
532  connectionTimeout(
533  UInt32 connectionTimeout)
534  {
535  group().
536  controlAssignment
537  (
538  "Connection Timeout",
539  connectionTimeout_,
540  connectionTimeout
541  );
542  }
543 
544  /// Time limit for the send operation.
545  ///
546  /// Value is measured in milliseconds.
547  ///
548  /// @note Default value is '5000'.
549  UInt32
550  sendTimeout() const
551  {
552  return sendTimeout_;
553  }
554 
555  /// Time limit for the send operation.
556  ///
557  /// Value is measured in milliseconds.
558  void
559  sendTimeout(
560  UInt32 sendTimeout)
561  {
562  group().
563  controlAssignment
564  (
565  "Send Timeout",
566  sendTimeout_,
567  sendTimeout
568  );
569  }
571  /// Re-initializes the instance
572  /// as a copy of the other one.
574  operator =(
575  const
577  {
578  group().
579  controlAssignment
580  (
581  "TCP Recovery Feed Settings",
582  &TcpRecoveryFeedSettings::assignNoControl,
583  *this,
584  other
585  );
586 
587  return *this;
588  }
589 };
590 
591 /// Serializes feed settings into string.
592 ONIXS_CMEMDH_EXPORTED
593 void
594 toStr(
595  std::string&,
596  const TcpRecoveryFeedSettings&);
597 
598 /// Serializes feed settings into string.
599 inline
600 std::string
602  const TcpRecoveryFeedSettings& settings)
603 {
604  std::string str;
605 
606  toStr(str, settings);
607 
608  return str;
609 }
610 
611 /// Defines feed layout alternates available
612 /// for real-time feed like incremental one.
614 {
615  /// Integral type used as basement for constants.
616  typedef UInt32 Base;
617 
618  enum Enum
619  {
620  /// Indicates only feed A is used as source for market data.
622 
623  /// Indicates only feed B is used as source for market data.
625 
626  /// Feed A is used as primary source of market data. If Handler
627  /// detects absence of market data on feed A, it switches to
628  /// feed B to continue market data processing. Feed B is used
629  /// by Handler until market data absence is detected on it. In
630  /// that case Handler will switch back to feed A. In other words,
631  /// this layout instructs Handler to cycle between feeds if data
632  /// absence is detected starting from feed A.
634 
635  /// Feed B is used as primary source of market data. If Handler
636  /// detects absence of market data on feed B, it switches to
637  /// feed A to continue market data processing. Feed A is used
638  /// by Handler until market data absence is detected on it. In
639  /// that case Handler will switch back to feed B. In other words,
640  /// this layout instructs Handler to cycle between feeds if data
641  /// absence is detected starting from feed B.
643 
644  /// Handler arbitrates between both feeds A and B.
645  BothFeedsWithArbitrage
646  };
647 };
648 
649 /// Appends string presentation of feed layout.
650 ONIXS_CMEMDH_EXPORTED
651 void
652 toStr(
653  std::string&,
655 
656 /// Returns string presentation of feed layout.
657 inline
658 std::string
661 {
662  std::string str;
663 
664  toStr(str, layout);
665 
666  return str;
667 }
668 
669 /// Collection of parameters affecting real-time feeds behavior.
672 : public FeedSettingsBase
673  <
675  >
676 {
677  friend
679  (
681  );
682 
683  typedef
685  <
687  >
688  Base;
689 
690  UInt32 outOfOrderPacketMaxInterval_;
691  UInt32 lostPacketWaitTime_;
692 
693  void
694  assignNoControl(
695  const RealtimeFeedSettings& other)
696  {
697  Base::assignNoControl(other);
698 
699  outOfOrderPacketMaxInterval_ =
700  other.outOfOrderPacketMaxInterval_;
701 
702  lostPacketWaitTime_ =
703  other.lostPacketWaitTime_;
704  }
705 
706 public:
707  /// Initializes instance with default values.
708  ///
709  /// By default, arbitrage between feeds A and B is done.
710  /// Heartbeats are expected within 30 seconds periodicity.
712  const SettingGroup* group = NULL)
713  : Base(
714  group,
716  BothFeedsWithArbitrage,
717  30)
718  , outOfOrderPacketMaxInterval_(3)
719  , lostPacketWaitTime_(100000)
720  {
721  }
722 
723  /// Initializes the instance
724  /// as a copy of the other one.
726  const
727  RealtimeFeedSettings& other)
728  : Base(
729  static_cast
730  <const Base&>
731  (other))
732  , outOfOrderPacketMaxInterval_(
733  other.outOfOrderPacketMaxInterval_)
734  , lostPacketWaitTime_(
735  other.lostPacketWaitTime_)
736  {
737  }
738 
739  /// Finalizes the instance.
741  {
742  }
743 
744  /// Defines a threshold used by the Handler
745  /// while handling out-of-order incoming packets.
746  ///
747  /// Due to the unreliable nature of multicast, packets may be missed
748  /// or received in an order different from the expected. The Handler
749  /// uses the given parameter to establish a threshold for incoming
750  /// packets whose sequence numbers are greater than expected unless
751  /// the expected packets are received or recognized as lost.
752  ///
753  /// When the Handler receives a packet with the sequence number higher
754  /// than expected, it considers the incoming packet as out-of-order. It
755  /// puts the packet into an internal queue if its sequence number does
756  /// not exceed the established threshold. The threshold represents the
757  /// sum of the last accepted packet's sequence number and the value of
758  /// the given parameter.
759  ///
760  /// Packets are queued unless the expected ones are received, or their
761  /// sequence numbers exceed the threshold, or the time limit is reached.
762  /// If the incoming packet's sequence number exceeds the established
763  /// threshold, the Handler raises the gap event.
764  ///
765  /// If arbitrage between primary and secondary feeds is enabled, the
766  /// Handler does not trigger the gap event until incoming packets from
767  /// both feeds exceed the established threshold.
768  ///
769  /// @see 'lostPacketWaitTime' parameter for more information.
770  ///
771  /// @note The default value is '3'.
772  UInt32
773  outOfOrderPacketMaxInterval() const
774  {
775  return outOfOrderPacketMaxInterval_;
776  }
778  /// Defines value of threshold used by the Handler
779  /// while handling out-of-order incoming packets.
780  void
781  outOfOrderPacketMaxInterval(
782  UInt32 intervalLength)
783  {
784  group().
785  controlAssignment
786  (
787  "Out Of Order Packet Max Interval",
788  outOfOrderPacketMaxInterval_,
789  intervalLength
790  );
791  }
792 
793  /// Indicates the time limit for the Handler while waiting
794  /// for expected packets before they are considered lost.
795  ///
796  /// When the Handler receives a packet with the sequence number greater
797  /// than expected, it considers the received data as out-of-order. The
798  /// Handler resumes normal data processing if it receives missing data
799  /// during the given time interval.
800  ///
801  /// However, if expected packets aren't received for a predefined time
802  /// frame, the Handler considers expected data as lost and raises the
803  /// gap event. The given parameter defines a time interval the Handler
804  /// waits for expected packets.
805  ///
806  /// @note The given parameter is used in combination with the
807  /// 'outOfOrderPacketMaxInterval' parameter.
808  ///
809  /// @see 'outOfOrderPacketMaxInterval' parameter for more information.
810  ///
811  /// The time interval is measured in microseconds (usec).
812  ///
813  /// @note The default value is '100000' (100 milliseconds).
814  UInt32
815  lostPacketWaitTime() const
816  {
817  return lostPacketWaitTime_;
818  }
820  /// Defines the time limit for the Handler while waiting
821  /// for expected packets before they considered as lost.
822  void
823  lostPacketWaitTime(
824  UInt32 waitTime)
825  {
826  group().
827  controlAssignment
828  (
829  "Lost Packet Wait Time",
830  lostPacketWaitTime_,
831  waitTime
832  );
833  }
835  /// Re-initializes the instance
836  /// as a copy of the other one.
838  operator =(
839  const
840  RealtimeFeedSettings& other)
841  {
842  group().
843  controlAssignment
844  (
845  "Realtime Feed Settings",
846  &RealtimeFeedSettings::assignNoControl,
847  *this,
848  other
849  );
850 
851  return *this;
852  }
853 };
854 
855 /// Serializes feed settings into string.
856 ONIXS_CMEMDH_EXPORTED
857 void
858 toStr(
859  std::string&,
860  const RealtimeFeedSettings&);
861 
862 /// Serializes feed settings into string.
863 inline
864 std::string
866  const RealtimeFeedSettings& settings)
867 {
868  std::string str;
869 
870  toStr(str, settings);
871 
872  return str;
873 }
874 
875 /// The parameters affecting all feeds
876 /// involved into market data processing.
878 FeedSettings : public SettingGroup
879 {
880  // To let assignment be controlled
881  // by the master container.
882  friend
884  (
886  );
887 
888  std::string connectivityConfigurationFile_;
889 
890  PacketSize packetMaxSize_;
891 
892  RealtimeFeedSettings incrementalFeeds_;
893 
894  MulticastRecoveryFeedSettings instrumentFeeds_;
895  MulticastRecoveryFeedSettings snapshotFeeds_;
896  MulticastRecoveryFeedSettings mboSnapshotFeeds_;
897 
898  TcpRecoveryFeedSettings historicalFeeds_;
899 
900  NetFeedEngine* engine_;
901 
902  // Casts the given instance to an
903  // instance of SettingGroup class.
904  const
905  SettingGroup&
906  group() const
907  {
908  return *this;
909  }
910 
911  // Re-initializes the given instance
912  // as a copy of the other one without
913  // involving assignment control service.
914  void
915  assignNoControl(
916  const FeedSettings& other)
917  {
918  connectivityConfigurationFile_ =
919  other.connectivityConfigurationFile_;
920 
921  packetMaxSize_ =
922  other.packetMaxSize_;
923 
924  incrementalFeeds_.
925  assignNoControl(
926  other.incrementalFeeds_);
927 
928  instrumentFeeds_.
929  assignNoControl(
930  other.instrumentFeeds_);
931 
932  snapshotFeeds_.
933  assignNoControl(
934  other.snapshotFeeds_);
935 
936  mboSnapshotFeeds_.
937  assignNoControl(
938  other.mboSnapshotFeeds_);
939 
940  historicalFeeds_.
941  assignNoControl(
942  other.historicalFeeds_);
943 
944  engine_ = other.engine_;
945  }
946 
947  // Updates interfaces for all primary feeds
948  // without involving assignment control services.
949  void
950  assignFeedAInterfaces(
951  const std::string& interfaces)
952  {
953  incrementalFeeds_.
954  feedANetworkInterfaces_ =
955 
956  instrumentFeeds_.
957  feedANetworkInterfaces_ =
958 
959  snapshotFeeds_.
960  feedANetworkInterfaces_ =
961 
962  mboSnapshotFeeds_.
963  feedANetworkInterfaces_ =
964 
965  historicalFeeds_.
966  feedANetworkInterfaces_ =
967 
968  interfaces;
969  }
970 
971  // Updates interfaces for all primary feeds
972  // without involving assignment control services.
973  void
974  assignFeedBInterfaces(
975  const std::string& interfaces)
976  {
977  incrementalFeeds_.
978  feedBNetworkInterfaces_ =
979 
980  instrumentFeeds_.
981  feedBNetworkInterfaces_ =
982 
983  snapshotFeeds_.
984  feedBNetworkInterfaces_ =
985 
986  mboSnapshotFeeds_.
987  feedBNetworkInterfaces_ =
988 
989  historicalFeeds_.
990  feedBNetworkInterfaces_ =
991 
992  interfaces;
993  }
994 
995 public:
996  /// Initializes the instance with the default values.
997  FeedSettings(
999  controller = NULL)
1000  : SettingGroup(controller)
1001  , packetMaxSize_(1420)
1002  , incrementalFeeds_(&group())
1003  , instrumentFeeds_(&group())
1004  , snapshotFeeds_(&group())
1005  , mboSnapshotFeeds_(&group())
1006  , historicalFeeds_(&group())
1007  , engine_(NULL)
1008  {
1009  }
1010 
1011  /// Initializes the instance
1012  /// as a copy of the other one.
1013  FeedSettings(
1014  const FeedSettings& other)
1015  : SettingGroup()
1016  , connectivityConfigurationFile_(
1017  other.connectivityConfigurationFile_)
1018  , packetMaxSize_(
1019  other.packetMaxSize_)
1020  , incrementalFeeds_(
1021  other.incrementalFeeds_)
1022  , instrumentFeeds_(
1023  other.instrumentFeeds_)
1024  , snapshotFeeds_(
1025  other.snapshotFeeds_)
1026  , mboSnapshotFeeds_(
1027  other.mboSnapshotFeeds_)
1028  , historicalFeeds_(
1029  other.historicalFeeds_)
1030  , engine_(
1031  other.engine_)
1032  {
1033  }
1035  /// Path to the connectivity configuration file.
1036  const
1037  std::string&
1038  connectivityConfigurationFile() const
1039  {
1040  return connectivityConfigurationFile_;
1041  }
1042 
1043  /// Sets path to the connectivity configuration file.
1044  void
1045  connectivityConfigurationFile(
1046  const std::string& configurationFile)
1047  {
1048  group().
1049  controlAssignment
1050  (
1051  "Connectivity Configuration File",
1052  connectivityConfigurationFile_,
1053  configurationFile
1054  );
1055  }
1056 
1057  /// Specifies one or more network interfaces to use for
1058  /// "A" feeds while joining the multicast group; use
1059  /// semi-colon delimited list if more than one.
1060  void
1061  feedANetworkInterfaces(
1062  const std::string& interfaces)
1063  {
1064  group().
1065  controlAssignment
1066  (
1067  "Feed A Network Interfaces for All Feeds",
1068  &FeedSettings::assignFeedAInterfaces,
1069  *this,
1070  interfaces
1071  );
1072  }
1073 
1074  /// Specifies one or more network interfaces to use for
1075  /// "B" feeds while joining the multicast group; use
1076  /// semi-colon delimited list if more than one.
1077  void
1078  feedBNetworkInterfaces(
1079  const std::string& interfaces)
1080  {
1081  group().
1082  controlAssignment
1083  (
1084  "Feed B Network Interfaces for All Feeds",
1085  &FeedSettings::assignFeedBInterfaces,
1086  *this,
1087  interfaces
1088  );
1089  }
1091  /// Max size for network packet transmitted by MDP.
1092  ///
1093  /// @note Default value is '1420'.
1094  PacketSize packetMaxSize() const
1095  {
1096  return packetMaxSize_;
1097  }
1098 
1099  /// Max size for network packet transmitted by MDP.
1100  void
1101  packetMaxSize(
1102  PacketSize value)
1103  {
1104  group().
1105  controlAssignment
1106  (
1107  "Packet Max Size",
1108  packetMaxSize_,
1109  value
1110  );
1111  }
1113  /// The settings related to incremental feeds.
1114  const
1116  incrementalFeeds() const
1117  {
1118  return incrementalFeeds_;
1119  }
1120 
1121  /// The settings related to incremental feeds.
1123  incrementalFeeds()
1124  {
1125  return incrementalFeeds_;
1126  }
1128  /// The settings related to instrument feeds.
1129  const
1131  instrumentFeeds() const
1132  {
1133  return instrumentFeeds_;
1134  }
1135 
1136  /// The settings related to instrument feeds.
1138  instrumentFeeds()
1139  {
1140  return instrumentFeeds_;
1141  }
1143  /// The settings related to snapshot feeds.
1144  const
1146  snapshotFeeds() const
1147  {
1148  return snapshotFeeds_;
1149  }
1150 
1151  /// The settings related to snapshot feeds.
1153  snapshotFeeds()
1154  {
1155  return snapshotFeeds_;
1156  }
1158  /// The settings related to snapshot feeds.
1159  const
1161  mboSnapshotFeeds() const
1162  {
1163  return mboSnapshotFeeds_;
1164  }
1165 
1166  /// The settings related to snapshot feeds.
1168  mboSnapshotFeeds()
1169  {
1170  return mboSnapshotFeeds_;
1171  }
1173  /// The settings related to historical (TCP recovery) feeds.
1174  const
1176  historicalFeeds() const
1177  {
1178  return historicalFeeds_;
1179  }
1180 
1181  /// The settings related to historical (TCP Recovery) feeds.
1183  historicalFeeds()
1184  {
1185  return historicalFeeds_;
1186  }
1187 
1188  /// Instance of the Feed Engine to be used by the Handler.
1189  /// Null instance means no feed engine is yet defined.
1190  NetFeedEngine* engine() const
1191  {
1192  return engine_;
1193  }
1194 
1195  /// Defines instance of the Feed Engine to be used by the Handler.
1196  void
1197  engine(
1198  NetFeedEngine* engine)
1199  {
1200  group().
1201  controlAssignment
1202  (
1203  "Feed Engine",
1204  engine_,
1205  engine
1206  );
1207  }
1209  /// Re-initializes the instance
1210  /// as a copy of the other one.
1211  FeedSettings&
1212  operator =(
1213  const FeedSettings& other)
1214  {
1215  group().
1216  controlAssignment
1217  (
1218  "Feed Settings",
1219  &FeedSettings::assignNoControl,
1220  *this,
1221  other
1222  );
1223 
1224  return *this;
1225  }
1226 };
1227 
1228 /// Serializes feed settings into string.
1229 ONIXS_CMEMDH_EXPORTED
1230 void
1231 toStr(
1232  std::string&,
1233  const FeedSettings&);
1234 
1235 /// Serializes feed settings into string.
1236 inline
1237 std::string
1239  const FeedSettings& settings)
1240 {
1241  std::string str;
1242 
1243  toStr(str, settings);
1244 
1245  return str;
1246 }
1247 
#define ONIXS_CMEMDH_LTWT_CLASS
Definition: Bootstrap.h:94
Handler&#39;s configuration settings.
UInt32 Base
Integral type used as basement for constants.
Definition: FeedSettings.h:255
UInt32 UInt32
uInt32.
Definition: Fields.h:247
Indicates only feed B is used as source for market data.
Definition: FeedSettings.h:263
#define ONIXS_CMEMDH_EXPORTED_CLASS_DECL(typeName)
Definition: Bootstrap.h:46
Indicates only feed A is used as source for market data.
Definition: FeedSettings.h:260
Collection of parameters affecting real-time feeds behavior.
Definition: FeedSettings.h:670
bool value(Number &number, const MultiContainer &container, Tag tag)
std::string toStr(const FeedSettings &settings)
Serializes feed settings into string.
Indicates only feed A is used as source for market data.
Definition: FeedSettings.h:621
#define ONIXS_CMEMDH_LTWT_STRUCT
Definition: Bootstrap.h:98
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
Definition: Bootstrap.h:152
Base services for settings grouped by a certain criteria.
Definition: SettingGroup.h:123
Indicates only feed B is used as source for market data.
Definition: FeedSettings.h:624
Collection of parameters affecting recovery feeds behavior.
Definition: FeedSettings.h:306
#define ONIXS_CMEMDH_LTWT_CLASS_DECL(name)
Definition: Bootstrap.h:106
UInt32 Base
Integral type used as basement for constants.
Definition: FeedSettings.h:616
UInt16 PacketSize
Integral type for measuring packets.
Definition: PacketTraits.h:36
Collection of parameters affecting recovery feeds behavior.
Definition: FeedSettings.h:403
#define ONIXS_CMEMDH_NAMESPACE_END
Definition: Bootstrap.h:156