ReaderDiscoveryInfo.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // Copyright 2018 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 ReaderDiscoveryInfo.h
  16. *
  17. */
  18. #ifndef _FASTDDS_RTPS_READER_READERDISCOVERYINFO_H__
  19. #define _FASTDDS_RTPS_READER_READERDISCOVERYINFO_H__
  20. #include <fastrtps/fastrtps_dll.h>
  21. #include <fastdds/rtps/builtin/data/ReaderProxyData.h>
  22. namespace eprosima {
  23. namespace fastrtps {
  24. namespace rtps {
  25. /**
  26. * Class ReaderDiscoveryInfo with discovery information of the reader.
  27. * @ingroup RTPS_MODULE
  28. */
  29. struct ReaderDiscoveryInfo
  30. {
  31. public:
  32. //!Enum DISCOVERY_STATUS, four different status for discovered readers.
  33. //!@ingroup RTPS_MODULE
  34. #if defined(_WIN32)
  35. enum RTPS_DllAPI DISCOVERY_STATUS
  36. #else
  37. enum DISCOVERY_STATUS
  38. #endif
  39. {
  40. DISCOVERED_READER,
  41. CHANGED_QOS_READER,
  42. REMOVED_READER
  43. };
  44. ReaderDiscoveryInfo(const ReaderProxyData& data)
  45. : status(DISCOVERED_READER)
  46. , info(data)
  47. {}
  48. virtual ~ReaderDiscoveryInfo() {}
  49. //! Status
  50. DISCOVERY_STATUS status;
  51. //! Participant discovery info
  52. const ReaderProxyData& info;
  53. };
  54. }
  55. }
  56. }
  57. #endif // _FASTDDS_RTPS_READER_READERDISCOVERYINFO_H__