DdsDcpsSubscriptionExt.idl

Go to the documentation of this file.
00001 /*
00002  *
00003  *
00004  * Distributed under the OpenDDS License.
00005  * See: http://www.opendds.org/license.html
00006  */
00007 
00008 #ifndef OPENDDS_DCPS_SUBSCRIPTION_EXT_IDL
00009 #define OPENDDS_DCPS_SUBSCRIPTION_EXT_IDL
00010 
00011 // OpenDDS extensions to the DDS Subscription Module
00012 
00013 #include "dds/DdsDcpsSubscription.idl"
00014 #include "dds/DdsDcpsGuid.idl"
00015 
00016 module OpenDDS
00017 {
00018 
00019   module DCPS
00020   {
00021 
00022     struct SubscriptionLostStatus {
00023       ::DDS::InstanceHandleSeq publication_handles;
00024     };
00025 
00026     typedef SubscriptionLostStatus SubscriptionDisconnectedStatus;
00027     typedef SubscriptionLostStatus SubscriptionReconnectedStatus;
00028 
00029     struct BudgetExceededStatus {
00030       long             total_count;
00031       long             total_count_change;
00032       ::DDS::InstanceHandle_t last_instance_handle;
00033     };
00034 
00035     /// Collection of latency statistics for a single association.
00036     struct LatencyStatistics {
00037       GUID_t                  publication;
00038       unsigned long           n;
00039       double                  maximum;
00040       double                  minimum;
00041       double                  mean;
00042       double                  variance;
00043     };
00044 
00045     local interface DataReaderListener : ::DDS::DataReaderListener {
00046 
00047       // Called when a connection failure has been detected
00048       // and there are still associations using the connection
00049       // after the configurable graceful_disconnected_period.
00050       // When connection is gracefully disconnected, this callback
00051       // is also triggered.
00052       void on_subscription_disconnected(
00053         in ::DDS::DataReader reader,
00054         in SubscriptionDisconnectedStatus status);
00055 
00056       // Called when a disconnected connection
00057       // has been reconnected.
00058       void on_subscription_reconnected(
00059         in ::DDS::DataReader reader,
00060         in SubscriptionReconnectedStatus status);
00061 
00062       // called when a connection is lost and hence one
00063       // or more associations from this subscription to
00064       // some publishers have been lost.
00065       // A connection is "lost" when the retry attempts
00066       // have been exhausted.
00067       void on_subscription_lost(
00068         in ::DDS::DataReader reader,
00069         in SubscriptionLostStatus status);
00070 
00071       // called when the connection object is cleaned up and
00072       // the reconnect thread exits.
00073       // This hook is added for testing the reconnect thread
00074       // leaking problem when the subscriber crashes.
00075       void on_connection_deleted(
00076         in ::DDS::DataReader reader);
00077 
00078       // Called when the latency budget has been exceeded.
00079       void on_budget_exceeded(
00080         in ::DDS::DataReader reader,
00081         in BudgetExceededStatus status);
00082     };
00083 
00084 #ifndef OPENDDS_SAFETY_PROFILE
00085     typedef sequence<LatencyStatistics> LatencyStatisticsSeq;
00086 
00087     local interface DataReaderEx : ::DDS::DataReader {
00088       /// Obtain a sequence of statistics summaries.
00089       void get_latency_stats( inout LatencyStatisticsSeq stats);
00090 
00091       /// Clear any intermediate statistical values.
00092       void reset_latency_stats();
00093 
00094       /// Statistics gathering enable state.
00095       attribute boolean statistics_enabled;
00096     };
00097 #else
00098     local interface DataReaderEx : ::DDS::DataReader { };
00099 #endif
00100   };
00101 
00102 };
00103 
00104 #endif /* OPENDDS_DCPS_SUBSCRIPTION_EXT_IDL */

Generated on Fri Feb 12 20:05:22 2016 for OpenDDS by  doxygen 1.4.7