Recorder.h

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 
00009 #ifndef OPENDDS_DCPS_RECORDER_H
00010 #define OPENDDS_DCPS_RECORDER_H
00011 
00012 #include "dds/DCPS/LocalObject.h"
00013 #include "dds/DCPS/RcHandle_T.h"
00014 #include "dds/DCPS/RawDataSample.h"
00015 #include "dds/DdsDcpsInfrastructureC.h"
00016 
00017 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
00018 
00019 namespace OpenDDS {
00020 namespace DCPS {
00021 
00022 class Recorder;
00023 
00024 /**
00025  * @class RecorderListener
00026  *
00027  * @brief Listener for handling callbacks from the Recorder
00028  *
00029  * This class is for handling callbacks from the Recorder object.
00030  */
00031 class OpenDDS_Dcps_Export RecorderListener : public RcObject {
00032 
00033 public:
00034   virtual ~RecorderListener();
00035   /**
00036    *  Callback for when the Recorder receives a data sample.
00037    *  @param recorder Recorder that received the sample
00038    *  @param sample the received SAMPLE_DATA type sample
00039    *
00040    */
00041   virtual void on_sample_data_received(Recorder*            recorder,
00042                                        const RawDataSample& sample)=0;
00043 
00044   /**
00045    *  Callback for when the Recorder is associated with a DataWriter.
00046    *  @param recorder Recorder that received the association
00047    */
00048   virtual void on_recorder_matched(Recorder*                              recorder,
00049                                    const DDS::SubscriptionMatchedStatus & status)=0;
00050 };
00051 
00052 typedef RcHandle<RecorderListener> RecorderListener_rch;
00053 
00054 typedef Recorder* Recorder_ptr;
00055 typedef TAO_Objref_Var_T<Recorder> Recorder_var;
00056 
00057 class OpenDDS_Dcps_Export Recorder
00058   : public virtual LocalObjectBase {
00059 public:
00060   typedef Recorder_ptr _ptr_type;
00061   typedef Recorder_var _var_type;
00062 
00063   virtual ~Recorder();
00064 
00065   static Recorder_ptr _duplicate(Recorder_ptr obj);
00066 
00067 #if !defined (DDS_HAS_MINIMUM_BIT)
00068   /**
00069    *  Find the bit key for a given repo id.
00070    */
00071   virtual DDS::ReturnCode_t repoid_to_bit_key(const DCPS::RepoId&     id,
00072                                               DDS::BuiltinTopicKey_t& key) = 0;
00073 #endif
00074 
00075   /**
00076    * Set the Quality of Service settings for the Recorder.
00077    *
00078    */
00079   virtual DDS::ReturnCode_t set_qos (const DDS::SubscriberQos & subscriber_qos,
00080                                      const DDS::DataReaderQos & datareader_qos)=0;
00081 
00082   /**
00083    * Get the Quality of Service settings for the Recorder.
00084    *
00085    */
00086   virtual DDS::ReturnCode_t get_qos (DDS::SubscriberQos & subscriber_qos,
00087                                      DDS::DataReaderQos & datareader_qos)=0;
00088 
00089   /**
00090    * Change the listener for this Recorder.
00091    *
00092    */
00093   virtual DDS::ReturnCode_t set_listener (const RecorderListener_rch & a_listener,
00094                                           DDS::StatusMask              mask = DEFAULT_STATUS_MASK )=0;
00095 
00096   /**
00097    * Get the listener for this Recorder.
00098    *
00099    */
00100   virtual RecorderListener_rch get_listener() = 0;
00101 };
00102 
00103 }
00104 }
00105 
00106 OPENDDS_END_VERSIONED_NAMESPACE_DECL
00107 
00108 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00109 
00110 namespace TAO {
00111 
00112 template<>
00113 struct OpenDDS_Dcps_Export Objref_Traits< ::OpenDDS::DCPS::Recorder> {
00114   static ::OpenDDS::DCPS::Recorder_ptr duplicate( ::OpenDDS::DCPS::Recorder_ptr p);
00115   static void release(::OpenDDS::DCPS::Recorder_ptr p);
00116   static ::OpenDDS::DCPS::Recorder_ptr nil();
00117   static ::CORBA::Boolean marshal(const ::OpenDDS::DCPS::Recorder_ptr p,
00118                                 TAO_OutputCDR& cdr);
00119 };
00120 
00121 } // namespace TAO
00122 
00123 TAO_END_VERSIONED_NAMESPACE_DECL
00124 
00125 
00126 #endif /* end of include guard: OPENDDS_DCPS_RECORDER_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1