WriterDiscoveryInfo.h 1.7 KB

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