00001 /* 00002 * 00003 * 00004 * Distributed under the OpenDDS License. 00005 * See: http://www.opendds.org/license.html 00006 */ 00007 00008 #ifndef OPENDDS_DCPS_RAWDATASAMPLE_H 00009 #define OPENDDS_DCPS_RAWDATASAMPLE_H 00010 00011 #include "dds/DCPS/DataSampleHeader.h" 00012 00013 #include "ace/Basic_Types.h" 00014 00015 ACE_BEGIN_VERSIONED_NAMESPACE_DECL 00016 class ACE_Message_Block; 00017 ACE_END_VERSIONED_NAMESPACE_DECL 00018 00019 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL 00020 00021 namespace OpenDDS { 00022 namespace DCPS { 00023 00024 class OpenDDS_Dcps_Export RawDataSample 00025 { 00026 public: 00027 RawDataSample(); 00028 RawDataSample(MessageId, 00029 ACE_INT32 sec, 00030 ACE_UINT32 nano_sec, 00031 PublicationId pid, 00032 bool byte_order, 00033 ACE_Message_Block* blk); 00034 00035 RawDataSample(const RawDataSample&); 00036 ~RawDataSample(); 00037 RawDataSample& operator=(const RawDataSample&); 00038 00039 /// The enum indicating the message type 00040 MessageId message_id_; 00041 /// The timestamp the sender put on the sample 00042 DDS::Time_t source_timestamp_; 00043 /// Id of the datawriter that sent the sample 00044 PublicationId publication_id_; 00045 /// false - Message encoded using big-endian byte order. (see ace/CDR_Base.h) 00046 /// true - Message encoded using little-endian byte order. 00047 bool sample_byte_order_; 00048 /// The data in unspecified format 00049 Message_Block_Ptr sample_; 00050 }; 00051 00052 void swap(RawDataSample& lhs, RawDataSample& rhs); 00053 00054 } // namespace DCPS 00055 } // namespace OpenDDS 00056 00057 OPENDDS_END_VERSIONED_NAMESPACE_DECL 00058 00059 #endif