Line data Source code
1 : /* 2 : * 3 : * 4 : * Distributed under the OpenDDS License. 5 : * See: http://www.opendds.org/license.html 6 : */ 7 : 8 : #ifndef OPENDDS_NO_OBJECT_MODEL_PROFILE 9 : 10 : OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL 11 : 12 : namespace OpenDDS { 13 : namespace DCPS { 14 : 15 : ACE_INLINE 16 0 : WriterCoherentSample::WriterCoherentSample ( 17 : ACE_UINT32 num_sample, 18 0 : SequenceNumber last_sample) 19 0 : : num_samples_ (num_sample), 20 0 : last_sample_ (last_sample) 21 0 : {} 22 : 23 : 24 : ACE_INLINE 25 0 : void WriterCoherentSample::reset () 26 : { 27 0 : num_samples_ = 0; 28 0 : last_sample_ = SequenceNumber(); 29 0 : } 30 : 31 : 32 : ACE_INLINE 33 0 : CoherentChangeControl::CoherentChangeControl() 34 0 : : coherent_samples_ (), 35 0 : group_coherent_ (false), 36 0 : publisher_id_ (GUID_UNKNOWN) 37 : { 38 0 : } 39 : 40 : 41 : ACE_INLINE 42 0 : size_t CoherentChangeControl::get_max_serialized_size() 43 : { 44 0 : size_t sz = sizeof(this->coherent_samples_) 45 : + sizeof(this->group_coherent_); 46 0 : if (this->group_coherent_) { 47 0 : sz += sizeof(this->publisher_id_); 48 0 : sz += sizeof (ACE_UINT32); 49 0 : sz += this->group_coherent_samples_.size () * 50 : (sizeof(GUID_t) + sizeof(this->coherent_samples_)); 51 : } 52 : 53 0 : return sz; 54 : } 55 : 56 : ACE_INLINE 57 : void 58 : CoherentChangeControl::reset() 59 : { 60 : this->coherent_samples_ = WriterCoherentSample(); 61 : this->group_coherent_ = false; 62 : this->publisher_id_ = GUID_UNKNOWN; 63 : this->group_coherent_samples_.clear(); 64 : } 65 : 66 : } // namespace DCPS 67 : } // namespace OpenDDS 68 : 69 : OPENDDS_END_VERSIONED_NAMESPACE_DECL 70 : 71 : #endif // OPENDDS_NO_OBJECT_MODEL_PROFILE