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 latency budget has been exceeded.
00072       void on_budget_exceeded(
00073         in ::DDS::DataReader reader,
00074         in BudgetExceededStatus status);
00075     };
00076 
00077 #ifndef OPENDDS_SAFETY_PROFILE
00078     typedef sequence<LatencyStatistics> LatencyStatisticsSeq;
00079 
00080     local interface DataReaderEx : ::DDS::DataReader {
00081       /// Obtain a sequence of statistics summaries.
00082       void get_latency_stats( inout LatencyStatisticsSeq stats);
00083 
00084       /// Clear any intermediate statistical values.
00085       void reset_latency_stats();
00086 
00087       /// Statistics gathering enable state.
00088       attribute boolean statistics_enabled;
00089     };
00090 #else
00091     local interface DataReaderEx : ::DDS::DataReader { };
00092 #endif
00093   };
00094 
00095 };
00096 
00097 #endif /* OPENDDS_DCPS_SUBSCRIPTION_EXT_IDL */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1