KeyedChanges.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. // Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. /**
  15. * @file KeyedChanges.h
  16. *
  17. */
  18. #ifndef KEYEDCHANGES_H_
  19. #define KEYEDCHANGES_H_
  20. #include <fastdds/rtps/common/CacheChange.h>
  21. #include <chrono>
  22. namespace eprosima{
  23. namespace fastrtps{
  24. /**
  25. * @brief A struct storing a vector of cache changes and the next deadline in the group
  26. * @ingroup FASTRTPS_MODULE
  27. */
  28. struct KeyedChanges
  29. {
  30. //! Default constructor
  31. KeyedChanges()
  32. : cache_changes()
  33. , next_deadline_us()
  34. {
  35. }
  36. //! Copy constructor
  37. KeyedChanges(const KeyedChanges& other)
  38. : cache_changes(other.cache_changes)
  39. , next_deadline_us(other.next_deadline_us)
  40. {
  41. }
  42. //! Destructor
  43. ~KeyedChanges()
  44. {
  45. }
  46. //! A vector of cache changes
  47. std::vector<rtps::CacheChange_t*> cache_changes;
  48. //! The time when the group will miss the deadline
  49. std::chrono::steady_clock::time_point next_deadline_us;
  50. };
  51. } /* namespace */
  52. } /* namespace eprosima */
  53. #endif /* KEYEDCHANGES_H_ */